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

Unified Diff: third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp

Issue 2106063007: Don't schedule wholeSubtreeInvalid sets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-assert.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
index b28c9cdeeba35135afaa39a6f6ef67a17e52ce31..bdd725367b52362c8e8b1467a80624cda458dd85 100644
--- a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -96,16 +96,25 @@ void StyleInvalidator::scheduleSiblingInvalidationsAsDescendants(const Invalidat
PendingInvalidations& pendingInvalidations = ensurePendingInvalidations(schedulingParent);
+ schedulingParent.setNeedsStyleInvalidation();
+
for (auto& invalidationSet : invalidationLists.siblings) {
+ if (invalidationSet->wholeSubtreeInvalid()) {
+ schedulingParent.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator));
+ return;
+ }
if (invalidationSet->invalidatesSelf() && !pendingInvalidations.descendants().contains(invalidationSet))
pendingInvalidations.descendants().append(invalidationSet);
if (DescendantInvalidationSet* descendants = toSiblingInvalidationSet(*invalidationSet).siblingDescendants()) {
+ if (descendants->wholeSubtreeInvalid()) {
+ schedulingParent.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator));
+ return;
+ }
if (!pendingInvalidations.descendants().contains(descendants))
pendingInvalidations.descendants().append(descendants);
}
}
- schedulingParent.setNeedsStyleInvalidation();
}
void StyleInvalidator::clearInvalidation(ContainerNode& node)
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/invalidation/sibling-mutation-assert.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698