Changeset 150682 in webkit


Ignore:
Timestamp:
May 25, 2013 1:29:42 AM (11 years ago)
Author:
sergio@webkit.org
Message:

Reducing CSS code duplication in declaration list error recovery
https://bugs.webkit.org/show_bug.cgi?id=115157

Reviewed by Andreas Kling.

From Blink r148974 by <serya@chromium.org>

Refactor "invalid_block_list error | /* empty */" in a new
decl_list_recovery rule that allows to remove 4 redundant rules.

No new test required as we're just refactoring code, no new behaviour.

  • css/CSSGrammar.y.in:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150675 r150682  
     12013-05-25  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        Reducing CSS code duplication in declaration list error recovery
     4        https://bugs.webkit.org/show_bug.cgi?id=115157
     5
     6        Reviewed by Andreas Kling.
     7
     8        From Blink r148974 by <serya@chromium.org>
     9
     10        Refactor "invalid_block_list error | /* empty */" in a new
     11        decl_list_recovery rule that allows to remove 4 redundant rules.
     12
     13        No new test required as we're just refactoring code, no new behaviour.
     14
     15        * css/CSSGrammar.y.in:
     16
    1172013-05-24  Ryosuke Niwa  <rniwa@webkit.org>
    218
  • trunk/Source/WebCore/css/CSSGrammar.y.in

    r150672 r150682  
    15331533        $$ = $1;
    15341534    }
    1535     | errors invalid_block_list error {
     1535    | errors decl_list_recovery {
    15361536        parser->syntaxError($1, CSSParser::PropertyDeclarationError);
    15371537        $$ = false;
    15381538    }
    1539     | errors {
    1540         parser->syntaxError($1, CSSParser::PropertyDeclarationError);
    1541         $$ = false;
    1542     }
    1543     | decl_list errors {
    1544         parser->syntaxError($2, CSSParser::PropertyDeclarationError);
    1545         $$ = $1;
    1546     }
    1547     | decl_list errors invalid_block_list error {
     1539    | decl_list errors decl_list_recovery {
    15481540        parser->syntaxError($2, CSSParser::PropertyDeclarationError);
    15491541        $$ = $1;
     
    15641556        $$ = false;
    15651557    }
    1566     | errors ';' maybe_space {
     1558    | errors decl_list_recovery ';' maybe_space {
    15671559        parser->syntaxError($1, CSSParser::PropertyDeclarationError);
    15681560        parser->markPropertyStart();
    15691561        $$ = false;
    15701562    }
    1571     | errors invalid_block_list error ';' maybe_space {
    1572         parser->syntaxError($1, CSSParser::PropertyDeclarationError);
    1573         $$ = false;
    1574     }
    15751563    | decl_list declaration ';' maybe_space {
    15761564        parser->markPropertyStart();
     
    15791567            $$ = $2;
    15801568    }
    1581     | decl_list errors ';' maybe_space {
     1569    | decl_list errors decl_list_recovery ';' maybe_space {
    15821570        parser->syntaxError($2, CSSParser::PropertyDeclarationError);
    15831571        parser->markPropertyStart();
    15841572        $$ = $1;
    15851573    }
    1586     | decl_list errors invalid_block_list error ';' maybe_space {
    1587         parser->syntaxError($2, CSSParser::PropertyDeclarationError);
    1588         parser->markPropertyStart();
    1589         $$ = $1;
    1590     }
     1574    ;
     1575
     1576decl_list_recovery:
     1577    invalid_block_list error
     1578    | /* empty */
    15911579    ;
    15921580
Note: See TracChangeset for help on using the changeset viewer.