Chromium Code Reviews| Index: Source/core/css/RuleFeature.cpp |
| diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp |
| index 2e7bceb023b0905bd5ef3370650ce2f6df02e402..421987966d109a606b0789fc71d49bc26f15d875 100644 |
| --- a/Source/core/css/RuleFeature.cpp |
| +++ b/Source/core/css/RuleFeature.cpp |
| @@ -138,6 +138,9 @@ static bool supportsInvalidation(CSSSelector::PseudoType type) |
| case CSSSelector::PseudoInRange: |
| case CSSSelector::PseudoOutOfRange: |
| case CSSSelector::PseudoWebKitCustomElement: |
| + case CSSSelector::PseudoCue: |
| + case CSSSelector::PseudoFutureCue: |
| + case CSSSelector::PseudoPastCue: |
| case CSSSelector::PseudoUnresolved: |
| case CSSSelector::PseudoContent: |
| case CSSSelector::PseudoHost: |
| @@ -171,9 +174,6 @@ static bool requiresSubtreeInvalidation(const CSSSelector& selector) |
| switch (selector.pseudoType()) { |
| case CSSSelector::PseudoFirstLine: |
| case CSSSelector::PseudoFirstLetter: |
| - case CSSSelector::PseudoCue: |
| - case CSSSelector::PseudoFutureCue: |
| - case CSSSelector::PseudoPastCue: |
| case CSSSelector::PseudoSpatialNavigationFocus: |
| // FIXME: Most pseudo classes/elements above can be supported and moved |
| // to assertSupportedPseudo(). Move on a case-by-case basis. If they |
| @@ -216,7 +216,8 @@ RuleFeatureSet::InvalidationSetMode RuleFeatureSet::invalidationSetModeForSelect |
| } |
| } else if (component->pseudoType() == CSSSelector::PseudoNot |
| || component->pseudoType() == CSSSelector::PseudoHost |
| - || component->pseudoType() == CSSSelector::PseudoAny) { |
| + || component->pseudoType() == CSSSelector::PseudoAny |
| + || component->pseudoType() == CSSSelector::PseudoCue) { |
| if (const CSSSelectorList* selectorList = component->selectorList()) { |
| // Features inside :not() are not added to the feature set, so consider it a universal selector. |
| bool foundUniversal = component->pseudoType() == CSSSelector::PseudoNot; |
| @@ -343,7 +344,7 @@ const CSSSelector* RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelec |
| extractInvalidationSetFeature(*current, features); |
| // Initialize the entry in the invalidation set map, if supported. |
| invalidationSetForSelector(*current); |
| - if (current->pseudoType() == CSSSelector::PseudoHost || current->pseudoType() == CSSSelector::PseudoAny || current->pseudoType() == CSSSelector::PseudoNot) { |
| + if (current->pseudoType() == CSSSelector::PseudoHost || current->pseudoType() == CSSSelector::PseudoAny || current->pseudoType() == CSSSelector::PseudoNot || current->pseudoType() == CSSSelector::PseudoCue) { |
| if (const CSSSelectorList* selectorList = current->selectorList()) { |
| for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) |
| extractInvalidationSetFeatures(*selector, features, current->pseudoType() == CSSSelector::PseudoNot); |
| @@ -405,7 +406,7 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector& selector, |
| if (current->isInsertionPointCrossing()) |
| features.insertionPointCrossing = true; |
| if (const CSSSelectorList* selectorList = current->selectorList()) { |
| - ASSERT(current->pseudoType() == CSSSelector::PseudoHost || current->pseudoType() == CSSSelector::PseudoAny || current->pseudoType() == CSSSelector::PseudoNot); |
| + ASSERT(current->pseudoType() == CSSSelector::PseudoHost || current->pseudoType() == CSSSelector::PseudoAny || current->pseudoType() == CSSSelector::PseudoNot || current->pseudoType() == CSSSelector::PseudoCue); |
|
chrishtr
2014/11/12 21:36:42
This code is repeated 3 times at line 219, 347 and
|
| for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector)) |
| addFeaturesToInvalidationSets(*selector, features); |
| } |