Index: Source/core/css/RuleFeature.cpp |
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp |
index bdc04544ce4e4a588c187dbca89a74e2ef7ea4b5..75f1215945213193a98d1201084338eb403644e4 100644 |
--- a/Source/core/css/RuleFeature.cpp |
+++ b/Source/core/css/RuleFeature.cpp |
@@ -103,7 +103,7 @@ static bool isSkippableComponentForInvalidation(const CSSSelector& selector) |
} |
// This method is somewhat conservative in what it accepts. |
-RuleFeatureSet::InvalidationSetMode RuleFeatureSet::supportsClassDescendantInvalidation(const CSSSelector& selector) |
+RuleFeatureSet::InvalidationSetMode RuleFeatureSet::getInvalidationSetMode(const CSSSelector& selector) |
{ |
bool foundDescendantRelation = false; |
bool foundIdent = false; |
@@ -116,10 +116,10 @@ RuleFeatureSet::InvalidationSetMode RuleFeatureSet::supportsClassDescendantInval |
} else if (component->pseudoType() == CSSSelector::PseudoHost || component->pseudoType() == CSSSelector::PseudoAny) { |
if (const CSSSelectorList* selectorList = component->selectorList()) { |
for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) { |
- InvalidationSetMode hostMode = supportsClassDescendantInvalidation(*selector); |
+ InvalidationSetMode hostMode = getInvalidationSetMode(*selector); |
if (hostMode == UseSubtreeStyleChange) |
return foundDescendantRelation ? UseLocalStyleChange : UseSubtreeStyleChange; |
- if (hostMode == AddFeatures) |
+ if (!foundDescendantRelation && hostMode == AddFeatures) |
foundIdent = true; |
} |
} |
@@ -170,7 +170,7 @@ DescendantInvalidationSet* RuleFeatureSet::invalidationSetForSelector(const CSSS |
RuleFeatureSet::InvalidationSetMode RuleFeatureSet::updateInvalidationSets(const CSSSelector& selector) |
{ |
- InvalidationSetMode mode = supportsClassDescendantInvalidation(selector); |
+ InvalidationSetMode mode = getInvalidationSetMode(selector); |
if (mode != AddFeatures) |
return mode; |