Changeset 151488 in webkit
- Timestamp:
- Jun 12, 2013 12:20:20 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r151486 r151488 1 2013-06-12 Sergio Villar Senin <svillar@igalia.com> 2 3 Add CSS parsing recovery to functions 4 https://bugs.webkit.org/show_bug.cgi?id=117500 5 6 Reviewed by Andreas Kling. 7 8 From Blink r150205 by <serya@chromium.org> 9 10 * fast/css/parsing-error-recovery.html: added some test cases for 11 parsing recovery inside functions. 12 1 13 2013-06-11 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 14 -
trunk/LayoutTests/fast/css/parsing-error-recovery.html
r150803 r151488 61 61 } 62 62 63 #test8 { 64 color: rgb(1,}); 65 display: none; 66 } 67 68 #test9 { 69 color: rgb(}); 70 display: none; 71 } 72 73 #test10 { 74 width: calc(1,}); 75 display: none; 76 } 77 78 #test11 { 79 width: calc(}); 80 display: none; 81 } 82 83 #test12 { 84 width: -webkit-min(1,}); 85 display: none; 86 } 87 88 #test13 { 89 width: -webkit-min(}); 90 display: none; 91 } 92 63 93 /* Successfully parsed */ 64 94 #last { … … 75 105 <div class="to_be_hidden" id="test6">FAIL: Test 6</div> 76 106 <div class="to_be_hidden" id="test7">FAIL: Test 7</div> 107 <div class="to_be_hidden" id="test8">FAIL: Test 8</div> 108 <div class="to_be_hidden" id="test9">FAIL: Test 9</div> 109 <div class="to_be_hidden" id="test10">FAIL: Test 10</div> 110 <div class="to_be_hidden" id="test11">FAIL: Test 11</div> 111 <div class="to_be_hidden" id="test12">FAIL: Test 12</div> 112 <div class="to_be_hidden" id="test13">FAIL: Test 13</div> 77 113 <div class="to_be_shown" id="last">PASS</div> 78 114 </body> -
trunk/Source/WebCore/ChangeLog
r151487 r151488 1 2013-06-12 Sergio Villar Senin <svillar@igalia.com> 2 3 Add CSS parsing recovery to functions 4 https://bugs.webkit.org/show_bug.cgi?id=117500 5 6 Reviewed by Andreas Kling. 7 8 From Blink r150205 by <serya@chromium.org> 9 10 Add parsing recovery capabilities to functions. Errors were 11 correctly detected without this change but then the whole 12 declaration was invalidated. By using expr_recovery to handle them 13 we can recover from those errors and go on with the parsing. 14 15 * css/CSSGrammar.y.in: 16 1 17 2013-06-11 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 18 -
trunk/Source/WebCore/css/CSSGrammar.y.in
r151424 r151488 89 89 90 90 #if ENABLE_SHADOW_DOM 91 %expect 3 391 %expect 32 92 92 #else 93 %expect 3 293 %expect 31 94 94 #endif 95 95 … … 1701 1701 } 1702 1702 /* FIXME: according to the specs a function can have a unary_operator in front. I know no case where this makes sense */ 1703 | function {1703 | function maybe_space { 1704 1704 $$ = $1; 1705 1705 } 1706 | calc_function {1706 | calc_function maybe_space { 1707 1707 $$ = $1; 1708 1708 } 1709 | min_or_max_function {1709 | min_or_max_function maybe_space { 1710 1710 $$ = $1; 1711 1711 } … … 1754 1754 1755 1755 function: 1756 FUNCTION maybe_space expr closing_parenthesis maybe_space{1756 FUNCTION maybe_space expr closing_parenthesis { 1757 1757 CSSParserFunction* f = parser->createFloatingFunction(); 1758 1758 f->name = $1; … … 1762 1762 $$.function = f; 1763 1763 } | 1764 FUNCTION maybe_space closing_parenthesis maybe_space{1764 FUNCTION maybe_space closing_parenthesis { 1765 1765 CSSParserFunction* f = parser->createFloatingFunction(); 1766 1766 f->name = $1; … … 1771 1771 $$.function = f; 1772 1772 } | 1773 FUNCTION maybe_space e rror{1773 FUNCTION maybe_space expr_recovery closing_parenthesis { 1774 1774 CSSParserFunction* f = parser->createFloatingFunction(); 1775 1775 f->name = $1; … … 1884 1884 1885 1885 calc_function: 1886 CALCFUNCTION maybe_space calc_func_expr calc_maybe_space closing_parenthesis maybe_space{1886 CALCFUNCTION maybe_space calc_func_expr calc_maybe_space closing_parenthesis { 1887 1887 CSSParserFunction* f = parser->createFloatingFunction(); 1888 1888 f->name = $1; … … 1892 1892 $$.function = f; 1893 1893 } 1894 | CALCFUNCTION maybe_space e rror{1894 | CALCFUNCTION maybe_space expr_recovery closing_parenthesis { 1895 1895 YYERROR; 1896 1896 } … … 1908 1908 1909 1909 min_or_max_function: 1910 min_or_max maybe_space calc_func_expr_list closing_parenthesis maybe_space{1910 min_or_max maybe_space calc_func_expr_list closing_parenthesis { 1911 1911 CSSParserFunction* f = parser->createFloatingFunction(); 1912 1912 f->name = $1; … … 1916 1916 $$.function = f; 1917 1917 } 1918 | min_or_max maybe_space e rror{1918 | min_or_max maybe_space expr_recovery closing_parenthesis { 1919 1919 YYERROR; 1920 1920 }
Note: See TracChangeset
for help on using the changeset viewer.