2010-01-12 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jan 2010 02:08:10 +0000 (02:08 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Jan 2010 02:08:10 +0000 (02:08 +0000)
commit02532bae4655e20b48920f9df805e4d13977a425
treea9d2053a0e3c03e811cf8a3a033d3265895fc0da
parent002aa6d1cb5c9577362c78e41a3bdb072713884a
2010-01-12  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dan Bernstein.

        position:fixed and transform on same element breaks fixed behavior
        https://bugs.webkit.org/show_bug.cgi?id=31283

        Fix interactions of transforms and fixed positioning, namely that fixed position
        elements with a transformed ancestor are positioned relative to that ancestor,
        and an element with both a transform and fixed position respects that positioning.

        Test: transforms/2d/transform-fixed-container.html

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::mapLocalToContainer):
        (WebCore::RenderBox::mapAbsoluteToLocalPoint):
        Transforms should not unconditionally stop the propagation of the 'fixed' flag to ancestors,
        but only if the transformed element is not itself fixed.

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::convertToLayerCoords):
        Fix this method to behave correctly for fixed position layers whose container is not
        the root, but some other (probably transformed) ancestor. In that case, we can fall into
        the "position: absolute" code path.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/transforms/2d/transform-fixed-container-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/transforms/2d/transform-fixed-container-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/transforms/2d/transform-fixed-container-expected.txt [new file with mode: 0644]
LayoutTests/transforms/2d/transform-fixed-container.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderLayer.cpp