No subject
Mon Jan 28 08:41:14 PST 2013
0205">r150205</a> by <serya at chromium.org>
Source/WebCore:
Add parsing recovery capabilities to functions. Errors were
correctly detected without this change but then the whole
declaration was invalidated. By using expr_recovery to handle them
we can recover from those errors and go on with the parsing.
* css/CSSGrammar.y.in:
LayoutTests:
* fast/css/parsing-error-recovery.html: added some test cases for
parsing recovery inside functions.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href=3D"#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a=
></li>
<li><a href=3D"#trunkLayoutTestsfastcssparsingerrorrecoveryhtml">trunk/La=
youtTests/fast/css/parsing-error-recovery.html</a></li>
<li><a href=3D"#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeL=
og</a></li>
<li><a href=3D"#trunkSourceWebCorecssCSSGrammaryin">trunk/Source/WebCore/=
css/CSSGrammar.y.in</a></li>
</ul>
</div>
<div id=3D"patch">
<h3>Diff</h3>
<a id=3D"trunkLayoutTestsChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (151487 =
=3D> 151488)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/ChangeLog 2013-06-12 06:05:58 =
UTC (rev 151487)
+++ trunk/LayoutTests/ChangeLog 2013-06-12 07:20:20 UTC (rev 151488)
</span><span class=3D"lines">@@ -1,3 +1,15 @@
</span><ins>+2013-06-12 Sergio Villar Senin <svillar at igalia.com>
+
+ Add CSS parsing recovery to functions
+ https://bugs.webkit.org/show_bug.cgi?id=3D117500
+
+ Reviewed by Andreas Kling.
+
+ From Blink r150205 by <serya at chromium.org>
+
+ * fast/css/parsing-error-recovery.html: added some test cases fo=
r
+ parsing recovery inside functions.
+
</ins><span class=3D"cx"> 2013-06-11 Gyuyoung Kim <gyuyoung.kim at sams=
ung.com>
</span><span class=3D"cx">=20
</span><span class=3D"cx"> Unreviewed, EFL Gardening. Unskip fast=
/canvas/webgl/context-attributes-alpha-depth-stencil-antialias.html
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssparsingerrorrecoveryhtml"></a>
<div class=3D"modfile"><h4>Modified: trunk/LayoutTests/fast/css/parsing-e=
rror-recovery.html (151487 =3D> 151488)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css/parsing-error-recover=
y.html 2013-06-12 06:05:58 UTC (rev 151487)
+++ trunk/LayoutTests/fast/css/parsing-error-recovery.html 2013-06-12 07:=
20:20 UTC (rev 151488)
</span><span class=3D"lines">@@ -60,6 +60,36 @@
</span><span class=3D"cx"> display: block !important {invalid=
_block}
</span><span class=3D"cx"> }
</span><span class=3D"cx">=20
</span><ins>+ #test8 {
+ color: rgb(1,});
+ display: none;
+ }
+
+ #test9 {
+ color: rgb(});
+ display: none;
+ }
+
+ #test10 {
+ width: calc(1,});
+ display: none;
+ }
+
+ #test11 {
+ width: calc(});
+ display: none;
+ }
+
+ #test12 {
+ width: -webkit-min(1,});
+ display: none;
+ }
+
+ #test13 {
+ width: -webkit-min(});
+ display: none;
+ }
+
</ins><span class=3D"cx"> /* Successfully parsed */
</span><span class=3D"cx"> #last {
</span><span class=3D"cx"> display:block;
</span><span class=3D"lines">@@ -74,6 +104,12 @@
</span><span class=3D"cx"> <div class=3D"to_be_hidden" id=3D=
"test5">FAIL: Test 5</div>
</span><span class=3D"cx"> <div class=3D"to_be_hidden" id=3D=
"test6">FAIL: Test 6</div>
</span><span class=3D"cx"> <div class=3D"to_be_hidden" id=3D=
"test7">FAIL: Test 7</div>
</span><ins>+ <div class=3D"to_be_hidden" id=3D"test8&=
quot;>FAIL: Test 8</div>
+ <div class=3D"to_be_hidden" id=3D"test9">FAI=
L: Test 9</div>
+ <div class=3D"to_be_hidden" id=3D"test10">FA=
IL: Test 10</div>
+ <div class=3D"to_be_hidden" id=3D"test11">FA=
IL: Test 11</div>
+ <div class=3D"to_be_hidden" id=3D"test12">FA=
IL: Test 12</div>
+ <div class=3D"to_be_hidden" id=3D"test13">FA=
IL: Test 13</div>
</ins><span class=3D"cx"> <div class=3D"to_be_shown" id=3D=
"last">PASS</div>
</span><span class=3D"cx"> </body>
</span><span class=3D"cx"> </html>
</span></span></pre></div>
<a id=3D"trunkSourceWebCoreChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (1514=
87 =3D> 151488)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/ChangeLog 2013-06-12 06:05:=
58 UTC (rev 151487)
+++ trunk/Source/WebCore/ChangeLog 2013-06-12 07:20:20 UTC (rev 151488)
</span><span class=3D"lines">@@ -1,3 +1,19 @@
</span><ins>+2013-06-12 Sergio Villar Senin <svillar at igalia.com>
+
+ Add CSS parsing recovery to functions
+ https://bugs.webkit.org/show_bug.cgi?id=3D117500
+
+ Reviewed by Andreas Kling.
+
+ From Blink r150205 by <serya at chromium.org>
+
+ Add parsing recovery capabilities to functions. Errors were
+ correctly detected without this change but then the whole
+ declaration was invalidated. By using expr_recovery to handle th=
em
+ we can recover from those errors and go on with the parsing.
+
+ * css/CSSGrammar.y.in:
+
</ins><span class=3D"cx"> 2013-06-11 Christophe Dumez <ch.dumez at sisa=
.samsung.com>
</span><span class=3D"cx">=20
</span><span class=3D"cx"> Unreviewed, rolling out r151378.
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssCSSGrammaryin"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.=
y.in (151487 =3D> 151488)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/CSSGrammar.y.in 2013-06=
-12 06:05:58 UTC (rev 151487)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in 2013-06-12 07:20:20 UTC (rev=
151488)
</span><span class=3D"lines">@@ -88,9 +88,9 @@
</span><span class=3D"cx"> %}
</span><span class=3D"cx">=20
</span><span class=3D"cx"> #if ENABLE_SHADOW_DOM
</span><del>-%expect 33
</del><ins>+%expect 32
</ins><span class=3D"cx"> #else
</span><del>-%expect 32
</del><ins>+%expect 31
</ins><span class=3D"cx"> #endif
</span><span class=3D"cx">=20
</span><span class=3D"cx"> %nonassoc LOWEST_PREC
</span><span class=3D"lines">@@ -1700,13 +1700,13 @@
</span><span class=3D"cx"> #endif
</span><span class=3D"cx"> }
</span><span class=3D"cx"> /* FIXME: according to the specs a function =
can have a unary_operator in front. I know no case where this makes sense=
*/
</span><del>- | function {
</del><ins>+ | function maybe_space {
</ins><span class=3D"cx"> $$ =3D $1;
</span><span class=3D"cx"> }
</span><del>- | calc_function {
</del><ins>+ | calc_function maybe_space {
</ins><span class=3D"cx"> $$ =3D $1;
</span><span class=3D"cx"> }
</span><del>- | min_or_max_function {
</del><ins>+ | min_or_max_function maybe_space {
</ins><span class=3D"cx"> $$ =3D $1;
</span><span class=3D"cx"> }
</span><span class=3D"cx"> | '%' maybe_space { /* Handle width: %; */
</span><span class=3D"lines">@@ -1753,7 +1753,7 @@
</span><span class=3D"cx"> ;
</span><span class=3D"cx">=20
</span><span class=3D"cx"> function:
</span><del>- FUNCTION maybe_space expr closing_parenthesis maybe_spac=
e {
</del><ins>+ FUNCTION maybe_space expr closing_parenthesis {
</ins><span class=3D"cx"> CSSParserFunction* f =3D parser->cre=
ateFloatingFunction();
</span><span class=3D"cx"> f->name =3D $1;
</span><span class=3D"cx"> f->args =3D parser->sinkFloating=
ValueList($3);
</span><span class=3D"lines">@@ -1761,7 +1761,7 @@
</span><span class=3D"cx"> $$.unit =3D CSSParserValue::Function;
</span><span class=3D"cx"> $$.function =3D f;
</span><span class=3D"cx"> } |
</span><del>- FUNCTION maybe_space closing_parenthesis maybe_space {
</del><ins>+ FUNCTION maybe_space closing_parenthesis {
</ins><span class=3D"cx"> CSSParserFunction* f =3D parser->cre=
ateFloatingFunction();
</span><span class=3D"cx"> f->name =3D $1;
</span><span class=3D"cx"> CSSParserValueList* valueList =3D pars=
er->createFloatingValueList();
</span><span class=3D"lines">@@ -1770,7 +1770,7 @@
</span><span class=3D"cx"> $$.unit =3D CSSParserValue::Function;
</span><span class=3D"cx"> $$.function =3D f;
</span><span class=3D"cx"> } |
</span><del>- FUNCTION maybe_space error {
</del><ins>+ FUNCTION maybe_space expr_recovery closing_parenthesis {
</ins><span class=3D"cx"> CSSParserFunction* f =3D parser->cre=
ateFloatingFunction();
</span><span class=3D"cx"> f->name =3D $1;
</span><span class=3D"cx"> f->args =3D nullptr;
</span><span class=3D"lines">@@ -1883,7 +1883,7 @@
</span><span class=3D"cx"> ;
</span><span class=3D"cx">=20
</span><span class=3D"cx"> calc_function:
</span><del>- CALCFUNCTION maybe_space calc_func_expr calc_maybe_space=
closing_parenthesis maybe_space {
</del><ins>+ CALCFUNCTION maybe_space calc_func_expr calc_maybe_space =
closing_parenthesis {
</ins><span class=3D"cx"> CSSParserFunction* f =3D parser->cre=
ateFloatingFunction();
</span><span class=3D"cx"> f->name =3D $1;
</span><span class=3D"cx"> f->args =3D parser->sinkFloating=
ValueList($3);
</span><span class=3D"lines">@@ -1891,7 +1891,7 @@
</span><span class=3D"cx"> $$.unit =3D CSSParserValue::Function;
</span><span class=3D"cx"> $$.function =3D f;
</span><span class=3D"cx"> }
</span><del>- | CALCFUNCTION maybe_space error {
</del><ins>+ | CALCFUNCTION maybe_space expr_recovery closing_parenthe=
sis {
</ins><span class=3D"cx"> YYERROR;
</span><span class=3D"cx"> }
</span><span class=3D"cx"> ;
</span><span class=3D"lines">@@ -1907,7 +1907,7 @@
</span><span class=3D"cx"> ;
</span><span class=3D"cx">=20
</span><span class=3D"cx"> min_or_max_function:
</span><del>- min_or_max maybe_space calc_func_expr_list closing_paren=
thesis maybe_space {
</del><ins>+ min_or_max maybe_space calc_func_expr_list closing_parent=
hesis {
</ins><span class=3D"cx"> CSSParserFunction* f =3D parser->cre=
ateFloatingFunction();
</span><span class=3D"cx"> f->name =3D $1;
</span><span class=3D"cx"> f->args =3D parser->sinkFloating=
ValueList($3);
</span><span class=3D"lines">@@ -1915,7 +1915,7 @@
</span><span class=3D"cx"> $$.unit =3D CSSParserValue::Function;
</span><span class=3D"cx"> $$.function =3D f;
</span><span class=3D"cx"> }=20
</span><del>- | min_or_max maybe_space error {
</del><ins>+ | min_or_max maybe_space expr_recovery closing_parenthesi=
s {
</ins><span class=3D"cx"> YYERROR;
</span><span class=3D"cx"> }
</span><span class=3D"cx"> ;
</span></span></pre>
</div>
</div>
</body>
</html>
More information about the webkit-changes
mailing list