This now means that using a class/id/attribute selector in one scope will
not cause style recalcs in other scopes in the page when something with
that feature changes.
It also removes an iteration over all the scopes that used to collect
features.
I also removed all the extra cases around adding/removing classes since
the general case can handle them.
In addition I removed the check for classStringHasClassName which looked
to see if the string was all whitespace. This check dated way back to
fixing an assert in code we don't even have anymore. Assertion fix aside
all the extra check optimized for was if you wrote class=" " with no
names, which will now cause an extra malloc of the SpaceSplitString::Data.
This seems super rare, it makes more sense to not scan the class string
every time the list of classes changes which is far more common than
setting a string of only whitespace.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/837883002
Instead of trying to match the actual attribute rules, lets just look
at the HashSet of attribute names. This is faster, though possibly less
optimal if you use compound rules like .foo[attr]. That's rare though,
and removing this extra RuleSet will allow simplifying SelectorChecker
since hasAnyMatchingRules required a special mode where it tried to
match selectors but ignored if the scope could really match. This paves
the way to moving the RuleFeatureSet to be per-TreeScope instead of
per-Document.
I also made the API of classNamesAffectedByRules match the newly added
attributesAffectedByRules to make SharedStyleFinder consistent.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/796583002
This caused us to lose our gn check certification. :(
Turns out gn check was just ignoring all the header
paths it didn't understand and so gn check passing
for sky wasn't meaning much. I tried to straighten
out some of the mess in this CL, but its going to take
several more rounds of massaging before gn check
passes again. On the bright side (almost) all of
our headers are absolute now. Turns out my script
(attached to the bug) didn't notice ../ includes
but I'll fix that in the next patch.
R=abarth@chromium.org
BUG=435361
Review URL: https://codereview.chromium.org/746023002
I used do-webcore-rename from Blink/WebKit
which is very good at doing this kind
of search-replace.
Also removed toRefPrtNativeArray after
conversion since it previously had two
separate flavors. Both versions are no longer
used so I've removed the code until we
need one again.
https://www.irccloud.com/pastebin/5C16p5cE
is the diff I used to do-webcore-rename
TBR=abarth@chromium.org