| Index: Source/core/css/SelectorChecker.cpp
|
| diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
|
| index 3fc552e4cba3aaa4d8a168bb8228fd9fc76918f3..64c6fd2bcf6d5729ce0352a6464c895ad4eb5d6a 100644
|
| --- a/Source/core/css/SelectorChecker.cpp
|
| +++ b/Source/core/css/SelectorChecker.cpp
|
| @@ -69,11 +69,12 @@ SelectorChecker::SelectorChecker(Document& document, Mode mode)
|
| static bool matchesCustomPseudoElement(const Element* element, const CSSSelector& selector)
|
| {
|
| ShadowRoot* root = element->containingShadowRoot();
|
| - if (!root || root->type() != ShadowRoot::UserAgentShadowRoot)
|
| + if (!root)
|
| return false;
|
| -
|
| if (element->shadowPseudoId() != selector.value())
|
| return false;
|
| + if (selector.pseudoType() == CSSSelector::PseudoWebKitCustomElement && root->type() != ShadowRoot::UserAgentShadowRoot)
|
| + return false;
|
|
|
| return true;
|
| }
|
|
|