2009-03-26 Simon Fraser <simon.fraser@apple.com>
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2009 18:34:03 +0000 (18:34 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2009 18:34:03 +0000 (18:34 +0000)
commitece6e6fa968c8fd3a154edb4c94560bc39ea42ce
tree619ffb620424d799d3148c5c18c3954a8df65102
parent45c888e5df7efbdb9ae18cef706a6f8d2ede3e16
2009-03-26  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dave Hyatt

        https://bugs.webkit.org/show_bug.cgi?id=23914

        Tests: compositing/overflow/ancestor-overflow.html
               compositing/overflow/parent-overflow.html

        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        * rendering/RenderLayer.h:
        (WebCore::ClipRects::infiniteRect):
        New static method that returns a large rect that is used by the clipping
        logic.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
        Use parentClipRects(), rather than calculateRects(), to compute the overflow
        rect that we'll use to create a masking layer for composited clipping.

        * rendering/RenderLayerCompositor.cpp:
        (WebCore::RenderLayerCompositor::clippedByAncestor):
        Use parentClipRects() to see whether there's a layer between us and our
        compositing ancestor which applies clipping.

        (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
        A layer which imposes clipping to its children doesn't have to be a stacking
        context; it might be a normal flow layer; in either case, we can rely on the
        hasCompositingDescendant() bit.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@42009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/overflow/ancestor-overflow.html [new file with mode: 0644]
LayoutTests/compositing/overflow/parent-overflow.html [new file with mode: 0644]
LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/compositing/overflow/parent-overflow-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/compositing/overflow/parent-overflow-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/compositing/overflow/parent-overflow-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLayer.h
WebCore/rendering/RenderLayerBacking.cpp
WebCore/rendering/RenderLayerCompositor.cpp