| OLD | NEW |
| 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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 $$->addValue(parser->sinkFloatingValue($1)); | 840 $$->addValue(parser->sinkFloatingValue($1)); |
| 841 } | 841 } |
| 842 | key_list maybe_space ',' maybe_space key { | 842 | key_list maybe_space ',' maybe_space key { |
| 843 $$ = $1; | 843 $$ = $1; |
| 844 if ($$) | 844 if ($$) |
| 845 $$->addValue(parser->sinkFloatingValue($5)); | 845 $$->addValue(parser->sinkFloatingValue($5)); |
| 846 } | 846 } |
| 847 ; | 847 ; |
| 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 { |
| 851 $$.id = 0; $$.isInt = false; |
| 852 if ($1 > 0 && $2 <= 100) { |
| 853 $$.fValue = $1 * $2; $$.unit = CSSPrimitiveValue::CSS_NUMBER; |
| 854 } else { |
| 855 $$.fValue = 0; $$.unit = CSSPrimitiveValue::CSS_UNKNOWN; |
| 856 } |
| 857 } |
| 851 | IDENT { | 858 | IDENT { |
| 852 $$.id = 0; $$.isInt = false; $$.unit = CSSPrimitiveValue::CSS_NUMBER; | 859 $$.id = 0; $$.isInt = false; $$.unit = CSSPrimitiveValue::CSS_NUMBER; |
| 853 CSSParserString& str = $1; | 860 CSSParserString& str = $1; |
| 854 if (str.equalIgnoringCase("from")) | 861 if (str.equalIgnoringCase("from")) |
| 855 $$.fValue = 0; | 862 $$.fValue = 0; |
| 856 else if (str.equalIgnoringCase("to")) | 863 else if (str.equalIgnoringCase("to")) |
| 857 $$.fValue = 100; | 864 $$.fValue = 100; |
| 858 else | 865 else |
| 859 YYERROR; | 866 YYERROR; |
| 860 } | 867 } |
| (...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 } | 2008 } |
| 2002 ; | 2009 ; |
| 2003 | 2010 |
| 2004 error_location: { | 2011 error_location: { |
| 2005 $$ = parser->currentLocation(); | 2012 $$ = parser->currentLocation(); |
| 2006 } | 2013 } |
| 2007 ; | 2014 ; |
| 2008 | 2015 |
| 2009 %% | 2016 %% |
| 2010 | 2017 |
| OLD | NEW |