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

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

Issue 1509853002: Remove checkForChildrenAdjacentRuleChanges. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Might need to schedule sibling invalidation sets for SubtreeStyleChange Created 5 years 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
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 453479c8ce684b202d19f90d1ff2e7c511924bf1..9a48c6cd17ed299f91cf77f01c2e5c84562385fb 100644
--- a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -165,12 +165,7 @@ bool StyleInvalidator::SiblingData::matchCurrentInvalidationSets(Element& elemen
if (invalidationSet.invalidatesElement(element)) {
const DescendantInvalidationSet& descendants = invalidationSet.descendants();
if (descendants.wholeSubtreeInvalid()) {
- // Avoid directly setting SubtreeStyleChange on element, or ContainerNode::checkForChildrenAdjacentRuleChanges()
- // may propagate the SubtreeStyleChange to our own siblings' subtrees.
-
- for (Element* child = ElementTraversal::firstChild(element); child; child = ElementTraversal::nextSibling(*child)) {
- child->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::SiblingSelector));
- }
+ element.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698