DescriptionPrepare for multiple !important author ranges.
This CL is split out from [1] where we support multiple author origins in
terms of shadow dom scopes. The vector of MatchedProperties contains
matched declarations from all origins in the order in which they should
be applied. For !important declarations, they are applied in the same
order within the same origin, but the order of the origins are different
as the cascading order is:
- UA important
- Author important
- Author
- UA
We used to have two ranges, one for UA and one for author to accomplish
this. However, with the normal/!important cascading order for
declarations from different shadow doms, we need multiple author ranges:
- UA important
- Author important scope n
...
- Author important scope 1
- Author scope 1
...
- Author scope n
- UA
We introduce an ImportantAuthorRangeIterator to iterate through the
author ranges and add iterator-style iteration for each range through the
MatchedPropertiesRange class.
As the applyMatchedProperties code is hot, I've run the blink_perf.css
tests locally. Some improved by 2-4%, some became worse by similar
percentages.
[1] https://codereview.chromium.org/1224673002/
BUG=487125
TEST=fast/css
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200697
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200818
Patch Set 1 #Patch Set 2 : ready for review. #Patch Set 3 : Re-added documentation #Patch Set 4 : Fixed incorrect assertion #
Total comments: 8
Patch Set 5 : Added unit tests for MatchResult and fixed review issues. #Patch Set 6 : Another issue #Patch Set 7 : Rebased #Patch Set 8 : Oilpan fix in unit test #Patch Set 9 : Signed/unsigned issue #Patch Set 10 : CORE_EXPORT needed for unit tests #Patch Set 11 : Missing call to finishAddingAuthorRulesForTreeScope. #Patch Set 12 : Missing STACK_ALLOCATED() #
Messages
Total messages: 47 (20 generated)
|