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

Unified Diff: Source/core/css/CSSGrammar.y.in

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
Index: Source/core/css/CSSGrammar.y.in
diff --git a/Source/core/css/CSSGrammar.y.in b/Source/core/css/CSSGrammar.y.in
index e651d858f071a7c26d9fc6dd2b02a5cbfbe3d86a..8d1e9568c7272527449a65cce7a8ddc606098bbe 100644
--- a/Source/core/css/CSSGrammar.y.in
+++ b/Source/core/css/CSSGrammar.y.in
@@ -87,7 +87,7 @@ static inline bool isCSSTokenAString(int yytype)
%}
-%expect 28
+%expect 29
%nonassoc LOWEST_PREC
@@ -276,6 +276,7 @@ static inline bool isCSSTokenAString(int yytype)
%type <selector> specifier_list
%type <selector> simple_selector
%type <selector> selector
+%type <selector> relative_selector
%type <selectorList> selector_list
%type <selectorList> simple_selector_list
%type <selectorList> region_selector
@@ -1125,6 +1126,19 @@ selector_list:
}
;
+relative_selector:
+ combinator selector {
+ $$ = $2;
+ CSSParserSelector* end = $$;
+ while (end->tagHistory())
+ end = end->tagHistory();
+ end->setRelation($1);
+ }
+ | selector {
+ $$ = $1;
+ }
+ ;
+
selector_with_trailing_whitespace:
selector WHITESPACE {
$$ = $1;
@@ -1385,7 +1399,7 @@ pseudo:
| ':' ':' CUEFUNCTION selector_recovery ')' {
YYERROR;
}
- | ':' ':' DISTRIBUTEDFUNCTION maybe_space selector maybe_space ')' {
+ | ':' ':' DISTRIBUTEDFUNCTION maybe_space relative_selector maybe_space ')' {
if (!$5)
$$ = 0;
else {

Powered by Google App Engine
This is Rietveld 408576698