Changeset 106121 in webkit


Ignore:
Timestamp:
Jan 27, 2012 7:35:40 AM (12 years ago)
Author:
noam.rosenthal@nokia.com
Message:

[Qt][WK2] Child layers appear in wrong position when scrolling
https://bugs.webkit.org/show_bug.cgi?id=77063

Reviewed by Simon Fraser.

When using the delegatesScrolling mode in FrameView, the compositor doesn't need
to control the special clip/scroll layers. Also, when we change that mode, we need to let
the compositor reset its backing-stores and rebuild them without scrolling/clipping.

This is tested by compositing tests, when run with Qt in touch mode.

  • page/FrameView.cpp:

(WebCore::FrameView::delegatesScrollingDidChange):
(WebCore):

  • page/FrameView.h:

(FrameView):

  • platform/ScrollView.cpp:

(WebCore::ScrollView::setDelegatesScrolling):

  • platform/ScrollView.h:

(WebCore::ScrollView::delegatesScrollingDidChange):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresScrollLayer):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106120 r106121  
     12012-01-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
     2
     3        [Qt][WK2] Child layers appear in wrong position when scrolling
     4        https://bugs.webkit.org/show_bug.cgi?id=77063
     5
     6        Reviewed by Simon Fraser.
     7
     8        When using the delegatesScrolling mode in FrameView, the compositor doesn't need
     9        to control the special clip/scroll layers. Also, when we change that mode, we need to let
     10        the compositor reset its backing-stores and rebuild them without scrolling/clipping.
     11
     12        This is tested by compositing tests, when run with Qt in touch mode.
     13
     14        * page/FrameView.cpp:
     15        (WebCore::FrameView::delegatesScrollingDidChange):
     16        (WebCore):
     17        * page/FrameView.h:
     18        (FrameView):
     19        * platform/ScrollView.cpp:
     20        (WebCore::ScrollView::setDelegatesScrolling):
     21        * platform/ScrollView.h:
     22        (WebCore::ScrollView::delegatesScrollingDidChange):
     23        * rendering/RenderLayerCompositor.cpp:
     24        (WebCore::RenderLayerCompositor::requiresScrollLayer):
     25
    1262012-01-27  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
    227
  • trunk/Source/WebCore/page/FrameView.cpp

    r106083 r106121  
    17031703}
    17041704
     1705void FrameView::delegatesScrollingDidChange()
     1706{
     1707#if USE(ACCELERATED_COMPOSITING)
     1708    // When we switch to delgatesScrolling mode, we should destroy the scrolling/clipping layers in RenderLayerCompositor.
     1709    clearBackingStores();
     1710#endif
     1711}
     1712
    17051713void FrameView::setFixedVisibleContentRect(const IntRect& visibleContentRect)
    17061714{
  • trunk/Source/WebCore/page/FrameView.h

    r106001 r106121  
    347347    virtual void visibleContentsResized();
    348348
     349    virtual void delegatesScrollingDidChange();
     350
    349351    // Override ScrollView methods to do point conversion via renderers, in order to
    350352    // take transforms into account.
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r106073 r106121  
    220220void ScrollView::setDelegatesScrolling(bool delegatesScrolling)
    221221{
     222    if (m_delegatesScrolling == delegatesScrolling)
     223        return;
     224
    222225    m_delegatesScrolling = delegatesScrolling;
     226    delegatesScrollingDidChange();
    223227}
    224228
  • trunk/Source/WebCore/platform/ScrollView.h

    r103563 r106121  
    302302
    303303    virtual void visibleContentsResized() = 0;
     304    virtual void delegatesScrollingDidChange() { }
    304305
    305306    IntRect fixedVisibleContentRect() const { return m_fixedVisibleContentRect; }
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r105879 r106121  
    15841584bool RenderLayerCompositor::requiresScrollLayer(RootLayerAttachment attachment) const
    15851585{
     1586    // This applies when the application UI handles scrolling, in which case RenderLayerCompositor doesn't need to manage it.
     1587    if (m_renderView->frameView()->delegatesScrolling())
     1588        return false;
     1589
    15861590    // We need to handle our own scrolling if we're:
    15871591    return !m_renderView->frameView()->platformWidget() // viewless (i.e. non-Mac, or Mac in WebKit2)
Note: See TracChangeset for help on using the changeset viewer.