| Index: Source/core/css/CSSGrammar.y.in
|
| diff --git a/Source/core/css/CSSGrammar.y.in b/Source/core/css/CSSGrammar.y.in
|
| index 9543cbead6f9f1da23567ec934cb740a2cb4b194..5ee92d3e7abbd07a9a22b3c42d2eeb373315e78e 100644
|
| --- a/Source/core/css/CSSGrammar.y.in
|
| +++ b/Source/core/css/CSSGrammar.y.in
|
| @@ -847,7 +847,14 @@ key_list:
|
| ;
|
|
|
| key:
|
| - maybe_unary_operator PERCENTAGE { $$.id = 0; $$.isInt = false; $$.fValue = $1 * $2; $$.unit = CSSPrimitiveValue::CSS_NUMBER; }
|
| + maybe_unary_operator PERCENTAGE {
|
| + $$.id = 0; $$.isInt = false;
|
| + if ($1 > 0 && $2 <= 100) {
|
| + $$.fValue = $1 * $2; $$.unit = CSSPrimitiveValue::CSS_NUMBER;
|
| + } else {
|
| + $$.fValue = 0; $$.unit = CSSPrimitiveValue::CSS_UNKNOWN;
|
| + }
|
| + }
|
| | IDENT {
|
| $$.id = 0; $$.isInt = false; $$.unit = CSSPrimitiveValue::CSS_NUMBER;
|
| CSSParserString& str = $1;
|
|
|