Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Unified Diff: Source/core/css/CSSParser.cpp

Issue 15657003: Make a '::distributed' pseudo element the first-ever client who can accept a relative selector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Introduce m_relationIsForShadowDistributed Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSGrammar.y.in ('k') | Source/core/css/CSSParserValues.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/css/CSSGrammar.y.in ('k') | Source/core/css/CSSParserValues.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698