$NetBSD: patch-ae,v 1.1 2008/12/11 20:53:04 jmcneill Exp $ https://bugs.webkit.org/show_bug.cgi?id=22205 --- WebCore/css/CSSGrammar.y.orig 2008-08-08 00:50:53.000000000 -0400 +++ WebCore/css/CSSGrammar.y 2008-12-11 15:46:35.000000000 -0500 @@ -93,6 +93,8 @@ %expect 48 +%nonassoc LOWEST_PREC + %left UNIMPORTANT_TOK %token WHITESPACE SGML_CD @@ -335,7 +337,7 @@ closing_brace: '}' - | %prec maybe_sgml TOKEN_EOF + | %prec LOWEST_PREC TOKEN_EOF ; charset: @@ -1323,10 +1325,10 @@ $$.string = $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 = 0; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_DIMENSION } - | unary_operator DIMEN maybe_space { $$.id = 0; $$.string = $2; $$.unit = CSSPrimitiveValue::CSS_DIMENSION } + | DIMEN maybe_space { $$.id = 0; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_DIMENSION; } + | 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 } + | UNICODERANGE maybe_space { $$.id = 0; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; } | hexcolor { $$.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 */