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 425fc784e8edda35effaefa7a2e2f052e23ff395..707fdc24b81052db297d430a8aab38ebba6c539f 100644 |
--- a/third_party/WebKit/Source/core/css/RuleFeature.cpp |
+++ b/third_party/WebKit/Source/core/css/RuleFeature.cpp |
@@ -405,6 +405,10 @@ RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelector& selector, Inva |
continue; |
features.treeBoundaryCrossing = current->isShadowSelector(); |
+ if (current->relationIsAffectedByPseudoContent()) { |
+ features.contentPseudoCrossing = true; |
+ features.insertionPointCrossing = true; |
+ } |
features.adjacent = current->isAdjacentSelector(); |
if (current->relation() == CSSSelector::DirectAdjacent) |
features.maxDirectAdjacentSelectors = 1; |
@@ -473,11 +477,8 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector* selector, |
} else { |
if (current->isHostPseudoClass()) |
descendantFeatures.treeBoundaryCrossing = true; |
- if (current->isInsertionPointCrossing()) { |
+ if (current->isInsertionPointCrossing()) |
descendantFeatures.insertionPointCrossing = true; |
- if (current->pseudoType() == CSSSelector::PseudoContent) |
- descendantFeatures.contentPseudoCrossing = true; |
- } |
if (const CSSSelectorList* selectorList = current->selectorList()) { |
ASSERT(supportsInvalidationWithSelectorList(current->pseudoType())); |
for (const CSSSelector* subSelector = selectorList->first(); subSelector; subSelector = CSSSelectorList::next(*subSelector)) |
@@ -488,9 +489,12 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector* selector, |
if (current->relation() == CSSSelector::SubSelector) |
continue; |
+ if (current->relationIsAffectedByPseudoContent()) { |
+ descendantFeatures.insertionPointCrossing = true; |
+ descendantFeatures.contentPseudoCrossing = true; |
+ } |
if (current->isShadowSelector()) |
descendantFeatures.treeBoundaryCrossing = true; |
- |
if (!current->isAdjacentSelector()) { |
lastCompoundSelectorInAdjacentChain = current->tagHistory(); |
siblingFeatures = nullptr; |