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

Unified Diff: Source/core/css/CSSGrammar.y.in

Issue 13871007: Add CSS parser recovery from errors while parsing @-webkit-keyframes key values. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Introduced + made use of the CSSParserValue::Invalid enum value to avoid overloading isInt Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
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..08f5d070c4ac42619dc482b5bc00dfcb1a92e491 100644
--- a/Source/core/css/CSSGrammar.y.in
+++ b/Source/core/css/CSSGrammar.y.in
@@ -855,8 +855,13 @@ key:
$$.fValue = 0;
else if (str.equalIgnoringCase("to"))
$$.fValue = 100;
- else
+ else {
+ $$.unit = CSSParserValue::Invalid;
YYERROR;
+ }
+ }
+ | error {
+ $$.unit = CSSParserValue::Invalid;
}
;

Powered by Google App Engine
This is Rietveld 408576698