No subject
Mon Jan 28 08:41:14 PST 2013
8889">r148889</a> by <serya at chromium.org>
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 <svillar at igalia.com>
+
+ 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 <serya at chromium.org>
+
+ * 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 <ch.dumez at sisa=
.samsung.com>
</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 "END OF TEST" 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>+<html>
+<head>
+ <script type=3D"text/javascript">
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ </script>
+ <style>
+ .to_be_hidden {
+ display:block;
+ color:red;
+ }
+ </style>
+ <style>
+ .malformed1 {{}}
+ #test1 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed2 {#{}}
+ #test2 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed3 {{#}}
+ #test3 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed4 {{}#}
+ #test4 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed5 {color: red; {}}
+ #test5 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed6 {color: red; #{}}
+ #test6 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed7 {color: red; {#}}
+ #test7 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed8 {color: red; {##}#}
+ #test8 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed9 {color: red; color: red; {}}
+ #test9 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed10 {color: red; color: red; #{}}
+ #test10 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed11 {color: red; color: red; {#}}
+ #test11 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed12 {color: red; color: red; {##}#}
+ #test12 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed13 {color: red; color: red; {}; color: red}
+ #test13 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed14 {color: red; color: red; #{}; color: red}
+ #test14 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed15 {color: red; color: red; {#}; color: red}
+ #test15 {
+ display:none;
+ }
+ </style>
+ <style>
+ .malformed16 {color: red; color: red; {##}#; color: red}
+ #test16 {
+ display:none;
+ }
+ </style>
+ <style>
+ #test17 {
+ color: red !important {};
+ display: none;
+ }
+ </style>
+</head>
+<body>
+ <p>This test passes if nothing but "END OF TEST" is di=
splayed</p>
+ <div class=3D"to_be_hidden" id=3D"test1">FAI=
L: Test 1</div>
+ <div class=3D"to_be_hidden" id=3D"test2">FAI=
L: Test 2</div>
+ <div class=3D"to_be_hidden" id=3D"test3">FAI=
L: Test 3</div>
+ <div class=3D"to_be_hidden" id=3D"test4">FAI=
L: Test 4</div>
+ <div class=3D"to_be_hidden" id=3D"test5">FAI=
L: Test 5</div>
+ <div class=3D"to_be_hidden" id=3D"test6">FAI=
L: Test 6</div>
+ <div class=3D"to_be_hidden" id=3D"test7">FAI=
L: Test 7</div>
+ <div class=3D"to_be_hidden" id=3D"test8">FAI=
L: 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>
+ <div class=3D"to_be_hidden" id=3D"test14">FA=
IL: Test 14</div>
+ <div class=3D"to_be_hidden" id=3D"test15">FA=
IL: Test 15</div>
+ <div class=3D"to_be_hidden" id=3D"test16">FA=
IL: Test 16</div>
+ <div class=3D"to_be_hidden" id=3D"test16">FA=
IL: Test 17</div>
+ <div>END OF TEST</div>
+</body>
+</html>
+
</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 <svillar at igalia.com>
</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 <serya at chromium.org>
+
+ 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 <bdakin at apple.com>=
;
</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->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->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