2011-06-27 Abhishek Arya <inferno@chromium.org>
authorAbhishek Arya <inferno@chromium.org>
Mon, 27 Jun 2011 17:48:45 +0000 (17:48 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 27 Jun 2011 19:25:59 +0000 (16:25 -0300)
commitf858c34ceabe7789b89ffd9d4fe4a431256a3ef8
tree71a41de9620c81233ab7fdd9e1077330e08b8974
parent53b25a9ccf9998b92d1d17f4921523628f06de62
2011-06-27  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Simon Fraser.

        Fix removal of overhanging floats on style changes to absolute/fixed position.
        https://bugs.webkit.org/show_bug.cgi?id=63355

        1. If we are not currently positioned.
        2. And we are not floating. (If we are floating, then this will be automatically
           done in RenderBox::styleWillChange as part of removeFloatingOrPositionedChildFromBlockLists)
        3. And we have overhanging floats from previous sibling blocks.
        4. And our new new style tells that we will have absolute or fixed position.

        Then, we mark all our descendants with floats for layout. This will make sure that
        overhanging floats are removed. Also, it is important to do that since if that previous
        sibling block goes away, it is not able to tell us that to remove those floats thinking
        that being a positioned block, we should have removed them already.

        Tests: fast/block/float/intruding-float-add-in-sibling-block-on-static-position.html
               fast/block/float/intruding-float-add-in-sibling-block-on-static-position2.html
               fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position.html
               fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2.html
               fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position.html
               fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2.html
               fast/block/float/overhanging-float-add-in-static-position-block.html
               fast/block/float/overhanging-float-add-in-static-position-block2.html
               fast/block/float/overhanging-float-remove-from-absolute-position-block.html
               fast/block/float/overhanging-float-remove-from-absolute-position-block2.html
               fast/block/float/overhanging-float-remove-from-fixed-position-block.html
               fast/block/float/overhanging-float-remove-from-fixed-position-block2.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::styleWillChange):
2011-06-27  Abhishek Arya  <inferno@chromium.org>

        Reviewed by Simon Fraser.

        Tests that overhanging floats are removed during style changes to absolute/fixed
        position and gets added back when coming back to static position.
        https://bugs.webkit.org/show_bug.cgi?id=63355

        * fast/block/float/intruding-float-add-in-sibling-block-on-static-position.html: Added.
        * fast/block/float/intruding-float-add-in-sibling-block-on-static-position2.html: Added.
        * fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position.html: Added.
        * fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2.html: Added.
        * fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position.html: Added.
        * fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2.html: Added.
        * fast/block/float/overhanging-float-add-in-static-position-block.html: Added.
        * fast/block/float/overhanging-float-add-in-static-position-block2.html: Added.
        * fast/block/float/overhanging-float-remove-from-absolute-position-block.html: Added.
        * fast/block/float/overhanging-float-remove-from-absolute-position-block2.html: Added.
        * fast/block/float/overhanging-float-remove-from-fixed-position-block.html: Added.
        * fast/block/float/overhanging-float-remove-from-fixed-position-block2.html: Added.
        * platform/mac/fast/block/float/intruding-float-add-in-sibling-block-on-static-position-expected.png: Added.
        * platform/mac/fast/block/float/intruding-float-add-in-sibling-block-on-static-position-expected.txt: Added.
        * platform/mac/fast/block/float/intruding-float-add-in-sibling-block-on-static-position2-expected.png: Added.
        * platform/mac/fast/block/float/intruding-float-add-in-sibling-block-on-static-position2-expected.txt: Added.
        * platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position-expected.png: Added.
        * platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position-expected.txt: Added.
        * platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2-expected.png: Added.
        * platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2-expected.txt: Added.
        * platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position-expected.png: Added.
        * platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position-expected.txt: Added.
        * platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2-expected.png: Added.
        * platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2-expected.txt: Added.
        * platform/mac/fast/block/float/overhanging-float-add-in-static-position-block-expected.png: Added.
        * platform/mac/fast/block/float/overhanging-float-add-in-static-position-block-expected.txt: Added.
        * platform/mac/fast/block/float/overhanging-float-add-in-static-position-block2-expected.png: Added.
        * platform/mac/fast/block/float/overhanging-float-add-in-static-position-block2-expected.txt: Added.
        * platform/mac/fast/block/float/overhanging-float-remove-from-absolute-position-block-expected.png: Added.
        * platform/mac/fast/block/float/overhanging-float-remove-from-absolute-position-block-expected.txt: Added.
        * platform/mac/fast/block/float/overhanging-float-remove-from-absolute-position-block2-expected.png: Added.
        * platform/mac/fast/block/float/overhanging-float-remove-from-absolute-position-block2-expected.txt: Added.
        * platform/mac/fast/block/float/overhanging-float-remove-from-fixed-position-block-expected.png: Added.
        * platform/mac/fast/block/float/overhanging-float-remove-from-fixed-position-block-expected.txt: Added.
        * platform/mac/fast/block/float/overhanging-float-remove-from-fixed-position-block2-expected.png: Added.
        * platform/mac/fast/block/float/overhanging-float-remove-from-fixed-position-block2-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
39 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/block/float/intruding-float-add-in-sibling-block-on-static-position.html [new file with mode: 0644]
LayoutTests/fast/block/float/intruding-float-add-in-sibling-block-on-static-position2.html [new file with mode: 0644]
LayoutTests/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position.html [new file with mode: 0644]
LayoutTests/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2.html [new file with mode: 0644]
LayoutTests/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position.html [new file with mode: 0644]
LayoutTests/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2.html [new file with mode: 0644]
LayoutTests/fast/block/float/overhanging-float-add-in-static-position-block.html [new file with mode: 0644]
LayoutTests/fast/block/float/overhanging-float-add-in-static-position-block2.html [new file with mode: 0644]
LayoutTests/fast/block/float/overhanging-float-remove-from-absolute-position-block.html [new file with mode: 0644]
LayoutTests/fast/block/float/overhanging-float-remove-from-absolute-position-block2.html [new file with mode: 0644]
LayoutTests/fast/block/float/overhanging-float-remove-from-fixed-position-block.html [new file with mode: 0644]
LayoutTests/fast/block/float/overhanging-float-remove-from-fixed-position-block2.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-add-in-sibling-block-on-static-position-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-add-in-sibling-block-on-static-position-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-add-in-sibling-block-on-static-position2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-add-in-sibling-block-on-static-position2-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-absolute-position2-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/intruding-float-remove-from-sibling-block-on-fixed-position2-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-add-in-static-position-block-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-add-in-static-position-block-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-add-in-static-position-block2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-add-in-static-position-block2-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-remove-from-absolute-position-block-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-remove-from-absolute-position-block-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-remove-from-absolute-position-block2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-remove-from-absolute-position-block2-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-remove-from-fixed-position-block-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-remove-from-fixed-position-block-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-remove-from-fixed-position-block2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/block/float/overhanging-float-remove-from-fixed-position-block2-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp