No subject


Mon Jan 28 08:41:14 PST 2013


8889">r148889</a> by &lt;serya at chromium.org&gt;

Source/WebCore:

Improves the detection of some invalid block declarations inside a
declaration list. This allows the parser not to completely discard
a whole declaration list that contains an invalid block. In
particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in the
new test added by this change.

Test: fast/css/parsing-invalid-block-recovery.html

* css/CSSGrammar.y.in:

LayoutTests:

* fast/css/parsing-invalid-block-recovery-expected.txt: Added.
* fast/css/parsing-invalid-block-recovery.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href=3D"#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</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>

<h3>Added Paths</h3>
<ul>
<li><a href=3D"#trunkLayoutTestsfastcssparsinginvalidblockrecoveryexpecte=
dtxt">trunk/LayoutTests/fast/css/parsing-invalid-block-recovery-expected.=
txt</a></li>
<li><a href=3D"#trunkLayoutTestsfastcssparsinginvalidblockrecoveryhtml">t=
runk/LayoutTests/fast/css/parsing-invalid-block-recovery.html</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 (150671 =
=3D> 150672)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/ChangeLog	2013-05-25 00:48:37 =
UTC (rev 150671)
+++ trunk/LayoutTests/ChangeLog	2013-05-25 00:49:39 UTC (rev 150672)
</span><span class=3D"lines">@@ -1,3 +1,15 @@
</span><ins>+2013-05-24  Sergio Villar Senin  &lt;svillar at igalia.com&gt;
+
+        Fixing invalid block recovery in some declaration list.
+        https://bugs.webkit.org/show_bug.cgi?id=3D115159
+
+        Reviewed by Darin Adler.
+
+        From Blink r148889 by &lt;serya at chromium.org&gt;
+
+        * fast/css/parsing-invalid-block-recovery-expected.txt: Added.
+        * fast/css/parsing-invalid-block-recovery.html: Added.
+
</ins><span class=3D"cx"> 2013-05-24  Christophe Dumez  &lt;ch.dumez at sisa=
.samsung.com&gt;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         Global constructors exposed in worker =
environment have wrong attributes
</span></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssparsinginvalidblockrecoveryexpectedtxt"><=
/a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/fast/css/parsing-inva=
lid-block-recovery-expected.txt (0 =3D> 150672)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css/parsing-invalid-block=
-recovery-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-invalid-block-recovery-expected.tx=
t	2013-05-25 00:49:39 UTC (rev 150672)
</span><span class=3D"lines">@@ -0,0 +1,3 @@
</span><ins>+This test passes if nothing but &quot;END OF TEST&quot; is d=
isplayed
+
+END OF TEST
</ins></span></pre></div>
<a id=3D"trunkLayoutTestsfastcssparsinginvalidblockrecoveryhtml"></a>
<div class=3D"addfile"><h4>Added: trunk/LayoutTests/fast/css/parsing-inva=
lid-block-recovery.html (0 =3D> 150672)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/LayoutTests/fast/css/parsing-invalid-block=
-recovery.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-invalid-block-recovery.html	2013-0=
5-25 00:49:39 UTC (rev 150672)
</span><span class=3D"lines">@@ -0,0 +1,138 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+    &lt;script type=3D&quot;text/javascript&quot;&gt;
+        if (window.testRunner)
+            testRunner.dumpAsText();
+    &lt;/script&gt;
+    &lt;style&gt;
+        .to_be_hidden {
+          display:block;
+          color:red;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed1 {{}}
+        #test1 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed2 {#{}}
+        #test2 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed3 {{#}}
+        #test3 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed4 {{}#}
+        #test4 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed5 {color: red; {}}
+        #test5 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed6 {color: red; #{}}
+        #test6 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed7 {color: red; {#}}
+        #test7 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed8 {color: red; {##}#}
+        #test8 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed9 {color: red; color: red; {}}
+        #test9 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed10 {color: red; color: red; #{}}
+        #test10 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed11 {color: red; color: red; {#}}
+        #test11 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed12 {color: red; color: red; {##}#}
+        #test12 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed13 {color: red; color: red; {}; color: red}
+        #test13 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed14 {color: red; color: red; #{}; color: red}
+        #test14 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed15 {color: red; color: red; {#}; color: red}
+        #test15 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        .malformed16 {color: red; color: red; {##}#; color: red}
+        #test16 {
+            display:none;
+        }
+    &lt;/style&gt;
+    &lt;style&gt;
+        #test17 {
+            color: red !important {};
+            display: none;
+        }
+    &lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+  &lt;p&gt;This test passes if nothing but &quot;END OF TEST&quot; is di=
splayed&lt;/p&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test1&quot;&gt;FAI=
L: Test 1&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test2&quot;&gt;FAI=
L: Test 2&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test3&quot;&gt;FAI=
L: Test 3&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test4&quot;&gt;FAI=
L: Test 4&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test5&quot;&gt;FAI=
L: Test 5&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test6&quot;&gt;FAI=
L: Test 6&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test7&quot;&gt;FAI=
L: Test 7&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test8&quot;&gt;FAI=
L: Test 8&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test9&quot;&gt;FAI=
L: Test 9&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test10&quot;&gt;FA=
IL: Test 10&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test11&quot;&gt;FA=
IL: Test 11&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test12&quot;&gt;FA=
IL: Test 12&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test13&quot;&gt;FA=
IL: Test 13&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test14&quot;&gt;FA=
IL: Test 14&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test15&quot;&gt;FA=
IL: Test 15&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test16&quot;&gt;FA=
IL: Test 16&lt;/div&gt;
+  &lt;div class=3D&quot;to_be_hidden&quot; id=3D&quot;test16&quot;&gt;FA=
IL: Test 17&lt;/div&gt;
+  &lt;div&gt;END OF TEST&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id=3D"trunkSourceWebCoreChangeLog"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (1506=
71 =3D> 150672)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/ChangeLog	2013-05-25 00:48:=
37 UTC (rev 150671)
+++ trunk/Source/WebCore/ChangeLog	2013-05-25 00:49:39 UTC (rev 150672)
</span><span class=3D"lines">@@ -1,4 +1,23 @@
</span><ins>+2013-05-24  Sergio Villar Senin  &lt;svillar at igalia.com&gt;
</ins><span class=3D"cx">=20
</span><ins>+        Fixing invalid block recovery in some declaration li=
st.
+        https://bugs.webkit.org/show_bug.cgi?id=3D115159
+
+        Reviewed by Darin Adler.
+
+        From Blink r148889 by &lt;serya at chromium.org&gt;
+
+        Improves the detection of some invalid block declarations inside=
 a
+        declaration list. This allows the parser not to completely disca=
rd
+        a whole declaration list that contains an invalid block. In
+        particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in t=
he
+        new test added by this change.
+
+        Test: fast/css/parsing-invalid-block-recovery.html
+
+        * css/CSSGrammar.y.in:
+
+
</ins><span class=3D"cx"> 2013-05-24  Beth Dakin  &lt;bdakin at apple.com&gt=
;
</span><span class=3D"cx">=20
</span><span class=3D"cx">         DidFirstFlushForHeaderLayer can be cal=
led too soon on pages that redirect
</span></span></pre></div>
<a id=3D"trunkSourceWebCorecssCSSGrammaryin"></a>
<div class=3D"modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.=
y.in (150671 =3D> 150672)</h4>
<pre class=3D"diff"><span>
<span class=3D"info">--- trunk/Source/WebCore/css/CSSGrammar.y.in	2013-05=
-25 00:48:37 UTC (rev 150671)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in	2013-05-25 00:49:39 UTC (rev=
 150672)
</span><span class=3D"lines">@@ -1544,7 +1544,7 @@
</span><span class=3D"cx">         parser-&gt;syntaxError($2, CSSParser::=
PropertyDeclarationError);
</span><span class=3D"cx">         $$ =3D $1;
</span><span class=3D"cx">     }
</span><del>-    | decl_list error_location invalid_block_list {
</del><ins>+    | decl_list errors invalid_block_list error {
</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></span></pre>
</div>
</div>

</body>
</html>


More information about the webkit-changes mailing list