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

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

Issue 684993007: Support style invalidation for ::cue selectors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « LayoutTests/media/track/cue-style-invalidation-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « LayoutTests/media/track/cue-style-invalidation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698