Changeset 246612 in webkit


Ignore:
Timestamp:
Jun 19, 2019 2:47:07 PM (5 years ago)
Author:
Simon Fraser
Message:

Source/WebCore:
REGRESSION (246538): Newyorker.com header scrolls on page

Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
Overflow scroll will still scroll by changing boundsOrigin.

The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
a simple scroll container, and this change broke positioning for fixed position layers.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::~RenderLayerCompositor):
(WebCore::RenderLayerCompositor::frameViewDidChangeSize):
(WebCore::RenderLayerCompositor::updateScrollLayerPosition):
(WebCore::RenderLayerCompositor::updateScrollLayerClipping):
(WebCore::RenderLayerCompositor::frameViewDidScroll):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::destroyRootLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
(WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.

  • rendering/RenderLayerCompositor.h:

LayoutTests:
Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
Overflow scroll will still scroll by changing boundsOrigin.

The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
a simple scroll container, and this change broke positioning for fixed position layers.

  • compositing/iframes/scrolling-iframe-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt:
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
  • platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
  • platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
  • scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246611 r246612  
    2020
    2121        * platform/gtk/TestExpectations:
     22
     232019-06-19  Simon Fraser  <simon.fraser@apple.com>
     24
     25        Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
     26        Overflow scroll will still scroll by changing boundsOrigin.
     27       
     28        The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
     29        positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
     30        a simple scroll container, and this change broke positioning for fixed position layers.
     31
     32        * compositing/iframes/scrolling-iframe-expected.txt:
     33        * compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
     34        * compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
     35        * platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt:
     36        * platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
     37        * platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
     38        * platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
     39        * platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
     40        * platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt:
     41        * platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt:
     42        * scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt:
    2243
    23442019-06-19  Russell Epstein  <russell_e@apple.com>
  • trunk/LayoutTests/compositing/iframes/scrolling-iframe-expected.txt

    r246538 r246612  
    1717              (children 1
    1818                (GraphicsLayer
    19                   (bounds origin 80.00 80.00)
    2019                  (anchor 0.00 0.00)
    2120                  (bounds 285.00 135.00)
    2221                  (children 1
    2322                    (GraphicsLayer
     23                      (position -80.00 -80.00)
    2424                      (anchor 0.00 0.00)
    2525                      (children 1
  • trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt

    r246538 r246612  
    1818              (children 1
    1919                (GraphicsLayer
    20                   (bounds origin 0.00 100.00)
    2120                  (anchor 0.00 0.00)
    2221                  (bounds 400.00 300.00)
    2322                  (children 1
    2423                    (GraphicsLayer
     24                      (position 0.00 -100.00)
    2525                      (anchor 0.00 0.00)
    2626                      (children 1
  • trunk/LayoutTests/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt

    r246538 r246612  
    1818              (children 1
    1919                (GraphicsLayer
    20                   (bounds origin 0.00 100.00)
    2120                  (anchor 0.00 0.00)
    2221                  (bounds 400.00 300.00)
    2322                  (children 1
    2423                    (GraphicsLayer
     24                      (position 0.00 -100.00)
    2525                      (anchor 0.00 0.00)
    2626                      (children 1
  • trunk/LayoutTests/platform/ios-wk2/compositing/iframes/scrolling-iframe-expected.txt

    r246538 r246612  
    1717              (children 1
    1818                (GraphicsLayer
    19                   (bounds origin 80.00 80.00)
    2019                  (anchor 0.00 0.00)
    2120                  (bounds 300.00 150.00)
  • trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt

    r246538 r246612  
    6464              (children 1
    6565                (GraphicsLayer
    66                   (bounds origin 0.00 120.00)
    6766                  (anchor 0.00 0.00)
    6867                  (bounds 480.00 400.00)
  • trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt

    r246538 r246612  
    2222              (children 1
    2323                (GraphicsLayer
    24                   (bounds origin 0.00 100.00)
    2524                  (anchor 0.00 0.00)
    2625                  (bounds 400.00 300.00)
    2726                  (children 1
    2827                    (GraphicsLayer
     28                      (position 0.00 -100.00)
    2929                      (anchor 0.00 0.00)
    3030                      (children 1
  • trunk/LayoutTests/platform/mac-highsierra-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt

    r246538 r246612  
    2222              (children 1
    2323                (GraphicsLayer
    24                   (bounds origin 0.00 100.00)
    2524                  (anchor 0.00 0.00)
    2625                  (bounds 400.00 300.00)
    2726                  (children 1
    2827                    (GraphicsLayer
     28                      (position 0.00 -100.00)
    2929                      (anchor 0.00 0.00)
    3030                      (children 1
  • trunk/LayoutTests/platform/mac-sierra-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt

    r246538 r246612  
    2121              (children 1
    2222                (GraphicsLayer
    23                   (bounds origin 0.00 100.00)
    2423                  (anchor 0.00 0.00)
    2524                  (bounds 400.00 300.00)
    2625                  (children 1
    2726                    (GraphicsLayer
     27                      (position 0.00 -100.00)
    2828                      (children 1
    2929                        (GraphicsLayer
  • trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-scroll-repaint-expected.txt

    r246538 r246612  
    2121              (children 1
    2222                (GraphicsLayer
    23                   (bounds origin 0.00 100.00)
    2423                  (anchor 0.00 0.00)
    2524                  (bounds 400.00 300.00)
    2625                  (children 1
    2726                    (GraphicsLayer
     27                      (position 0.00 -100.00)
    2828                      (anchor 0.00 0.00)
    2929                      (children 1
     
    3535                              (bounds 400.00 1016.00)
    3636                              (drawsContent 1)
    37                               (repaint rects
    38                                 (rect 0.00 0.00 400.00 1016.00)
    39                                 (rect 0.00 0.00 400.00 1016.00)
    40                                 (rect 8.00 8.00 384.00 1000.00)
    41                                 (rect 0.00 0.00 400.00 1016.00)
    42                               )
    4337                              (children 1
    4438                                (GraphicsLayer
  • trunk/LayoutTests/platform/mac-wk1/compositing/repaint/iframes/compositing-iframe-with-fixed-background-doc-repaint-expected.txt

    r246538 r246612  
    2121              (children 1
    2222                (GraphicsLayer
    23                   (bounds origin 0.00 100.00)
    2423                  (anchor 0.00 0.00)
    2524                  (bounds 400.00 300.00)
    2625                  (children 1
    2726                    (GraphicsLayer
     27                      (position 0.00 -100.00)
    2828                      (anchor 0.00 0.00)
    2929                      (children 1
  • trunk/LayoutTests/scrollingcoordinator/scrolling-tree/fixed-inside-frame-expected.txt

    r246538 r246612  
    6666              (children 1
    6767                (GraphicsLayer
    68                   (bounds origin 0.00 120.00)
    6968                  (anchor 0.00 0.00)
    7069                  (bounds 465.00 400.00)
    7170                  (children 1
    7271                    (GraphicsLayer
     72                      (position 0.00 -120.00)
    7373                      (anchor 0.00 0.00)
    7474                      (children 1
  • trunk/Source/WebCore/ChangeLog

    r246611 r246612  
    4141        (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
    4242        (WebCore::computeRotatedWidthAndHeight): Deleted.
     43
     442019-06-19  Simon Fraser  <simon.fraser@apple.com>
     45
     46        REGRESSION (246538): Newyorker.com header scrolls on page
     47       
     48        Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
     49        Overflow scroll will still scroll by changing boundsOrigin.
     50       
     51        The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
     52        positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
     53        a simple scroll container, and this change broke positioning for fixed position layers.
     54
     55        * page/scrolling/AsyncScrollingCoordinator.cpp:
     56        (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
     57        * page/scrolling/ScrollingCoordinator.cpp:
     58        (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
     59        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
     60        (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
     61        * rendering/RenderLayerCompositor.cpp:
     62        (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
     63        (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
     64        (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
     65        (WebCore::RenderLayerCompositor::updateScrollLayerClipping):
     66        (WebCore::RenderLayerCompositor::frameViewDidScroll):
     67        (WebCore::RenderLayerCompositor::updateRootLayerPosition):
     68        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
     69        (WebCore::RenderLayerCompositor::ensureRootLayer):
     70        (WebCore::RenderLayerCompositor::destroyRootLayer):
     71        (WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
     72        (WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
     73        (WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.
     74        * rendering/RenderLayerCompositor.h:
    4375
    44762019-06-19  Adrian Perez de Castro  <aperez@igalia.com>
  • trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp

    r246538 r246612  
    447447void AsyncScrollingCoordinator::reconcileScrollPosition(FrameView& frameView, ScrollingLayerPositionAction scrollingLayerPositionAction)
    448448{
     449#if PLATFORM(IOS_FAMILY)
     450    // Doing all scrolling like this (UIScrollView style) would simplify code.
    449451    auto* scrollContainerLayer = scrollContainerLayerForFrameView(frameView);
    450452    if (!scrollContainerLayer)
    451453        return;
    452 
    453     // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).
    454454    if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set)
    455455        scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition());
    456456    else
    457457        scrollContainerLayer->syncBoundsOrigin(frameView.scrollPosition());
     458#else
     459    // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).
     460    auto* scrolledContentsLayer = scrolledContentsLayerForFrameView(frameView);
     461    if (!scrolledContentsLayer)
     462        return;
     463    if (scrollingLayerPositionAction == ScrollingLayerPositionAction::Set)
     464        scrolledContentsLayer->setPosition(-frameView.scrollPosition());
     465    else
     466        scrolledContentsLayer->syncPosition(-frameView.scrollPosition());
     467#endif
    458468}
    459469
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r246538 r246612  
    273273{
    274274    if (auto* renderView = frameView.frame().contentRenderer())
    275         return renderView->compositor().scrollContainerLayer();
     275        return renderView->compositor().clipLayer();
    276276    return nullptr;
    277277}
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm

    r246538 r246612  
    201201{
    202202    // We use scroll position here because the root content layer is offset to account for scrollOrigin (see FrameView::positionForRootContentLayer).
    203     [scrollContainerLayer() _web_setLayerBoundsOrigin:currentScrollPosition()];
     203    scrolledContentsLayer().position = -currentScrollPosition();
    204204}
    205205
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r246538 r246612  
    302302    GraphicsLayer::unparentAndClear(m_rootContentsLayer);
    303303   
     304    GraphicsLayer::unparentAndClear(m_clipLayer);
    304305    GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
    305306    GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
     
    19691970
    19701971    if (m_scrolledContentsLayer) {
    1971         updateScrollContainerGeometry();
     1972        updateScrollLayerClipping();
    19721973        frameViewDidScroll();
    19731974        updateOverflowControlsLayers();
     
    19891990}
    19901991
    1991 void RenderLayerCompositor::updateLayersForScrollPosition()
     1992void RenderLayerCompositor::updateScrollLayerPosition()
    19921993{
    19931994    ASSERT(!hasCoordinatedScrolling());
    1994     ASSERT(m_scrollContainerLayer);
     1995    ASSERT(m_scrolledContentsLayer);
    19951996
    19961997    auto& frameView = m_renderView.frameView();
    1997     // This uses scrollPosition because the root content layer accounts for scrollOrigin (see FrameView::positionForRootContentLayer()).
    1998     m_scrollContainerLayer->setBoundsOrigin(frameView.scrollPosition());
     1998    IntPoint scrollPosition = frameView.scrollPosition();
     1999
     2000    // We use scroll position here because the root content layer is offset to account for scrollOrigin (see FrameView::positionForRootContentLayer).
     2001    m_scrolledContentsLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
    19992002
    20002003    if (auto* fixedBackgroundLayer = fixedRootBackgroundLayer())
     
    20022005}
    20032006
    2004 void RenderLayerCompositor::updateScrollContainerGeometry()
    2005 {
    2006     if (!m_scrollContainerLayer)
     2007void RenderLayerCompositor::updateScrollLayerClipping()
     2008{
     2009    auto* layerForClipping = this->layerForClipping();
     2010    if (!layerForClipping)
    20072011        return;
    20082012
    2009     m_scrollContainerLayer->setSize(m_renderView.frameView().sizeForVisibleContent());
    2010     m_scrollContainerLayer->setPosition(positionForClipLayer());
     2013    layerForClipping->setSize(m_renderView.frameView().sizeForVisibleContent());
     2014    layerForClipping->setPosition(positionForClipLayer());
    20112015}
    20122016
     
    20332037    }
    20342038
    2035     updateLayersForScrollPosition();
     2039    updateScrollLayerPosition();
    20362040}
    20372041
     
    22502254        m_rootContentsLayer->setSize(m_renderView.frameView().contentsSize());
    22512255        m_rootContentsLayer->setPosition(m_renderView.frameView().positionForRootContentLayer());
    2252         m_rootContentsLayer->setAnchorPoint({ });
    2253     }
    2254 
    2255     updateScrollContainerGeometry();
     2256        m_rootContentsLayer->setAnchorPoint(FloatPoint3D());
     2257    }
     2258
     2259    updateScrollLayerClipping();
    22562260
    22572261#if ENABLE(RUBBER_BANDING)
     
    36803684            // We want the overhang areas layer to be positioned below the frame contents,
    36813685            // so insert it below the clip layer.
    3682             m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, m_scrollContainerLayer.get());
     3686            m_overflowControlsHostLayer->addChildBelow(*m_layerForOverhangAreas, layerForClipping());
    36833687        }
    36843688    } else
     
    37703774        IntRect overflowRect = snappedIntRect(m_renderView.layoutOverflowRect());
    37713775        m_rootContentsLayer->setSize(FloatSize(overflowRect.maxX(), overflowRect.maxY()));
    3772         m_rootContentsLayer->setPosition({ });
     3776        m_rootContentsLayer->setPosition(FloatPoint());
    37733777
    37743778#if PLATFORM(IOS_FAMILY)
     
    37863790        if (!m_overflowControlsHostLayer) {
    37873791            ASSERT(!m_scrolledContentsLayer);
     3792            ASSERT(!m_clipLayer);
    37883793
    37893794            // Create a layer to host the clipping layer and the overflow controls layers.
     
    37913796            m_overflowControlsHostLayer->setName("overflow controls host");
    37923797
    3793             m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer);
    3794             m_scrollContainerLayer->setName("scroll container");
    3795             m_scrollContainerLayer->setMasksToBounds(true);
    3796             m_scrollContainerLayer->setAnchorPoint({ });
    3797 
    37983798            m_scrolledContentsLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrolledContents);
    37993799            m_scrolledContentsLayer->setName("scrolled contents");
    38003800            m_scrolledContentsLayer->setAnchorPoint({ });
    38013801
    3802             m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer);
    3803             m_scrollContainerLayer->addChild(*m_scrolledContentsLayer);
     3802#if PLATFORM(IOS_FAMILY)
     3803            if (m_renderView.settings().asyncFrameScrollingEnabled()) {
     3804                m_scrollContainerLayer = GraphicsLayer::create(graphicsLayerFactory(), *this, GraphicsLayer::Type::ScrollContainer);
     3805
     3806                m_scrollContainerLayer->setName("scroll container");
     3807                m_scrollContainerLayer->setMasksToBounds(true);
     3808                m_scrollContainerLayer->setAnchorPoint({ });
     3809
     3810                m_scrollContainerLayer->addChild(*m_scrolledContentsLayer);
     3811                m_overflowControlsHostLayer->addChild(*m_scrollContainerLayer);
     3812            }
     3813#endif
     3814            // FIXME: m_scrollContainerLayer and m_clipLayer have similar roles here, but m_clipLayer has some special positioning to
     3815            // account for clipping and top content inset (see FrameView::yPositionForInsetClipLayer()).
     3816            if (!m_scrollContainerLayer) {
     3817                m_clipLayer = GraphicsLayer::create(graphicsLayerFactory(), *this);
     3818                m_clipLayer->setName("frame clipping");
     3819                m_clipLayer->setMasksToBounds(true);
     3820                m_clipLayer->setAnchorPoint({ });
     3821
     3822                m_clipLayer->addChild(*m_scrolledContentsLayer);
     3823                m_overflowControlsHostLayer->addChild(*m_clipLayer);
     3824            }
     3825
    38043826            m_scrolledContentsLayer->addChild(*m_rootContentsLayer);
    38053827
    3806             updateScrollContainerGeometry();
     3828            updateScrollLayerClipping();
    38073829            updateOverflowControlsLayers();
    38083830
     
    38103832                scheduleLayerFlush(true);
    38113833            else
    3812                 updateLayersForScrollPosition();
     3834                updateScrollLayerPosition();
    38133835        }
    38143836    } else {
    38153837        if (m_overflowControlsHostLayer) {
    38163838            GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer);
     3839            GraphicsLayer::unparentAndClear(m_clipLayer);
    38173840            GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
    38183841            GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
     
    38613884    if (m_overflowControlsHostLayer) {
    38623885        GraphicsLayer::unparentAndClear(m_overflowControlsHostLayer);
     3886        GraphicsLayer::unparentAndClear(m_clipLayer);
    38633887        GraphicsLayer::unparentAndClear(m_scrollContainerLayer);
    38643888        GraphicsLayer::unparentAndClear(m_scrolledContentsLayer);
     
    43004324        scrollingCoordinator.setNodeLayers(nodeID, { nullptr,
    43014325            scrollContainerLayer(), scrolledContentsLayer(),
    4302             fixedRootBackgroundLayer(), nullptr, rootContentsLayer(),
     4326            fixedRootBackgroundLayer(), clipLayer(), rootContentsLayer(),
    43034327            frameView.layerForHorizontalScrollbar(), frameView.layerForVerticalScrollbar() });
    43044328    } else {
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r246538 r246612  
    247247    GraphicsLayer* scrollContainerLayer() const { return m_scrollContainerLayer.get(); }
    248248    GraphicsLayer* scrolledContentsLayer() const { return m_scrolledContentsLayer.get(); }
     249    GraphicsLayer* clipLayer() const { return m_clipLayer.get(); }
    249250    GraphicsLayer* rootContentsLayer() const { return m_rootContentsLayer.get(); }
     251
     252    GraphicsLayer* layerForClipping() const {  return m_clipLayer ? m_clipLayer.get() : m_scrollContainerLayer.get();  }
    250253
    251254#if ENABLE(RUBBER_BANDING)
     
    438441    void updateOverflowControlsLayers();
    439442
    440     void updateLayersForScrollPosition();
    441     void updateScrollContainerGeometry();
     443    void updateScrollLayerPosition();
     444    void updateScrollLayerClipping();
    442445
    443446    FloatPoint positionForClipLayer() const;
     
    572575
    573576    // Enclosing clipping layer for iframe content
     577    RefPtr<GraphicsLayer> m_clipLayer;
    574578    RefPtr<GraphicsLayer> m_scrollContainerLayer;
    575579    RefPtr<GraphicsLayer> m_scrolledContentsLayer;
Note: See TracChangeset for help on using the changeset viewer.