| 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 140ebaf4873e55337e0a2c3c21baec57995eb83c..2fe5abdbc98f69c1b77c8b42f65ada541558ad3c 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.relationIsAffectedByPseudoSlotted();
|
|
|
| // 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;
|
| @@ -166,7 +167,7 @@ void SelectorFilter::collectIdentifierHashes(const CSSSelector& selector, unsign
|
| if (hash == end)
|
| return;
|
| relation = current->relation();
|
| - relationIsAffectedByPseudoContent = current->relationIsAffectedByPseudoContent();
|
| + relationIsAffectedByPseudoContentOrSlotted = current->relationIsAffectedByPseudoContent() || current->relationIsAffectedByPseudoSlotted();
|
| }
|
| *hash = 0;
|
| }
|
|
|