| Index: Source/core/css/CSSGrammar.y
|
| diff --git a/Source/core/css/CSSGrammar.y b/Source/core/css/CSSGrammar.y
|
| index 0f5879bb8cef4aecb9c95f69681e5c291761c0fd..b05e77a36a0f27c54027492cdf40170ac82b69e8 100644
|
| --- a/Source/core/css/CSSGrammar.y
|
| +++ b/Source/core/css/CSSGrammar.y
|
| @@ -137,6 +137,15 @@ inline static CSSParserValue makeOperatorValue(int value)
|
| return v;
|
| }
|
|
|
| +inline static CSSParserValue makeIdentValue(CSSParserString string)
|
| +{
|
| + CSSParserValue v;
|
| + v.id = cssValueKeywordID(string);
|
| + v.unit = CSSPrimitiveValue::CSS_IDENT;
|
| + v.string = string;
|
| + return v;
|
| +}
|
| +
|
| %}
|
|
|
| %expect 0
|
| @@ -372,6 +381,9 @@ inline static CSSParserValue makeOperatorValue(int value)
|
|
|
| %type <location> error_location
|
|
|
| +%type <valueList> ident_list
|
| +%type <value> track_names_list
|
| +
|
| %%
|
|
|
| stylesheet:
|
| @@ -1705,6 +1717,29 @@ prio:
|
| | /* empty */ { $$ = false; }
|
| ;
|
|
|
| +ident_list:
|
| + IDENT maybe_space {
|
| + $$ = parser->createFloatingValueList();
|
| + $$->addValue(makeIdentValue($1));
|
| + }
|
| + | ident_list IDENT maybe_space {
|
| + $$ = $1;
|
| + $$->addValue(makeIdentValue($2));
|
| + }
|
| + ;
|
| +
|
| +track_names_list:
|
| + '(' maybe_space closing_parenthesis {
|
| + $$.setFromValueList(parser->sinkFloatingValueList(parser->createFloatingValueList()));
|
| + }
|
| + | '(' maybe_space ident_list closing_parenthesis {
|
| + $$.setFromValueList(parser->sinkFloatingValueList($3));
|
| + }
|
| + | '(' maybe_space expr_recovery closing_parenthesis {
|
| + YYERROR;
|
| + }
|
| + ;
|
| +
|
| expr:
|
| term {
|
| $$ = parser->createFloatingValueList();
|
| @@ -1740,11 +1775,7 @@ term:
|
| unary_term maybe_space
|
| | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; }
|
| | STRING maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_STRING; }
|
| - | IDENT maybe_space {
|
| - $$.id = cssValueKeywordID($1);
|
| - $$.unit = CSSPrimitiveValue::CSS_IDENT;
|
| - $$.string = $1;
|
| - }
|
| + | IDENT maybe_space { $$ = makeIdentValue($1); }
|
| /* We might need to actually parse the number from a dimension, but we can't just put something that uses $$.string into unary_term. */
|
| | DIMEN maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; }
|
| | unary_operator DIMEN maybe_space { $$.id = CSSValueInvalid; $$.string = $2; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; }
|
| @@ -1767,6 +1798,7 @@ term:
|
| | '%' maybe_space { /* Handle width: %; */
|
| $$.id = CSSValueInvalid; $$.unit = 0;
|
| }
|
| + | track_names_list maybe_space
|
| ;
|
|
|
| unary_term:
|
|
|