DescriptionStyleResolver should update RuleSets lazily.
This is a fixing patch for preformance regression caused by r159957.
Before applying r159957, removing a style element (or modifying a style element's textcontent)
destroys StyleResolver, e.g. style.textContent = '';
After applying r159957, we don't need to destroy StyleResolver.
The r159957 makes us to avoid FullStyleRecalc and full RuleSet re-creation (document,
and shadow trees).
But the patch caused Parser/css-parser-yui.html's performance regression.
Because firstly the performance test destroys StyleResolver and skip StyleResolver::appendAuthorStyleSheets.
(If we have no StyleResolver, we don't need to update RuleSet, StyleInvalidationAnalysis, and so on)
So we should update RuleSets lazily. This solution improves Parser/css-parser-yui.html's performance again.
BUG=305885, 308796
TEST=all existing tests should pass.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162187
Patch Set 1 #
Total comments: 18
Patch Set 2 : Revised #Patch Set 3 : Fixed apply issue failure #Patch Set 4 : Filter @viewport and @font-face in lazyAppend #
Total comments: 10
Patch Set 5 : #Patch Set 6 : append @font-face lazily #Patch Set 7 : Rebased #
Total comments: 4
Patch Set 8 : modify Document::styleResolver #
Total comments: 14
Patch Set 9 : Revised #
Total comments: 1
Messages
Total messages: 19 (0 generated)
|