WebCore:
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2009 00:16:35 +0000 (00:16 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2009 00:16:35 +0000 (00:16 +0000)
commit5eb322c3a8e7578b4849b02899a4913442beb2b9
treec7e2b8cf9682d8e80317d087dc9a65a18760fb52
parent9ca91f91d2a5a39623f662658a11ac29f1a8a1c2
WebCore:

2009-05-07  Eric Seidel  <eric@webkit.org>

        Reviewed by Beth Dakin.

        Fix regression caused by r41469, add test case to prevent it from
        happening again.
        https://bugs.webkit.org/show_bug.cgi?id=25252

        hasLayer() was true during removeOnlyThisLayer()/
        updateLayerPositions()
        which caused updateLayerPosition()'s walk up the render tree to
        include offsets from the layer we were about to remove.

        I'm not 100% convinced that this wasn't a bug in
        updateLayerPosition() or in RenderBoxModelObject::styleDidChange,
        because the layer in question is not the containing block for the
        block which gets laid out wrong. But this restores the previous
        behavior and adds a test.  So the next time someone is in here re-
        factoring, they will at least know if they break something.

        Test: fast/layers/remove-only-this-layer-update.html

        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::destroyLayer):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::removeOnlyThisLayer):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::destroy):
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::destroy):

LayoutTests:

2009-05-07  Eric Seidel  <eric@webkit.org>

        Reviewed by Beth Dakin.

        Fix regression caused by r41469, add test case to prevent it from
        happening again.
        https://bugs.webkit.org/show_bug.cgi?id=25252

        * fast/layers/remove-only-this-layer-update.html: Added.
        * platform/mac/fast/layers/remove-only-this-layer-update-expected.checksum: Added.
        * platform/mac/fast/layers/remove-only-this-layer-update-expected.png: Added.
        * platform/mac/fast/layers/remove-only-this-layer-update-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@43378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/layers/remove-only-this-layer-update.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/layers/remove-only-this-layer-update-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/layers/remove-only-this-layer-update-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/layers/remove-only-this-layer-update-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderBoxModelObject.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderWidget.cpp