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

Unified Diff: third_party/WebKit/Source/core/css/RuleFeature.cpp

Issue 1717703002: Use invalidation sets to invalidate slotted elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed expected text Created 4 years, 10 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
Index: third_party/WebKit/Source/core/css/RuleFeature.cpp
diff --git a/third_party/WebKit/Source/core/css/RuleFeature.cpp b/third_party/WebKit/Source/core/css/RuleFeature.cpp
index 3d76fb5a2540f4e5152c8579711395270fc54fea..7eee8702aa751a97236d8d17a9451d0be9f64b49 100644
--- a/third_party/WebKit/Source/core/css/RuleFeature.cpp
+++ b/third_party/WebKit/Source/core/css/RuleFeature.cpp
@@ -420,6 +420,10 @@ RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelector& selector, Inva
return std::make_pair(&selector, ForceSubtree);
}
if (const CSSSelectorList* selectorList = current->selectorList()) {
+ if (current->pseudoType() == CSSSelector::PseudoSlotted) {
+ ASSERT(position == Subject);
+ features.invalidatesSlotted = true;
+ }
ASSERT(supportsInvalidationWithSelectorList(current->pseudoType()));
const CSSSelector* subSelector = selectorList->first();
bool allSubSelectorsHaveFeatures = !!subSelector;
@@ -468,6 +472,8 @@ void RuleFeatureSet::addFeaturesToInvalidationSet(InvalidationSet& invalidationS
invalidationSet.setTreeBoundaryCrossing();
if (features.insertionPointCrossing)
invalidationSet.setInsertionPointCrossing();
+ if (features.invalidatesSlotted)
+ invalidationSet.setInvalidatesSlotted();
if (features.forceSubtree)
invalidationSet.setWholeSubtreeInvalid();
if (features.contentPseudoCrossing || features.forceSubtree)
« no previous file with comments | « third_party/WebKit/Source/core/css/RuleFeature.h ('k') | third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698