Changeset 103435 in webkit


Ignore:
Timestamp:
Dec 21, 2011 1:01:43 PM (12 years ago)
Author:
andersca@apple.com
Message:

Inform the scrolling coordinator when scrollbar layers come and go
https://bugs.webkit.org/show_bug.cgi?id=75028

Reviewed by Andreas Kling and Simon Fraser.

  • page/ScrollingCoordinator.h:
  • page/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinator::setFrameViewHorizontalScrollbarLayer):
(WebCore::ScrollingCoordinator::setFrameViewVerticalScrollbarLayer):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r103429 r103435  
     12011-12-21  Anders Carlsson  <andersca@apple.com>
     2
     3        Inform the scrolling coordinator when scrollbar layers come and go
     4        https://bugs.webkit.org/show_bug.cgi?id=75028
     5
     6        Reviewed by Andreas Kling and Simon Fraser.
     7
     8        * page/ScrollingCoordinator.h:
     9        * page/mac/ScrollingCoordinatorMac.mm:
     10        (WebCore::ScrollingCoordinator::setFrameViewHorizontalScrollbarLayer):
     11        (WebCore::ScrollingCoordinator::setFrameViewVerticalScrollbarLayer):
     12        * rendering/RenderLayerCompositor.cpp:
     13        (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
     14
    1152011-12-20  Dmitry Lomov  <dslomov@google.com>
    216
  • trunk/Source/WebCore/page/ScrollingCoordinator.h

    r103426 r103435  
    5858
    5959    // Should be called whenever the scroll layer for the given frame view changes.
    60     void setFrameViewScrollLayer(FrameView*, const GraphicsLayer* scrollLayer);
     60    void frameViewScrollLayerDidChange(FrameView*, const GraphicsLayer*);
     61
     62    // Should be called whenever the horizontal scrollbar layer for the given frame view changes.
     63    void frameViewHorizontalScrollbarLayerDidChange(FrameView*, const GraphicsLayer*);
     64
     65    // Should be called whenever the horizontal scrollbar layer for the given frame view changes.
     66    void frameViewVerticalScrollbarLayerDidChange(FrameView*, const GraphicsLayer*);
    6167
    6268    // Should be called whenever the geometry of the given frame view changes,
  • trunk/Source/WebCore/page/mac/ScrollingCoordinatorMac.mm

    r103426 r103435  
    162162}
    163163
    164 void ScrollingCoordinator::setFrameViewScrollLayer(FrameView* frameView, const GraphicsLayer* scrollLayer)
     164void ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange(FrameView* frameView, const GraphicsLayer*)
     165{
     166    ASSERT(isMainThread());
     167    ASSERT(m_page);
     168
     169    if (frameView->frame() != m_page->mainFrame())
     170        return;
     171
     172    // FIXME: Implement.
     173}
     174
     175void ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange(FrameView* frameView, const GraphicsLayer*)
     176{
     177    ASSERT(isMainThread());
     178    ASSERT(m_page);
     179   
     180    if (frameView->frame() != m_page->mainFrame())
     181        return;
     182
     183    // FIXME: Implement.
     184}
     185
     186void ScrollingCoordinator::frameViewScrollLayerDidChange(FrameView* frameView, const GraphicsLayer* scrollLayer)
    165187{
    166188    ASSERT(isMainThread());
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r103426 r103435  
    17101710            m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get());
    17111711            layersChanged = true;
     1712
     1713#if ENABLE(THREADED_SCROLLING)
     1714            if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     1715                scrollingCoordinator->frameViewHorizontalScrollbarLayerDidChange(m_renderView->frameView(), m_layerForHorizontalScrollbar.get());
     1716#endif
    17121717        }
    17131718    } else if (m_layerForHorizontalScrollbar) {
     
    17151720        m_layerForHorizontalScrollbar = nullptr;
    17161721        layersChanged = true;
     1722
     1723#if ENABLE(THREADED_SCROLLING)
     1724        if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     1725            scrollingCoordinator->frameViewHorizontalScrollbarLayerDidChange(m_renderView->frameView(), 0);
     1726#endif
    17171727    }
    17181728
     
    17251735            m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get());
    17261736            layersChanged = true;
     1737
     1738#if ENABLE(THREADED_SCROLLING)
     1739            if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     1740                scrollingCoordinator->frameViewVerticalScrollbarLayerDidChange(m_renderView->frameView(), m_layerForVerticalScrollbar.get());
     1741#endif
    17271742        }
    17281743    } else if (m_layerForVerticalScrollbar) {
     
    17301745        m_layerForVerticalScrollbar = nullptr;
    17311746        layersChanged = true;
     1747
     1748#if ENABLE(THREADED_SCROLLING)
     1749        if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     1750            scrollingCoordinator->frameViewVerticalScrollbarLayerDidChange(m_renderView->frameView(), 0);
     1751#endif
    17321752    }
    17331753
     
    18021822#if ENABLE(THREADED_SCROLLING)
    18031823            if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
    1804                 scrollingCoordinator->setFrameViewScrollLayer(m_renderView->frameView(), m_scrollLayer.get());
     1824                scrollingCoordinator->frameViewScrollLayerDidChange(m_renderView->frameView(), m_scrollLayer.get());
    18051825#endif
    18061826        }
Note: See TracChangeset for help on using the changeset viewer.