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

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

Issue 16183002: Unprefix CSS Variables (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased and updated prefix test Created 7 years, 6 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 | « LayoutTests/inspector/styles/variables/css-variables-expected.txt ('k') | Source/core/css/CSSParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSGrammar.y.in
diff --git a/Source/core/css/CSSGrammar.y.in b/Source/core/css/CSSGrammar.y.in
index 77d56691c27d12b5653215bc4bdbf322931767f0..75786d133c70685e6606ac23f93b8346c8e0edf2 100644
--- a/Source/core/css/CSSGrammar.y.in
+++ b/Source/core/css/CSSGrammar.y.in
@@ -77,6 +77,7 @@ static inline bool isCSSTokenAString(int yytype)
case CALCFUNCTION:
case MINFUNCTION:
case MAXFUNCTION:
+ case VARFUNCTION:
case VAR_DEFINITION:
case UNICODERANGE:
return true;
@@ -132,7 +133,6 @@ inline static CSSParserValue makeOperatorValue(int value)
%token HOST_SYM
%token CHARSET_SYM
%token NAMESPACE_SYM
-%token VARFUNCTION
%token VIEWPORT_RULE_SYM
%token INTERNAL_DECLS_SYM
%token INTERNAL_MEDIALIST_SYM
@@ -214,6 +214,7 @@ inline static CSSParserValue makeOperatorValue(int value)
%token <string> CALCFUNCTION
%token <string> MINFUNCTION
%token <string> MAXFUNCTION
+%token <string> VARFUNCTION
%token <string> VAR_DEFINITION
%token <string> UNICODERANGE
@@ -1640,6 +1641,9 @@ term:
$$.string = $3;
$$.unit = CSSPrimitiveValue::CSS_VARIABLE_NAME;
}
+ | VARFUNCTION maybe_space expr_recovery closing_parenthesis {
+ YYERROR;
+ }
/* FIXME: according to the specs a function can have a unary_operator in front. I know no case where this makes sense */
| function maybe_space {
$$ = $1;
« no previous file with comments | « LayoutTests/inspector/styles/variables/css-variables-expected.txt ('k') | Source/core/css/CSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698