summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/css/CSSGrammar.y
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-06-02 12:07:03 +0100
committerBen Murdoch <benm@google.com>2011-06-10 10:47:21 +0100
commit2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch)
treee4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebCore/css/CSSGrammar.y
parent87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff)
downloadexternal_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz
external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebCore/css/CSSGrammar.y')
-rw-r--r--Source/WebCore/css/CSSGrammar.y19
1 files changed, 4 insertions, 15 deletions
diff --git a/Source/WebCore/css/CSSGrammar.y b/Source/WebCore/css/CSSGrammar.y
index 246a449..269eaf0 100644
--- a/Source/WebCore/css/CSSGrammar.y
+++ b/Source/WebCore/css/CSSGrammar.y
@@ -99,7 +99,7 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
%}
-%expect 55
+%expect 54
%nonassoc LOWEST_PREC
@@ -226,7 +226,6 @@ static int cssyylex(YYSTYPE* yylval, void* parser)
%type <string> string_or_uri
%type <string> ident_or_string
%type <string> medium
-%type <string> hexcolor
%type <marginBox> margin_sym
%type <string> media_feature
@@ -1414,7 +1413,7 @@ term:
| unary_operator DIMEN maybe_space { $$.id = 0; $$.string = $2; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; }
| URI maybe_space { $$.id = 0; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_URI; }
| UNICODERANGE maybe_space { $$.id = 0; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; }
- | hexcolor { $$.id = 0; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; }
+ | HEX maybe_space { $$.id = 0; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; }
| '#' maybe_space { $$.id = 0; $$.string = CSSParserString(); $$.unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; } /* Handle error case: "color: #;" */
/* FIXME: according to the specs a function can have a unary_operator in front. I know no case where this makes sense */
| function {
@@ -1520,7 +1519,8 @@ calc_func_paren_expr:
$$->insertValueAt(0, v);
v.iValue = ')';
$$->addValue(v);
- }
+ } else
+ $$ = 0;
}
calc_func_expr:
@@ -1619,17 +1619,6 @@ min_or_max_function:
}
;
-/*
- * There is a constraint on the color that it must
- * have either 3 or 6 hex-digits (i.e., [0-9a-fA-F])
- * after the "#"; e.g., "#000" is OK, but "#abcd" is not.
- */
-hexcolor:
- HEX maybe_space { $$ = $1; }
- | IDSEL maybe_space { $$ = $1; }
- ;
-
-
/* error handling rules */
save_block: