No subject


Mon Jan 28 08:41:14 PST 2013


8974">r148974</a> by &lt;serya at chromium.org&gt;

Refactor &quot;invalid_block_list error | /* empty */&quot; 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:</pre>

<h3>Modified Paths</h3>
<ul>
<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"trunkSourceWebCoreChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (1506=
81 =3D> 150682)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/ChangeLog	2013-05-25 04:20:=
37 UTC (rev 150681)
+++ trunk/Source/WebCore/ChangeLog	2013-05-25 08:29:42 UTC (rev 150682)
</span><span class=3D"lines">@@ -1,3 +1,19 @@
</span><ins>+2013-05-25  Sergio Villar Senin  &lt;svillar at igalia.com&gt;
+
+        Reducing CSS code duplication in declaration list error recovery
+        https://bugs.webkit.org/show_bug.cgi?id=3D115157
+
+        Reviewed by Andreas Kling.
+
+        From Blink r148974 by &lt;serya at chromium.org&gt;
+
+        Refactor &quot;invalid_block_list error | /* empty */&quot; 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 beha=
viour.
+
+        * css/CSSGrammar.y.in:
+
</ins><span class=3D"cx"> 2013-05-24  Ryosuke Niwa  &lt;rniwa at webkit.org&=
gt;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         Build fix after r150664.
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssCSSGrammaryin"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.=
y.in (150681 =3D> 150682)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/CSSGrammar.y.in	2013-05=
-25 04:20:37 UTC (rev 150681)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in	2013-05-25 08:29:42 UTC (rev=
 150682)
</span><span class=3D"lines">@@ -1532,22 +1532,14 @@
</span><span class=3D"cx">     | decl_list {
</span><span class=3D"cx">         $$ =3D $1;
</span><span class=3D"cx">     }
</span><del>-    | errors invalid_block_list error {
</del><ins>+    | errors decl_list_recovery {
</ins><span class=3D"cx">         parser-&gt;syntaxError($1, CSSParser::P=
ropertyDeclarationError);
</span><span class=3D"cx">         $$ =3D false;
</span><span class=3D"cx">     }
</span><del>-    | errors {
-        parser-&gt;syntaxError($1, CSSParser::PropertyDeclarationError);
-        $$ =3D false;
-    }
-    | decl_list errors {
</del><ins>+    | decl_list errors decl_list_recovery {
</ins><span class=3D"cx">         parser-&gt;syntaxError($2, CSSParser::P=
ropertyDeclarationError);
</span><span class=3D"cx">         $$ =3D $1;
</span><span class=3D"cx">     }
</span><del>-    | decl_list errors invalid_block_list error {
-        parser-&gt;syntaxError($2, CSSParser::PropertyDeclarationError);
-        $$ =3D $1;
-    }
</del><span class=3D"cx">     ;
</span><span class=3D"cx">=20
</span><span class=3D"cx"> decl_list:
</span><span class=3D"lines">@@ -1563,33 +1555,29 @@
</span><span class=3D"cx">         parser-&gt;syntaxError($2);
</span><span class=3D"cx">         $$ =3D false;
</span><span class=3D"cx">     }
</span><del>-    | errors ';' maybe_space {
</del><ins>+    | errors decl_list_recovery ';' maybe_space {
</ins><span class=3D"cx">         parser-&gt;syntaxError($1, CSSParser::P=
ropertyDeclarationError);
</span><span class=3D"cx">         parser-&gt;markPropertyStart();
</span><span class=3D"cx">         $$ =3D false;
</span><span class=3D"cx">     }
</span><del>-    | errors invalid_block_list error ';' maybe_space {
-        parser-&gt;syntaxError($1, CSSParser::PropertyDeclarationError);
-        $$ =3D false;
-    }
</del><span class=3D"cx">     | decl_list declaration ';' maybe_space {
</span><span class=3D"cx">         parser-&gt;markPropertyStart();
</span><span class=3D"cx">         $$ =3D $1;
</span><span class=3D"cx">         if ($2)
</span><span class=3D"cx">             $$ =3D $2;
</span><span class=3D"cx">     }
</span><del>-    | decl_list errors ';' maybe_space {
</del><ins>+    | decl_list errors decl_list_recovery ';' maybe_space {
</ins><span class=3D"cx">         parser-&gt;syntaxError($2, CSSParser::P=
ropertyDeclarationError);
</span><span class=3D"cx">         parser-&gt;markPropertyStart();
</span><span class=3D"cx">         $$ =3D $1;
</span><span class=3D"cx">     }
</span><del>-    | decl_list errors invalid_block_list error ';' maybe_sp=
ace {
-        parser-&gt;syntaxError($2, CSSParser::PropertyDeclarationError);
-        parser-&gt;markPropertyStart();
-        $$ =3D $1;
-    }
</del><span class=3D"cx">     ;
</span><span class=3D"cx">=20
</span><ins>+decl_list_recovery:
+    invalid_block_list error
+    | /* empty */
+    ;
+
</ins><span class=3D"cx"> declaration:
</span><span class=3D"cx">     VAR_DEFINITION maybe_space ':' maybe_space=
 expr prio {
</span><span class=3D"cx"> #if ENABLE_CSS_VARIABLES
</span></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list