Prepare 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 Review URL: https://codereview.chromium.org/1282243002 git-svn-id: svn://svn.chromium.org/blink/trunk@200697 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment