Title: [150672] trunk
- Revision
- 150672
- Author
- [email protected]
- Date
- 2013-05-24 17:49:39 -0700 (Fri, 24 May 2013)
Log Message
Fixing invalid block recovery in some declaration list.
https://bugs.webkit.org/show_bug.cgi?id=115159
Patch by Sergio Villar Senin <[email protected]> on 2013-05-24
Reviewed by Darin Adler.
>From Blink r148889 by <[email protected]>
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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (150671 => 150672)
--- trunk/LayoutTests/ChangeLog 2013-05-25 00:48:37 UTC (rev 150671)
+++ trunk/LayoutTests/ChangeLog 2013-05-25 00:49:39 UTC (rev 150672)
@@ -1,3 +1,15 @@
+2013-05-24 Sergio Villar Senin <[email protected]>
+
+ Fixing invalid block recovery in some declaration list.
+ https://bugs.webkit.org/show_bug.cgi?id=115159
+
+ Reviewed by Darin Adler.
+
+ From Blink r148889 by <[email protected]>
+
+ * fast/css/parsing-invalid-block-recovery-expected.txt: Added.
+ * fast/css/parsing-invalid-block-recovery.html: Added.
+
2013-05-24 Christophe Dumez <[email protected]>
Global constructors exposed in worker environment have wrong attributes
Added: trunk/LayoutTests/fast/css/parsing-invalid-block-recovery-expected.txt (0 => 150672)
--- trunk/LayoutTests/fast/css/parsing-invalid-block-recovery-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-invalid-block-recovery-expected.txt 2013-05-25 00:49:39 UTC (rev 150672)
@@ -0,0 +1,3 @@
+This test passes if nothing but "END OF TEST" is displayed
+
+END OF TEST
Added: trunk/LayoutTests/fast/css/parsing-invalid-block-recovery.html (0 => 150672)
--- trunk/LayoutTests/fast/css/parsing-invalid-block-recovery.html (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-invalid-block-recovery.html 2013-05-25 00:49:39 UTC (rev 150672)
@@ -0,0 +1,138 @@
+<html>
+<head>
+ <script type="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 displayed</p>
+ <div class="to_be_hidden" id="test1">FAIL: Test 1</div>
+ <div class="to_be_hidden" id="test2">FAIL: Test 2</div>
+ <div class="to_be_hidden" id="test3">FAIL: Test 3</div>
+ <div class="to_be_hidden" id="test4">FAIL: Test 4</div>
+ <div class="to_be_hidden" id="test5">FAIL: Test 5</div>
+ <div class="to_be_hidden" id="test6">FAIL: Test 6</div>
+ <div class="to_be_hidden" id="test7">FAIL: Test 7</div>
+ <div class="to_be_hidden" id="test8">FAIL: Test 8</div>
+ <div class="to_be_hidden" id="test9">FAIL: Test 9</div>
+ <div class="to_be_hidden" id="test10">FAIL: Test 10</div>
+ <div class="to_be_hidden" id="test11">FAIL: Test 11</div>
+ <div class="to_be_hidden" id="test12">FAIL: Test 12</div>
+ <div class="to_be_hidden" id="test13">FAIL: Test 13</div>
+ <div class="to_be_hidden" id="test14">FAIL: Test 14</div>
+ <div class="to_be_hidden" id="test15">FAIL: Test 15</div>
+ <div class="to_be_hidden" id="test16">FAIL: Test 16</div>
+ <div class="to_be_hidden" id="test16">FAIL: Test 17</div>
+ <div>END OF TEST</div>
+</body>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (150671 => 150672)
--- 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)
@@ -1,4 +1,23 @@
+2013-05-24 Sergio Villar Senin <[email protected]>
+ Fixing invalid block recovery in some declaration list.
+ https://bugs.webkit.org/show_bug.cgi?id=115159
+
+ Reviewed by Darin Adler.
+
+ From Blink r148889 by <[email protected]>
+
+ 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:
+
+
2013-05-24 Beth Dakin <[email protected]>
DidFirstFlushForHeaderLayer can be called too soon on pages that redirect
Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (150671 => 150672)
--- 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)
@@ -1544,7 +1544,7 @@
parser->syntaxError($2, CSSParser::PropertyDeclarationError);
$$ = $1;
}
- | decl_list error_location invalid_block_list {
+ | decl_list errors invalid_block_list error {
parser->syntaxError($2, CSSParser::PropertyDeclarationError);
$$ = $1;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes