LayoutTests:
authorantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Aug 2007 11:15:44 +0000 (11:15 +0000)
committerantti <antti@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Aug 2007 11:15:44 +0000 (11:15 +0000)
commitbeedace089789d96918355ed019374561a5c67b7
treefd17266a1d6d5f07b3434662beea4892bb4b33a9
parentce89586e5f1980bfd87cc130bfcafded9a676441
LayoutTests:

        Reviewed by Hyatt.

        Tests for <rdar://problem/5102553>
        Mail spins trying to display or edit a specific long plain text message in WebCore::TimerBase::...

        - added performance test. With debug build on MBP this takes about 1.5s to run.
        - added test case that shows some additional progression from the patch (less leftover anonymous boxes).

        * fast/block/basic/stress-shallow-nested-expected.txt: Added.
        * fast/block/basic/stress-shallow-nested.html: Added.
        * fast/block/float/nestedAnonymousBlocks2-expected.checksum: Added.
        * fast/block/float/nestedAnonymousBlocks2-expected.png: Added.
        * fast/block/float/nestedAnonymousBlocks2-expected.txt: Added.
        * fast/block/float/nestedAnonymousBlocks2.html: Added.

WebCore:

        Reviewed by Hyatt.

        Fix <rdar://problem/5102553>
        Mail spins trying to display or edit a specific long plain text message in WebCore::TimerBase::...

        Calling removeLeftoverAnonymousBoxes() from RenderBlock::addChildToFlow() made adding children
        O(n^2) in simple cases (repeated <div><div></div></div> for example).

        I couldn't find any limited fix so here is a more complete one. It removes iterating/recursing
        removeLeftoverAnonymousBoxes() method altogether. Instead of hunting around wildly, just get
        rid of anonymous boxes with block children when they occur.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::addChildToFlow):
        * rendering/RenderButton.h:
        (WebCore::RenderButton::removeLeftoverAnonymousBlock):
        * rendering/RenderContainer.cpp:
        (WebCore::RenderContainer::removeLeftoverAnonymousBlock):
        * rendering/RenderContainer.h:
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::handleDynamicFloatPositionChange):
        (WebCore::RenderObject::removeLeftoverAnonymousBlock):
        * rendering/RenderObject.h:
        * rendering/RenderTextControl.h:
        (WebCore::RenderTextControl::removeLeftoverAnonymousBlock):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/block/basic/stress-shallow-nested-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/basic/stress-shallow-nested.html [new file with mode: 0644]
LayoutTests/fast/block/float/nestedAnonymousBlocks2-expected.checksum [new file with mode: 0644]
LayoutTests/fast/block/float/nestedAnonymousBlocks2-expected.png [new file with mode: 0644]
LayoutTests/fast/block/float/nestedAnonymousBlocks2-expected.txt [new file with mode: 0644]
LayoutTests/fast/block/float/nestedAnonymousBlocks2.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderButton.h
WebCore/rendering/RenderContainer.cpp
WebCore/rendering/RenderContainer.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderTextControl.h