Index: third_party/WebKit/Source/core/css/SelectorFilter.cpp |
diff --git a/third_party/WebKit/Source/core/css/SelectorFilter.cpp b/third_party/WebKit/Source/core/css/SelectorFilter.cpp |
index 82863003a1d44c11bb03945fe377ea5c63303b56..8f742992eaacf4a0c2abcb4d07071fcc6a05300f 100644 |
--- a/third_party/WebKit/Source/core/css/SelectorFilter.cpp |
+++ b/third_party/WebKit/Source/core/css/SelectorFilter.cpp |
@@ -134,7 +134,7 @@ void SelectorFilter::collectIdentifierHashes(const CSSSelector& selector, unsign |
unsigned* hash = identifierHashes; |
unsigned* end = identifierHashes + maximumIdentifierCount; |
CSSSelector::Relation relation = selector.relation(); |
- bool relationIsAffectedByPseudoContent = selector.relationIsAffectedByPseudoContent(); |
+ bool relationIsAffectedByPseudoContentOrSlotted = selector.relationIsAffectedByPseudoContent() || selector.pseudoType() == CSSSelector::PseudoSlotted; |
rune
2016/01/20 12:53:32
I think this code is a bit more advanced than it n
kochi
2016/01/21 05:09:37
Done.
|
// Skip the topmost selector. It is handled quickly by the rule hashes. |
bool skipOverSubselectors = true; |
@@ -151,7 +151,8 @@ void SelectorFilter::collectIdentifierHashes(const CSSSelector& selector, unsign |
break; |
case CSSSelector::Descendant: |
case CSSSelector::Child: |
- if (relationIsAffectedByPseudoContent) { |
+ case CSSSelector::ShadowSlot: |
+ if (relationIsAffectedByPseudoContentOrSlotted) { |
// Disable fastRejectSelector. |
*identifierHashes = 0; |
return; |
@@ -162,14 +163,11 @@ void SelectorFilter::collectIdentifierHashes(const CSSSelector& selector, unsign |
skipOverSubselectors = false; |
collectDescendantSelectorIdentifierHashes(*current, hash); |
break; |
- case CSSSelector::ShadowSlot: |
- // TODO(kochi): Add this in later CL. |
- break; |
} |
if (hash == end) |
return; |
relation = current->relation(); |
- relationIsAffectedByPseudoContent = current->relationIsAffectedByPseudoContent(); |
+ relationIsAffectedByPseudoContentOrSlotted = current->relationIsAffectedByPseudoContent() || current->pseudoType() == CSSSelector::PseudoSlotted; |
rune
2016/01/20 12:53:32
This can be replaced with:
if (current->relationI
kochi
2016/01/21 05:09:37
Done.
|
} |
*hash = 0; |
} |