Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2751193004: Skip ruleset invalidations for SubtreeStyleChange roots. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngineTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 779ffa005a34ed750ddd852fd2447eb0b28b1620..0de4d370c2af5743d772ebe7c7caf3c472557be8 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -1084,11 +1084,15 @@ void StyleEngine::applyRuleSetChanges(
if (changedRuleFlags & KeyframesRules)
ScopedStyleResolver::keyframesRulesAdded(treeScope);
+ Node& invalidationRoot =
+ ScopedStyleResolver::invalidationRootForTreeScope(treeScope);
+ if (invalidationRoot.getStyleChangeType() >= SubtreeStyleChange)
+ return;
+
if (fontsChanged || (changedRuleFlags & FullRecalcRules)) {
- ScopedStyleResolver::invalidationRootForTreeScope(treeScope)
- .setNeedsStyleRecalc(SubtreeStyleChange,
- StyleChangeReasonForTracing::create(
- StyleChangeReason::ActiveStylesheetsUpdate));
+ invalidationRoot.setNeedsStyleRecalc(
+ SubtreeStyleChange, StyleChangeReasonForTracing::create(
+ StyleChangeReason::ActiveStylesheetsUpdate));
return;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngineTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698