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

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

Issue 15657003: Make a '::distributed' pseudo element the first-ever client who can accept a relative selector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Introduce m_relationIsForShadowDistributed Created 7 years, 7 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 | « Source/core/css/SelectorChecker.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorFilter.cpp
diff --git a/Source/core/css/SelectorFilter.cpp b/Source/core/css/SelectorFilter.cpp
index aedefed921e6c86a8825e2a4e13c8cead6813c42..632a7ec3f4023999d4a3655c0743fabdde6c1c01 100644
--- a/Source/core/css/SelectorFilter.cpp
+++ b/Source/core/css/SelectorFilter.cpp
@@ -135,6 +135,7 @@ void SelectorFilter::collectIdentifierHashes(const CSSSelector* selector, unsign
unsigned* hash = identifierHashes;
unsigned* end = identifierHashes + maximumIdentifierCount;
CSSSelector::Relation relation = selector->relation();
+ bool relationIsForShadowDistributed = selector->relationIsForShadowDistributed();
// Skip the topmost selector. It is handled quickly by the rule hashes.
bool skipOverSubselectors = true;
@@ -148,11 +149,14 @@ void SelectorFilter::collectIdentifierHashes(const CSSSelector* selector, unsign
case CSSSelector::DirectAdjacent:
case CSSSelector::IndirectAdjacent:
case CSSSelector::ShadowPseudo:
- case CSSSelector::ShadowDistributed:
skipOverSubselectors = true;
break;
case CSSSelector::Descendant:
case CSSSelector::Child:
+ if (relationIsForShadowDistributed) {
+ skipOverSubselectors = true;
+ break;
+ }
skipOverSubselectors = false;
collectDescendantSelectorIdentifierHashes(selector, hash);
break;
@@ -160,6 +164,7 @@ void SelectorFilter::collectIdentifierHashes(const CSSSelector* selector, unsign
if (hash == end)
return;
relation = selector->relation();
+ relationIsForShadowDistributed = selector->relationIsForShadowDistributed();
}
*hash = 0;
}
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698