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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App le Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App le Inc. All rights reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2012 Intel Corporation. All rights reserved. 6 * Copyright (C) 2012 Intel Corporation. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 case IDSEL: 70 case IDSEL:
71 case DIMEN: 71 case DIMEN:
72 case INVALIDDIMEN: 72 case INVALIDDIMEN:
73 case URI: 73 case URI:
74 case FUNCTION: 74 case FUNCTION:
75 case ANYFUNCTION: 75 case ANYFUNCTION:
76 case NOTFUNCTION: 76 case NOTFUNCTION:
77 case CALCFUNCTION: 77 case CALCFUNCTION:
78 case MINFUNCTION: 78 case MINFUNCTION:
79 case MAXFUNCTION: 79 case MAXFUNCTION:
80 case VARFUNCTION:
80 case VAR_DEFINITION: 81 case VAR_DEFINITION:
81 case UNICODERANGE: 82 case UNICODERANGE:
82 return true; 83 return true;
83 default: 84 default:
84 return false; 85 return false;
85 } 86 }
86 } 87 }
87 88
88 inline static CSSParserValue makeOperatorValue(int value) 89 inline static CSSParserValue makeOperatorValue(int value)
89 { 90 {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 %left '|' 126 %left '|'
126 127
127 %token IMPORT_SYM 128 %token IMPORT_SYM
128 %token PAGE_SYM 129 %token PAGE_SYM
129 %token MEDIA_SYM 130 %token MEDIA_SYM
130 %token SUPPORTS_SYM 131 %token SUPPORTS_SYM
131 %token FONT_FACE_SYM 132 %token FONT_FACE_SYM
132 %token HOST_SYM 133 %token HOST_SYM
133 %token CHARSET_SYM 134 %token CHARSET_SYM
134 %token NAMESPACE_SYM 135 %token NAMESPACE_SYM
135 %token VARFUNCTION
136 %token VIEWPORT_RULE_SYM 136 %token VIEWPORT_RULE_SYM
137 %token INTERNAL_DECLS_SYM 137 %token INTERNAL_DECLS_SYM
138 %token INTERNAL_MEDIALIST_SYM 138 %token INTERNAL_MEDIALIST_SYM
139 %token INTERNAL_RULE_SYM 139 %token INTERNAL_RULE_SYM
140 %token INTERNAL_SELECTOR_SYM 140 %token INTERNAL_SELECTOR_SYM
141 %token INTERNAL_VALUE_SYM 141 %token INTERNAL_VALUE_SYM
142 %token INTERNAL_KEYFRAME_RULE_SYM 142 %token INTERNAL_KEYFRAME_RULE_SYM
143 %token INTERNAL_SUPPORTS_CONDITION_SYM 143 %token INTERNAL_SUPPORTS_CONDITION_SYM
144 %token WEBKIT_KEYFRAMES_SYM 144 %token WEBKIT_KEYFRAMES_SYM
145 %token WEBKIT_REGION_RULE_SYM 145 %token WEBKIT_REGION_RULE_SYM
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 %token <string> URI 208 %token <string> URI
209 %token <string> FUNCTION 209 %token <string> FUNCTION
210 %token <string> ANYFUNCTION 210 %token <string> ANYFUNCTION
211 %token <string> CUEFUNCTION 211 %token <string> CUEFUNCTION
212 %token <string> NOTFUNCTION 212 %token <string> NOTFUNCTION
213 %token <string> DISTRIBUTEDFUNCTION 213 %token <string> DISTRIBUTEDFUNCTION
214 %token <string> CALCFUNCTION 214 %token <string> CALCFUNCTION
215 %token <string> MINFUNCTION 215 %token <string> MINFUNCTION
216 %token <string> MAXFUNCTION 216 %token <string> MAXFUNCTION
217 %token <string> VARFUNCTION
217 %token <string> VAR_DEFINITION 218 %token <string> VAR_DEFINITION
218 219
219 %token <string> UNICODERANGE 220 %token <string> UNICODERANGE
220 221
221 %type <relation> combinator 222 %type <relation> combinator
222 223
223 %type <rule> charset 224 %type <rule> charset
224 %type <rule> ruleset 225 %type <rule> ruleset
225 %type <rule> media 226 %type <rule> media
226 %type <rule> import 227 %type <rule> import
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 | unary_operator DIMEN maybe_space { $$.id = CSSValueInvalid; $$.string = $2; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; } 1634 | unary_operator DIMEN maybe_space { $$.id = CSSValueInvalid; $$.string = $2; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; }
1634 | URI maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrim itiveValue::CSS_URI; } 1635 | URI maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrim itiveValue::CSS_URI; }
1635 | UNICODERANGE maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; } 1636 | UNICODERANGE maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; }
1636 | HEX maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrim itiveValue::CSS_PARSER_HEXCOLOR; } 1637 | HEX maybe_space { $$.id = CSSValueInvalid; $$.string = $1; $$.unit = CSSPrim itiveValue::CSS_PARSER_HEXCOLOR; }
1637 | '#' maybe_space { $$.id = CSSValueInvalid; $$.string = CSSParserString(); $$ .unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; } /* Handle error case: "color: #;" */ 1638 | '#' maybe_space { $$.id = CSSValueInvalid; $$.string = CSSParserString(); $$ .unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; } /* Handle error case: "color: #;" */
1638 | VARFUNCTION maybe_space IDENT closing_parenthesis maybe_space { 1639 | VARFUNCTION maybe_space IDENT closing_parenthesis maybe_space {
1639 $$.id = CSSValueInvalid; 1640 $$.id = CSSValueInvalid;
1640 $$.string = $3; 1641 $$.string = $3;
1641 $$.unit = CSSPrimitiveValue::CSS_VARIABLE_NAME; 1642 $$.unit = CSSPrimitiveValue::CSS_VARIABLE_NAME;
1642 } 1643 }
1644 | VARFUNCTION maybe_space expr_recovery closing_parenthesis {
1645 YYERROR;
1646 }
1643 /* FIXME: according to the specs a function can have a unary_operator in front . I know no case where this makes sense */ 1647 /* FIXME: according to the specs a function can have a unary_operator in front . I know no case where this makes sense */
1644 | function maybe_space { 1648 | function maybe_space {
1645 $$ = $1; 1649 $$ = $1;
1646 } 1650 }
1647 | calc_function maybe_space { 1651 | calc_function maybe_space {
1648 $$ = $1; 1652 $$ = $1;
1649 } 1653 }
1650 | min_or_max_function maybe_space { 1654 | min_or_max_function maybe_space {
1651 $$ = $1; 1655 $$ = $1;
1652 } 1656 }
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 1876
1873 rule_error_recovery: 1877 rule_error_recovery:
1874 /* empty */ 1878 /* empty */
1875 | rule_error_recovery error 1879 | rule_error_recovery error
1876 | rule_error_recovery invalid_square_brackets_block 1880 | rule_error_recovery invalid_square_brackets_block
1877 | rule_error_recovery invalid_parentheses_block 1881 | rule_error_recovery invalid_parentheses_block
1878 ; 1882 ;
1879 1883
1880 %% 1884 %%
1881 1885
OLDNEW
« 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