| Index: Source/core/css/SelectorChecker.h
|
| diff --git a/Source/core/css/SelectorChecker.h b/Source/core/css/SelectorChecker.h
|
| index 0137d9cc8d9d4f554f63d88032a5b754982169bb..d78a0bbfa8b7aac3dbbc5eb770fe83b861bff982 100644
|
| --- a/Source/core/css/SelectorChecker.h
|
| +++ b/Source/core/css/SelectorChecker.h
|
| @@ -53,10 +53,10 @@ public:
|
| StaysWithinTreeScope = 2,
|
| BoundaryBehaviorMask = 3, // 2bit for boundary behavior
|
| ScopeContainsLastMatchedElement = 4,
|
| - ScopeIsShadowHost = 8,
|
| + ScopeIsShadowRoot = 8,
|
| TreatShadowHostAsNormalScope = 16,
|
|
|
| - ScopeIsShadowHostInPseudoHostParameter = ScopeIsShadowHost | TreatShadowHostAsNormalScope
|
| + ScopeIsShadowHostInPseudoHostParameter = ScopeIsShadowRoot | TreatShadowHostAsNormalScope
|
| };
|
|
|
| struct SelectorCheckingContext {
|
| @@ -179,11 +179,7 @@ inline bool SelectorChecker::checkExactAttribute(const Element& element, const Q
|
|
|
| inline bool SelectorChecker::isHostInItsShadowTree(const Element& element, BehaviorAtBoundary behaviorAtBoundary, const ContainerNode* scope)
|
| {
|
| - if ((behaviorAtBoundary & (ScopeIsShadowHost | TreatShadowHostAsNormalScope)) == ScopeIsShadowHost)
|
| - return scope == element;
|
| - if (scope && scope->isInShadowTree())
|
| - return scope->shadowHost() == element;
|
| - return false;
|
| + return scope && scope->isInShadowTree() && scope->shadowHost() == element;
|
| }
|
|
|
| }
|
|
|