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

Side by Side Diff: Source/core/css/parser/CSSGrammar.y

Issue 471893002: Support consecutive slash operators for border-image value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove white spaces Created 6 years, 4 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
OLDNEW
1 %{ 1 %{
2 2
3 /* 3 /*
4 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org) 4 * Copyright (C) 2002-2003 Lars Knoll (knoll@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App le Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 App le Inc. All rights reserved.
6 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2012 Intel Corporation. All rights reserved. 8 * Copyright (C) 2012 Intel Corporation. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 %type <boolean> decl_list 343 %type <boolean> decl_list
344 %type <boolean> declaration 344 %type <boolean> declaration
345 %type <boolean> declarations_and_margins 345 %type <boolean> declarations_and_margins
346 346
347 %type <boolean> prio 347 %type <boolean> prio
348 348
349 %type <integer> match 349 %type <integer> match
350 %type <integer> unary_operator 350 %type <integer> unary_operator
351 %type <integer> maybe_unary_operator 351 %type <integer> maybe_unary_operator
352 %type <character> operator 352 %type <character> operator
353 %type <character> slash_operator
353 354
354 %type <valueList> expr 355 %type <valueList> expr
355 %type <value> term 356 %type <value> term
356 %type <value> unary_term 357 %type <value> unary_term
357 %type <value> function 358 %type <value> function
358 %type <value> calc_func_term 359 %type <value> calc_func_term
359 %type <character> calc_func_operator 360 %type <character> calc_func_operator
360 %type <valueList> calc_func_expr 361 %type <valueList> calc_func_expr
361 %type <valueList> calc_func_paren_expr 362 %type <valueList> calc_func_paren_expr
362 %type <value> calc_function 363 %type <value> calc_function
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 } 1586 }
1586 | expr operator term { 1587 | expr operator term {
1587 $$ = $1; 1588 $$ = $1;
1588 $$->addValue(makeOperatorValue($2)); 1589 $$->addValue(makeOperatorValue($2));
1589 $$->addValue(parser->sinkFloatingValue($3)); 1590 $$->addValue(parser->sinkFloatingValue($3));
1590 } 1591 }
1591 | expr term { 1592 | expr term {
1592 $$ = $1; 1593 $$ = $1;
1593 $$->addValue(parser->sinkFloatingValue($2)); 1594 $$->addValue(parser->sinkFloatingValue($2));
1594 } 1595 }
1596 | expr slash_operator slash_operator term {
1597 $$ = $1;
1598 $$->addValue(makeOperatorValue($2));
1599 $$->addValue(makeOperatorValue($3));
1600 $$->addValue(parser->sinkFloatingValue($4));
1601 }
1595 ; 1602 ;
1596 1603
1597 expr_recovery: 1604 expr_recovery:
1598 error error_location error_recovery { 1605 error error_location error_recovery {
1599 parser->reportError($2, PropertyDeclarationCSSError); 1606 parser->reportError($2, PropertyDeclarationCSSError);
1600 } 1607 }
1601 ; 1608 ;
1602 1609
1610 slash_operator:
1611 '/' maybe_space {
1612 $$ = '/';
1613 }
1614 ;
1615
1603 operator: 1616 operator:
1604 '/' maybe_space { 1617 slash_operator
1605 $$ = '/';
1606 }
1607 | ',' maybe_space { 1618 | ',' maybe_space {
1608 $$ = ','; 1619 $$ = ',';
1609 } 1620 }
1610 ; 1621 ;
1611 1622
1612 term: 1623 term:
1613 unary_term maybe_space 1624 unary_term maybe_space
1614 | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; } 1625 | unary_operator unary_term maybe_space { $$ = $2; $$.fValue *= $1; }
1615 | STRING maybe_space { $$.id = CSSValueInvalid; $$.isInt = false; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_STRING; } 1626 | STRING maybe_space { $$.id = CSSValueInvalid; $$.isInt = false; $$.string = $1; $$.unit = CSSPrimitiveValue::CSS_STRING; }
1616 | IDENT maybe_space { $$ = makeIdentValue($1); } 1627 | IDENT maybe_space { $$ = makeIdentValue($1); }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 ; 1852 ;
1842 1853
1843 rule_error_recovery: 1854 rule_error_recovery:
1844 /* empty */ 1855 /* empty */
1845 | rule_error_recovery error 1856 | rule_error_recovery error
1846 | rule_error_recovery invalid_square_brackets_block 1857 | rule_error_recovery invalid_square_brackets_block
1847 | rule_error_recovery invalid_parentheses_block 1858 | rule_error_recovery invalid_parentheses_block
1848 ; 1859 ;
1849 1860
1850 %% 1861 %%
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698