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

Side by Side 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: Added tests for out-of-range percentage key values 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 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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 848
849 key: 849 key:
850 maybe_unary_operator PERCENTAGE { $$.id = 0; $$.isInt = false; $$.fValue = $ 1 * $2; $$.unit = CSSPrimitiveValue::CSS_NUMBER; } 850 maybe_unary_operator PERCENTAGE { $$.id = 0; $$.isInt = false; $$.fValue = $ 1 * $2; $$.unit = CSSPrimitiveValue::CSS_NUMBER; }
851 | IDENT { 851 | IDENT {
852 $$.id = 0; $$.isInt = false; $$.unit = CSSPrimitiveValue::CSS_NUMBER; 852 $$.id = 0; $$.isInt = false; $$.unit = CSSPrimitiveValue::CSS_NUMBER;
853 CSSParserString& str = $1; 853 CSSParserString& str = $1;
854 if (str.equalIgnoringCase("from")) 854 if (str.equalIgnoringCase("from"))
855 $$.fValue = 0; 855 $$.fValue = 0;
856 else if (str.equalIgnoringCase("to")) 856 else if (str.equalIgnoringCase("to"))
857 $$.fValue = 100; 857 $$.fValue = 100;
858 else 858 else {
859 $$.unit = 0;
859 YYERROR; 860 YYERROR;
861 }
862 }
863 | error {
864 $$.unit = 0;
860 } 865 }
861 ; 866 ;
862 867
863 before_page_rule: 868 before_page_rule:
864 /* empty */ { 869 /* empty */ {
865 parser->startRuleHeader(CSSRuleSourceData::PAGE_RULE); 870 parser->startRuleHeader(CSSRuleSourceData::PAGE_RULE);
866 } 871 }
867 ; 872 ;
868 873
869 page: 874 page:
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 } 2006 }
2002 ; 2007 ;
2003 2008
2004 error_location: { 2009 error_location: {
2005 $$ = parser->currentLocation(); 2010 $$ = parser->currentLocation();
2006 } 2011 }
2007 ; 2012 ;
2008 2013
2009 %% 2014 %%
2010 2015
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/webkit-keyframes-errors-expected.html ('k') | Source/core/css/CSSParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698