Index: Source/core/css/SelectorChecker.cpp |
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp |
index 83687cb3f47969a7e089ebe09e8755192da85d0f..2f6f10fa0ad929a9ac820eecdf68d477ba54ef3f 100644 |
--- a/Source/core/css/SelectorChecker.cpp |
+++ b/Source/core/css/SelectorChecker.cpp |
@@ -138,9 +138,6 @@ SelectorChecker::Match SelectorChecker::match(const SelectorCheckingContext& con |
if (context.selector->isCustomPseudoElement()) { |
if (!matchesCustomPseudoElement(context.element, *context.selector)) |
return SelectorFailsLocally; |
- } else if (context.selector->isContentPseudoElement()) { |
- if (!context.element->isInShadowTree() || !context.element->isInsertionPoint()) |
- return SelectorFailsLocally; |
} else { |
if ((!context.elementStyle && m_mode == ResolvingStyle) || m_mode == QueryingRules) |
return SelectorFailsLocally; |
@@ -263,6 +260,10 @@ SelectorChecker::Match SelectorChecker::matchForRelation(const SelectorCheckingC |
nextContext.elementStyle = 0; |
return match(nextContext, siblingTraversalStrategy, result); |
} |
+ |
+ case CSSSelector::ShadowContent: |
+ return matchForShadowDistributed(context.element, siblingTraversalStrategy, nextContext, result); |
+ |
case CSSSelector::DirectAdjacent: |
if (m_mode == ResolvingStyle) { |
if (Node* parent = context.element->parentElementOrShadowRoot()) |