Title: [90301] trunk
Revision
90301
Author
[email protected]
Date
2011-07-01 17:09:13 -0700 (Fri, 01 Jul 2011)

Log Message

2011-07-01  Sam Weinig  <[email protected]>

        Reduce parser nesting cap to 512
        https://bugs.webkit.org/show_bug.cgi?id=63856

        Reviewed by Dan Bernstein.

        Given Firefox's cap of 200, our cap of 2048 seemed a little excessive. Lower
        the nesting cap to 512 to cover more cases where rending recursion was biting us.

        * page/Settings.h:
        Reduce the nesting cap to 512.
2011-07-01  Sam Weinig  <[email protected]>

        Reduce parser nesting cap to 512
        https://bugs.webkit.org/show_bug.cgi?id=63856

        Update test for new cap.

        * fast/parser/block-nesting-cap-expected.txt:
        * fast/parser/script-tests/block-nesting-cap.js:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (90300 => 90301)


--- trunk/LayoutTests/ChangeLog	2011-07-02 00:09:12 UTC (rev 90300)
+++ trunk/LayoutTests/ChangeLog	2011-07-02 00:09:13 UTC (rev 90301)
@@ -1,3 +1,13 @@
+2011-07-01  Sam Weinig  <[email protected]>
+
+        Reduce parser nesting cap to 512
+        https://bugs.webkit.org/show_bug.cgi?id=63856
+
+        Update test for new cap.
+
+        * fast/parser/block-nesting-cap-expected.txt:
+        * fast/parser/script-tests/block-nesting-cap.js:
+
 2011-07-01  Mihai Parparita  <[email protected]>
 
         editing/selection/directionality-after-undo-replace.html fails on Chromium Windows

Modified: trunk/LayoutTests/fast/parser/block-nesting-cap-expected.txt (90300 => 90301)


--- trunk/LayoutTests/fast/parser/block-nesting-cap-expected.txt	2011-07-02 00:09:12 UTC (rev 90300)
+++ trunk/LayoutTests/fast/parser/block-nesting-cap-expected.txt	2011-07-02 00:09:13 UTC (rev 90301)
@@ -1,11 +1,11 @@
-Test that the HTML parser does not allow the nesting depth of "block-level" elements to exceed 2048.
+Test that the HTML parser does not allow the nesting depth of elements to exceed 512.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS d2048.parentNode === d2046 is true
-PASS d2047.parentNode === d2046 is true
-PASS d2048.previousSibling === d2047 is true
+PASS d512.parentNode === d510 is true
+PASS d511.parentNode === d510 is true
+PASS d512.previousSibling === d511 is true
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/parser/script-tests/block-nesting-cap.js (90300 => 90301)


--- trunk/LayoutTests/fast/parser/script-tests/block-nesting-cap.js	2011-07-02 00:09:12 UTC (rev 90300)
+++ trunk/LayoutTests/fast/parser/script-tests/block-nesting-cap.js	2011-07-02 00:09:13 UTC (rev 90301)
@@ -1,6 +1,6 @@
-description('Test that the HTML parser does not allow the nesting depth of "block-level" elements to exceed 2048.');
+description('Test that the HTML parser does not allow the nesting depth of elements to exceed 512.');
 
-var depth = 2100;
+var depth = 514;
 var markup = "";
 var i;
 for (i = 0; i < depth; ++i)
@@ -8,12 +8,12 @@
 var doc = document.implementation.createHTMLDocument();
 doc.body.innerHTML = markup;
 
-var d2046 = doc.getElementById("d2046");
-var d2047 = doc.getElementById("d2047");
-var d2048 = doc.getElementById("d2048");
+var d510 = doc.getElementById("d510");
+var d511 = doc.getElementById("d511");
+var d512 = doc.getElementById("d512");
 
-shouldBe("d2048.parentNode === d2046", "true");
-shouldBe("d2047.parentNode === d2046", "true");
-shouldBe("d2048.previousSibling === d2047", "true");
+shouldBe("d512.parentNode === d510", "true");
+shouldBe("d511.parentNode === d510", "true");
+shouldBe("d512.previousSibling === d511", "true");
 
 var successfullyParsed = true;

Modified: trunk/Source/WebCore/ChangeLog (90300 => 90301)


--- trunk/Source/WebCore/ChangeLog	2011-07-02 00:09:12 UTC (rev 90300)
+++ trunk/Source/WebCore/ChangeLog	2011-07-02 00:09:13 UTC (rev 90301)
@@ -1,3 +1,16 @@
+2011-07-01  Sam Weinig  <[email protected]>
+
+        Reduce parser nesting cap to 512
+        https://bugs.webkit.org/show_bug.cgi?id=63856
+
+        Reviewed by Dan Bernstein.
+
+        Given Firefox's cap of 200, our cap of 2048 seemed a little excessive. Lower
+        the nesting cap to 512 to cover more cases where rending recursion was biting us.
+
+        * page/Settings.h:
+        Reduce the nesting cap to 512.
+
 2011-07-01  Darin Adler  <[email protected]>
 
         Add change accidentally left out of last commit.

Modified: trunk/Source/WebCore/page/Settings.h (90300 => 90301)


--- trunk/Source/WebCore/page/Settings.h	2011-07-02 00:09:12 UTC (rev 90300)
+++ trunk/Source/WebCore/page/Settings.h	2011-07-02 00:09:13 UTC (rev 90301)
@@ -402,7 +402,7 @@
         void setUsePreHTML5ParserQuirks(bool flag) { m_usePreHTML5ParserQuirks = flag; }
         bool usePreHTML5ParserQuirks() const { return m_usePreHTML5ParserQuirks; }
 
-        static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 2048;
+        static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512;
         void setMaximumHTMLParserDOMTreeDepth(unsigned maximumHTMLParserDOMTreeDepth) { m_maximumHTMLParserDOMTreeDepth = maximumHTMLParserDOMTreeDepth; }
         unsigned maximumHTMLParserDOMTreeDepth() const { return m_maximumHTMLParserDOMTreeDepth; }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to