⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 89522 in webkit


Ignore:
Timestamp:
Jun 22, 2011, 7:31:11 PM (15 years ago)
Author:
weinig@apple.com
Message:

Lower HTML parser DOM depth limit to 2048
​https://bugs.webkit.org/show_bug.cgi?id=63219

Reviewed by Adam Barth.

Source/WebCore:

Lower the default depth limit from 4096 to 2048. There isn't a good
reason to have such pathologically nested content, and by-and-large,
the rendering code is not setup to support it that well. Adding this
aggressive limit now will allow us to see if anything breaks in the
nightlies.

  • page/Settings.h:

LayoutTests:

Update nest test to reflect new limit and remove tests that were
testing specific behaviors of the old parser.

  • fast/parser/block-nesting-cap-expected.txt:
  • fast/parser/block-nesting-cap-table-expected.txt: Removed.
  • fast/parser/block-nesting-cap-table.html: Removed.
  • fast/parser/element-nesting-cap-expected.txt: Removed.
  • fast/parser/element-nesting-cap.html: Removed.
  • fast/parser/script-tests/block-nesting-cap-table.js: Removed.
  • fast/parser/script-tests/block-nesting-cap.js:
  • fast/parser/script-tests/element-nesting-cap.js: Removed.
Location:
trunk
Files:
6 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r89519 r89522  
     12011-06-22  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Lower HTML parser DOM depth limit to 2048
     6        https://bugs.webkit.org/show_bug.cgi?id=63219
     7
     8        Update nest test to reflect new limit and remove tests that were
     9        testing specific behaviors of the old parser.
     10
     11        * fast/parser/block-nesting-cap-expected.txt:
     12        * fast/parser/block-nesting-cap-table-expected.txt: Removed.
     13        * fast/parser/block-nesting-cap-table.html: Removed.
     14        * fast/parser/element-nesting-cap-expected.txt: Removed.
     15        * fast/parser/element-nesting-cap.html: Removed.
     16        * fast/parser/script-tests/block-nesting-cap-table.js: Removed.
     17        * fast/parser/script-tests/block-nesting-cap.js:
     18        * fast/parser/script-tests/element-nesting-cap.js: Removed.
     19
    1202011-06-22  Kent Tamura  <tkent@chromium.org>
    221
  • trunk/LayoutTests/fast/parser/block-nesting-cap-expected.txt

    r89453 r89522  
    1 Test that the HTML parser does not allow the nesting depth of "block-level" elements to exceed 4096.
     1Test that the HTML parser does not allow the nesting depth of "block-level" elements to exceed 2048.
    22
    33On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    44
    55
    6 PASS d4096.parentNode === d4094 is true
    7 PASS d4095.parentNode === d4094 is true
    8 PASS d4096.previousSibling === d4095 is true
     6PASS d2048.parentNode === d2046 is true
     7PASS d2047.parentNode === d2046 is true
     8PASS d2048.previousSibling === d2047 is true
    99PASS successfullyParsed is true
    1010
  • trunk/LayoutTests/fast/parser/script-tests/block-nesting-cap.js

    r48552 r89522  
    1 description('Test that the HTML parser does not allow the nesting depth of "block-level" elements to exceed 4096.');
     1description('Test that the HTML parser does not allow the nesting depth of "block-level" elements to exceed 2048.');
    22
    3 var depth = 4100;
     3var depth = 2100;
    44var markup = "";
    55var i;
    … …  
    99doc.body.innerHTML = markup;
    1010
    11 var d4094 = doc.getElementById("d4094");
    12 var d4095 = doc.getElementById("d4095");
    13 var d4096 = doc.getElementById("d4096");
     11var d2046 = doc.getElementById("d2046");
     12var d2047 = doc.getElementById("d2047");
     13var d2048 = doc.getElementById("d2048");
    1414
    15 shouldBe("d4096.parentNode === d4094", "true");
    16 shouldBe("d4095.parentNode === d4094", "true");
    17 shouldBe("d4096.previousSibling === d4095", "true");
     15shouldBe("d2048.parentNode === d2046", "true");
     16shouldBe("d2047.parentNode === d2046", "true");
     17shouldBe("d2048.previousSibling === d2047", "true");
    1818
    1919var successfullyParsed = true;
  • trunk/Source/WebCore/ChangeLog

    r89521 r89522  
     12011-06-22  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Lower HTML parser DOM depth limit to 2048
     6        https://bugs.webkit.org/show_bug.cgi?id=63219
     7
     8        Lower the default depth limit from 4096 to 2048. There isn't a good
     9        reason to have such pathologically nested content, and by-and-large,
     10        the rendering code is not setup to support it that well. Adding this
     11        aggressive limit now will allow us to see if anything breaks in the
     12        nightlies.
     13
     14        * page/Settings.h:
     15
    1162011-06-22  Julien Chaffraix  <jchaffraix@webkit.org>
    217
  • trunk/Source/WebCore/page/Settings.h

    r89453 r89522  
    389389        bool usePreHTML5ParserQuirks() const { return m_usePreHTML5ParserQuirks; }
    390390
    391         static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 4096;
     391        static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 2048;
    392392        void setMaximumHTMLParserDOMTreeDepth(unsigned maximumHTMLParserDOMTreeDepth) { m_maximumHTMLParserDOMTreeDepth = maximumHTMLParserDOMTreeDepth; }
    393393        unsigned maximumHTMLParserDOMTreeDepth() const { return m_maximumHTMLParserDOMTreeDepth; }
Note: See TracChangeset for help on using the changeset viewer.