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

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

Issue 210973004: Support invalidation sets for :-webkit-any selectors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « LayoutTests/fast/css/invalidation/targeted-class-any-pseudo-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 b5dc017d657c25ba94f3434040e6d60f3b7bc5ed..b5c2030bea6a9517cb02c457e55b4d145286b0b1 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -112,7 +112,7 @@ RuleFeatureSet::InvalidationSetMode RuleFeatureSet::supportsClassDescendantInval
if (component->m_match == CSSSelector::Class || component->isAttributeSelector()) {
if (!foundDescendantRelation)
foundIdent = true;
- } else if (component->pseudoType() == CSSSelector::PseudoHost) {
+ } 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);
@@ -194,7 +194,7 @@ const CSSSelector* RuleFeatureSet::extractInvalidationSetFeatures(const CSSSelec
extractClassIdTagOrAttribute(*lastSelector, classes, id, tagName, attributes);
// Initialize the entry in the invalidation set map, if supported.
invalidationSetForSelector(*lastSelector);
- if (lastSelector->pseudoType() == CSSSelector::PseudoHost) {
+ if (lastSelector->pseudoType() == CSSSelector::PseudoHost || lastSelector->pseudoType() == CSSSelector::PseudoAny) {
if (const CSSSelectorList* selectorList = lastSelector->selectorList()) {
for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector))
extractInvalidationSetFeatures(*selector, classes, id, tagName, attributes);
@@ -219,7 +219,7 @@ void RuleFeatureSet::addFeaturesToInvalidationSets(const CSSSelector& selector,
invalidationSet->addClass(*it);
for (Vector<AtomicString>::const_iterator it = attributes.begin(); it != attributes.end(); ++it)
invalidationSet->addAttribute(*it);
- } else if (current->pseudoType() == CSSSelector::PseudoHost) {
+ } else if (current->pseudoType() == CSSSelector::PseudoHost || current->pseudoType() == CSSSelector::PseudoAny) {
if (const CSSSelectorList* selectorList = current->selectorList()) {
for (const CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(*selector))
addFeaturesToInvalidationSets(*selector, classes, id, tagName, attributes);
« no previous file with comments | « LayoutTests/fast/css/invalidation/targeted-class-any-pseudo-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698