Index: Source/core/css/CSSParser.cpp |
diff --git a/Source/core/css/CSSParser.cpp b/Source/core/css/CSSParser.cpp |
index 6b03e4481980aaefa98df32f8ff6728d849f56c6..3b91746f407daf0bc72037f97a2ff4d085831073 100644 |
--- a/Source/core/css/CSSParser.cpp |
+++ b/Source/core/css/CSSParser.cpp |
@@ -11138,9 +11138,16 @@ CSSParserSelector* CSSParser::rewriteSpecifiersForShadowDistributed(CSSParserSel |
CSSParserSelector* end = argumentSelector; |
while (end->tagHistory()) |
end = end->tagHistory(); |
- end->setTagHistory(sinkFloatingSelector(specifiers)); |
- end->setRelation(CSSSelector::ShadowDistributed); |
- return argumentSelector; |
+ |
+ switch (end->relation()) { |
+ case CSSSelector::Child: |
+ case CSSSelector::Descendant: |
+ end->setTagHistory(sinkFloatingSelector(specifiers)); |
+ end->setRelationIsForShadowDistributed(); |
+ return argumentSelector; |
+ default: |
+ return 0; |
+ } |
} |
CSSParserSelector* CSSParser::rewriteSpecifiers(CSSParserSelector* specifiers, CSSParserSelector* newSpecifier) |