Changeset 169733 in webkit


Ignore:
Timestamp:
Jun 9, 2014, 5:37:06 PM (11 years ago)
Author:
Simon Fraser
Message:

Work towards having frames in the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=133665

Reviewed by Tim Horton.

Source/WebCore:
Optionally (based on Setting) create nodes in the scrolling tree for frames which
contain async-scrollable content. This will be used on iOS/WK2 to support accelerated
overflow-scroll in iframes. The setting allows for testing on OS X.

The change breaks an assumption in ScrollingCoordinator/AsyncScrollingCoordinator
that we're always dealing with the main frame, and changes logic in RenderLayerCompositor
so that we can connect the scrolling tree across frame boundaries. RenderLayerCompositor
maintains a m_subframeScrollLayersNeedReattach flag that gets set whenever we add or remove
scroll-coordinated layers in the current frame. When set, after updating compositing
layers we walk child frames, and, if they have scrolling nodes, re-attach them to the
scrolling tree (which will find the new ancestor node).

Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html

platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame.html

  • WebCore.exp.in:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollLayerID): Use the new "for role" way of getting the node ID.

  • page/Settings.cpp:
  • page/Settings.in: Add scrollingTreeIncludesFrames.
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged): Only set
the region for the main frame.
(WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode): updateScrollPositionAfterAsyncScroll()
needs to know which FrameView a given nodeID is hosted in; doing a walk of the frame tree for
non-main frames seems to be the safest way.
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::syncChildPositions):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView): Consult the new setting.
(WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::synchronousScrollingReasons):
(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
(WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
(WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
(WebCore::ScrollingCoordinator::replaySessionStateDidChange):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously): Deleted.

  • rendering/RenderLayerBacking.h: Rather than separate functions to get the two scrolling

node IDs, having one scrollingNodeIDForRole() makes calling code cleaner.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::updateCompositingLayers): call reattachSubframeScrollLayers()
after a compositing tree update.
(WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer): Deals with the various configurations
in which we can do async scrolling of sticky elements.
(WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer):
(WebCore::useCoordinatedScrollingForLayer):
(WebCore::RenderLayerCompositor::requiresCompositingForPosition):
(WebCore::RenderLayerCompositor::requiresCompositingForScrolling): Moved.
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This is a bug fix;
we only need to notify child frames, not all descendant frames.
(WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
(WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
(WebCore::enclosingScrollingNodeID):
(WebCore::scrollCoordinatedAncestorInParentOfFrame):
(WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
(WebCore::RenderLayerCompositor::attachScrollingNode):
(WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
(WebCore::isStickyInAcceleratedScrollingLayerOrViewport): Deleted.
(WebCore::isViewportConstrainedFixedOrStickyLayer): Deleted.
(WebCore::isMainFrameScrollingOrOverflowScrolling): Deleted.
(WebCore::nearestScrollCoordinatedAncestor): Deleted.

  • rendering/RenderLayerCompositor.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::setSelection): Added comment.

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::setScrollingTreeIncludesFrames):

  • testing/InternalSettings.h: Removed some useless parameter names.
  • testing/InternalSettings.idl: Added setScrollingTreeIncludesFrames() setting.

Source/WebKit2:
Override coordinatesScrollingForFrameView() to always return true for composited
frames, for iOS WK2 (eventually this class will have to be specialized for iOS and OS X).

  • WebProcess/Scrolling/RemoteScrollingCoordinator.h:
  • WebProcess/Scrolling/RemoteScrollingCoordinator.mm:

(WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):

LayoutTests:
Tests that dump the scrolling tree with subframes.

  • platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame.html: Added.
  • platform/mac-wk2/tiled-drawing/scrolling/frames/resources/doc-with-sticky.html: Added.
Location:
trunk
Files:
7 added
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r169725 r169733  
     12014-06-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Work towards having frames in the scrolling tree
     4        https://bugs.webkit.org/show_bug.cgi?id=133665
     5
     6        Reviewed by Tim Horton.
     7       
     8        Tests that dump the scrolling tree with subframes.
     9
     10        * platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt: Added.
     11        * platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt: Added.
     12        * platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html: Added.
     13        * platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame.html: Added.
     14        * platform/mac-wk2/tiled-drawing/scrolling/frames/resources/doc-with-sticky.html: Added.
     15
    1162014-06-09  Eric Carlson  <eric.carlson@apple.com>
    217
  • trunk/Source/WebCore/ChangeLog

    r169731 r169733  
     12014-06-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Work towards having frames in the scrolling tree
     4        https://bugs.webkit.org/show_bug.cgi?id=133665
     5
     6        Reviewed by Tim Horton.
     7       
     8        Optionally (based on Setting) create nodes in the scrolling tree for frames which
     9        contain async-scrollable content. This will be used on iOS/WK2 to support accelerated
     10        overflow-scroll in iframes. The setting allows for testing on OS X.
     11       
     12        The change breaks an assumption in ScrollingCoordinator/AsyncScrollingCoordinator
     13        that we're always dealing with the main frame, and changes logic in RenderLayerCompositor
     14        so that we can connect the scrolling tree across frame boundaries. RenderLayerCompositor
     15        maintains a m_subframeScrollLayersNeedReattach flag that gets set whenever we add or remove
     16        scroll-coordinated layers in the current frame. When set, after updating compositing
     17        layers we walk child frames, and, if they have scrolling nodes, re-attach them to the
     18        scrolling tree (which will find the new ancestor node).
     19
     20        Tests: platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed.html
     21               platform/mac-wk2/tiled-drawing/scrolling/frames/coordinated-frame.html
     22
     23        * WebCore.exp.in:
     24        * page/FrameView.cpp:
     25        (WebCore::FrameView::scrollLayerID): Use the new "for role" way of getting the node ID.
     26        * page/Settings.cpp:
     27        * page/Settings.in: Add scrollingTreeIncludesFrames.
     28        * page/scrolling/AsyncScrollingCoordinator.cpp:
     29        (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
     30        (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged): Only set
     31        the region for the main frame.
     32        (WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode): updateScrollPositionAfterAsyncScroll()
     33        needs to know which FrameView a given nodeID is hosted in; doing a walk of the frame tree for
     34        non-main frames seems to be the safest way.
     35        (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
     36        (WebCore::AsyncScrollingCoordinator::syncChildPositions):
     37        * page/scrolling/AsyncScrollingCoordinator.h:
     38        * page/scrolling/ScrollingCoordinator.cpp:
     39        (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView): Consult the new setting.
     40        (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
     41        (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
     42        (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
     43        (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
     44        (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
     45        (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
     46        (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
     47        (WebCore::ScrollingCoordinator::replaySessionStateDidChange):
     48        (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
     49        * page/scrolling/ScrollingCoordinator.h:
     50        (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously): Deleted.
     51        * rendering/RenderLayerBacking.h: Rather than separate functions to get the two scrolling
     52        node IDs, having one scrollingNodeIDForRole() makes calling code cleaner.
     53        * rendering/RenderLayerCompositor.cpp:
     54        (WebCore::RenderLayerCompositor::RenderLayerCompositor):
     55        (WebCore::RenderLayerCompositor::updateCompositingLayers):  call reattachSubframeScrollLayers()
     56        after a compositing tree update.
     57        (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer): Deals with the various configurations
     58        in which we can do async scrolling of sticky elements.
     59        (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer):
     60        (WebCore::useCoordinatedScrollingForLayer):
     61        (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
     62        (WebCore::RenderLayerCompositor::requiresCompositingForScrolling): Moved.
     63        (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This is a bug fix;
     64        we only need to notify child frames, not all descendant frames.
     65        (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
     66        (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
     67        (WebCore::enclosingScrollingNodeID):
     68        (WebCore::scrollCoordinatedAncestorInParentOfFrame):
     69        (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
     70        (WebCore::RenderLayerCompositor::attachScrollingNode):
     71        (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
     72        (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
     73        (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
     74        (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
     75        (WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
     76        (WebCore::isStickyInAcceleratedScrollingLayerOrViewport): Deleted.
     77        (WebCore::isViewportConstrainedFixedOrStickyLayer): Deleted.
     78        (WebCore::isMainFrameScrollingOrOverflowScrolling): Deleted.
     79        (WebCore::nearestScrollCoordinatedAncestor): Deleted.
     80        * rendering/RenderLayerCompositor.h:
     81        * rendering/RenderView.cpp:
     82        (WebCore::RenderView::setSelection): Added comment.
     83        * testing/InternalSettings.cpp:
     84        (WebCore::InternalSettings::setScrollingTreeIncludesFrames):
     85        * testing/InternalSettings.h: Removed some useless parameter names.
     86        * testing/InternalSettings.idl: Added setScrollingTreeIncludesFrames() setting.
     87
    1882014-06-09  Benjamin Poulain  <bpoulain@apple.com>
    289
  • trunk/Source/WebCore/WebCore.exp.in

    r169679 r169733  
    15221522__ZNK7WebCore10RenderText16linesBoundingBoxEv
    15231523__ZNK7WebCore10RenderView12documentRectEv
     1524__ZNK7WebCore10RenderView15usesCompositingEv
    15241525__ZNK7WebCore10RenderView20unscaledDocumentRectEv
    15251526__ZNK7WebCore10ScrollView12contentsSizeEv
  • trunk/Source/WebCore/page/FrameView.cpp

    r169651 r169733  
    805805        return 0;
    806806
    807     return backing->scrollingNodeID();
     807    return backing->scrollingNodeIDForRole(FrameScrollingNode);
    808808}
    809809
  • trunk/Source/WebCore/page/Settings.cpp

    r168726 r169733  
    128128static const bool defaultMediaPlaybackRequiresUserGesture = true;
    129129static const bool defaultShouldRespectImageOrientation = true;
     130static const bool defaultScrollingTreeIncludesFrames = true;
    130131#else
    131132static const bool defaultFixedPositionCreatesStackingContext = false;
     
    135136static const bool defaultMediaPlaybackRequiresUserGesture = false;
    136137static const bool defaultShouldRespectImageOrientation = false;
     138static const bool defaultScrollingTreeIncludesFrames = false;
    137139#endif
    138140
  • trunk/Source/WebCore/page/Settings.in

    r168978 r169733  
    133133shouldDisplayTextDescriptions initial=false, conditional=VIDEO_TRACK
    134134scrollingCoordinatorEnabled initial=false
     135scrollingTreeIncludesFrames initial=defaultScrollingTreeIncludesFrames
    135136scrollAnimatorEnabled initial=true, conditional=SMOOTH_SCROLLING
    136137notificationsEnabled initial=true
  • trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp

    r169123 r169733  
    7373    // In the future, we may want to have the ability to set non-fast scrolling regions for more than
    7474    // just the root node. But right now, this concept only applies to the root.
    75     m_scrollingStateTree->rootStateNode()->setNonFastScrollableRegion(computeNonFastScrollableRegion(&m_page->mainFrame(), IntPoint()));
     75    if (frameView->frame().isMainFrame())
     76        m_scrollingStateTree->rootStateNode()->setNonFastScrollableRegion(computeNonFastScrollableRegion(&frameView->frame(), IntPoint()));
    7677
    7778    if (!coordinatesScrollingForFrameView(frameView))
     
    106107}
    107108
    108 void AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged(FrameView*)
     109void AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged(FrameView* frameView)
    109110{
    110111    if (!m_scrollingStateTree->rootStateNode())
    111112        return;
    112113
    113     m_scrollingStateTree->rootStateNode()->setNonFastScrollableRegion(computeNonFastScrollableRegion(&m_page->mainFrame(), IntPoint()));
     114    if (frameView->frame().isMainFrame())
     115        m_scrollingStateTree->rootStateNode()->setNonFastScrollableRegion(computeNonFastScrollableRegion(&frameView->frame(), IntPoint()));
    114116}
    115117
     
    194196}
    195197
     198FrameView* AsyncScrollingCoordinator::frameViewForScrollingNode(ScrollingNodeID scrollingNodeID) const
     199{
     200    if (scrollingNodeID == m_scrollingStateTree->rootStateNode()->scrollingNodeID())
     201        return m_page->mainFrame().view();
     202
     203    ScrollingStateNode* stateNode = m_scrollingStateTree->stateNodeForID(scrollingNodeID);
     204    if (!stateNode)
     205        return nullptr;
     206
     207    // Find the enclosing frame scrolling node.
     208    ScrollingStateNode* parentNode = stateNode;
     209    while (parentNode && parentNode->nodeType() != FrameScrollingNode)
     210        parentNode = parentNode->parent();
     211   
     212    if (!parentNode)
     213        return nullptr;
     214   
     215    // Walk the frame tree to find the matching FrameView. This is not ideal, but avoids back pointers to FrameViews
     216    // from ScrollingTreeStateNodes.
     217    for (Frame* frame = &m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
     218        if (FrameView* view = frame->view()) {
     219            if (view->scrollLayerID() == parentNode->scrollingNodeID())
     220                return view;
     221        }
     222    }
     223
     224    return nullptr;
     225}
     226
    196227void AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll(ScrollingNodeID scrollingNodeID, const FloatPoint& scrollPosition, bool programmaticScroll, SetOrSyncScrollingLayerPosition scrollingLayerPositionAction)
    197228{
     
    201232        return;
    202233
    203     FrameView* frameView = m_page->mainFrame().view();
     234    FrameView* frameView = frameViewForScrollingNode(scrollingNodeID);
    204235    if (!frameView)
    205236        return;
    206237
    207     // Main frame.
    208238    if (scrollingNodeID == frameView->scrollLayerID()) {
    209239        bool oldProgrammaticScroll = frameView->inProgrammaticScroll();
     
    317347
    318348    // FIXME: We'll have to traverse deeper into the tree at some point.
    319     size_t size = children->size();
    320     for (size_t i = 0; i < size; ++i) {
    321         ScrollingStateNode* child = children->at(i).get();
     349    for (auto& child : *children)
    322350        child->syncLayerPositionForViewportRect(viewportRect);
    323     }
    324351}
    325352
  • trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h

    r169123 r169733  
    7171    void updateScrollPositionAfterAsyncScroll(ScrollingNodeID, const FloatPoint&, bool programmaticScroll, SetOrSyncScrollingLayerPosition);
    7272
     73    virtual String scrollingStateTreeAsText() const override;
     74
    7375private:
    7476    virtual bool isAsyncScrollingCoordinator() const override { return true; }
     
    9294    virtual void updateOverflowScrollingNode(ScrollingNodeID, GraphicsLayer* scrollLayer, GraphicsLayer* scrolledContentsLayer, const ScrollingGeometry* = nullptr);
    9395   
    94     virtual String scrollingStateTreeAsText() const override;
    9596    virtual bool isRubberBandInProgress() const override;
    9697    virtual void setScrollPinningBehavior(ScrollPinningBehavior) override;
     
    108109
    109110    void updateScrollPositionAfterAsyncScrollTimerFired(Timer<AsyncScrollingCoordinator>*);
     111   
     112    FrameView* frameViewForScrollingNode(ScrollingNodeID) const;
    110113
    111114    Timer<AsyncScrollingCoordinator> m_updateNodeScrollPositionTimer;
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r168665 r169733  
    4040#include "RenderView.h"
    4141#include "ScrollAnimator.h"
     42#include "Settings.h"
    4243#include <wtf/MainThread.h>
    4344#include <wtf/text/StringBuilder.h>
     
    8788    ASSERT(m_page);
    8889
    89     // We currently only handle the main frame.
    90     if (!frameView->frame().isMainFrame())
     90    if (!frameView->frame().isMainFrame() && !m_page->settings().scrollingTreeIncludesFrames())
    9191        return false;
    9292
    93     // We currently only support composited mode.
    9493    RenderView* renderView = m_page->mainFrame().contentRenderer();
    9594    if (!renderView)
     
    182181        return;
    183182
    184     updateSynchronousScrollingReasons();
     183    updateSynchronousScrollingReasons(frameView);
    185184}
    186185
     
    193192        return;
    194193
    195     updateSynchronousScrollingReasons();
     194    updateSynchronousScrollingReasons(frameView);
    196195}
    197196
     
    286285    frameViewLayoutUpdated(frameView);
    287286    recomputeWheelEventHandlerCountForFrameView(frameView);
    288     updateSynchronousScrollingReasons();
     287    updateSynchronousScrollingReasons(frameView);
    289288}
    290289
     
    323322}
    324323
    325 SynchronousScrollingReasons ScrollingCoordinator::synchronousScrollingReasons() const
    326 {
    327     FrameView* frameView = m_page->mainFrame().view();
     324SynchronousScrollingReasons ScrollingCoordinator::synchronousScrollingReasons(FrameView* frameView) const
     325{
    328326    if (!frameView)
    329327        return static_cast<SynchronousScrollingReasons>(0);
     
    344342    if (supportsFixedPositionLayers() && hasVisibleSlowRepaintViewportConstrainedObjects(frameView))
    345343        synchronousScrollingReasons |= HasNonLayerViewportConstrainedObjects;
    346     if (m_page->mainFrame().document() && m_page->mainFrame().document()->isImageDocument())
     344    if (frameView->frame().mainFrame().document() && frameView->frame().document()->isImageDocument())
    347345        synchronousScrollingReasons |= IsImageDocument;
    348346
     
    350348}
    351349
    352 void ScrollingCoordinator::updateSynchronousScrollingReasons()
    353 {
    354     setSynchronousScrollingReasons(synchronousScrollingReasons());
     350void ScrollingCoordinator::updateSynchronousScrollingReasons(FrameView* frameView)
     351{
     352    // FIXME: Once we support async scrolling of iframes, we'll have to track the synchronous scrolling
     353    // reasons per frame (maybe on scrolling tree nodes).
     354    if (!frameView->frame().isMainFrame())
     355        return;
     356
     357    setSynchronousScrollingReasons(synchronousScrollingReasons(frameView));
    355358}
    356359
     
    361364
    362365    m_forceSynchronousScrollLayerPositionUpdates = forceSynchronousScrollLayerPositionUpdates;
    363     updateSynchronousScrollingReasons();
     366    updateSynchronousScrollingReasons(m_page->mainFrame().view());
     367}
     368
     369bool ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously() const
     370{
     371    return synchronousScrollingReasons(m_page->mainFrame().view());
    364372}
    365373
     
    367375void ScrollingCoordinator::replaySessionStateDidChange()
    368376{
    369     updateSynchronousScrollingReasons();
     377    // FIXME: Once we support async scrolling of iframes, this should go through all subframes.
     378    updateSynchronousScrollingReasons(m_page->mainFrame().view());
    370379}
    371380#endif
     
    404413String ScrollingCoordinator::synchronousScrollingReasonsAsText() const
    405414{
    406     return synchronousScrollingReasonsAsText(synchronousScrollingReasons());
     415    return synchronousScrollingReasonsAsText(synchronousScrollingReasons(m_page->mainFrame().view()));
    407416}
    408417
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h

    r169123 r169733  
    111111
    112112    // Return whether this scrolling coordinator handles scrolling for the given frame view.
    113     bool coordinatesScrollingForFrameView(FrameView*) const;
     113    virtual bool coordinatesScrollingForFrameView(FrameView*) const;
    114114
    115115    // Should be called whenever the given frame view has been laid out.
     
    184184    };
    185185
    186     SynchronousScrollingReasons synchronousScrollingReasons() const;
    187     bool shouldUpdateScrollLayerPositionSynchronously() const { return synchronousScrollingReasons(); }
     186    SynchronousScrollingReasons synchronousScrollingReasons(FrameView*) const;
     187    bool shouldUpdateScrollLayerPositionSynchronously() const;
    188188
    189189    virtual void willDestroyScrollableArea(ScrollableArea*) { }
     
    219219
    220220    virtual bool hasVisibleSlowRepaintViewportConstrainedObjects(FrameView*) const;
    221     void updateSynchronousScrollingReasons();
     221    void updateSynchronousScrollingReasons(FrameView*);
    222222   
    223223    bool m_forceSynchronousScrollLayerPositionUpdates;
  • trunk/Source/WebCore/rendering/RenderLayerBacking.h

    r169161 r169733  
    109109
    110110    void detachFromScrollingCoordinator();
    111 
    112     ScrollingNodeID viewportConstrainedNodeID() const { return m_viewportConstrainedNodeID; }
    113     void setViewportConstrainedNodeID(ScrollingNodeID nodeID) { m_viewportConstrainedNodeID = nodeID; }
    114 
    115     ScrollingNodeID scrollingNodeID() const { return m_scrollingNodeID; }
    116     void setScrollingNodeID(ScrollingNodeID nodeID) { m_scrollingNodeID = nodeID; }
     111   
     112    ScrollingNodeID scrollingNodeIDForRole(ScrollingNodeType nodeType) const
     113    {
     114        switch (nodeType) {
     115        case FrameScrollingNode:
     116        case OverflowScrollingNode:
     117            return m_scrollingNodeID;
     118        case FixedNode:
     119        case StickyNode:
     120            return m_viewportConstrainedNodeID;
     121        }
     122        return 0;
     123    }
     124   
     125    void setScrollingNodeIDForRole(ScrollingNodeID nodeID, ScrollingNodeType nodeType)
     126    {
     127        switch (nodeType) {
     128        case FrameScrollingNode:
     129        case OverflowScrollingNode:
     130            m_scrollingNodeID = nodeID;
     131            break;
     132        case FixedNode:
     133        case StickyNode:
     134            m_viewportConstrainedNodeID = nodeID;
     135            break;
     136        }
     137    }
    117138   
    118139    ScrollingNodeID scrollingNodeIDForChildren() const { return m_scrollingNodeID ? m_scrollingNodeID : m_viewportConstrainedNodeID; }
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r169651 r169733  
    280280    , m_forceCompositingMode(false)
    281281    , m_inPostLayoutUpdate(false)
     282    , m_subframeScrollLayersNeedReattach(false)
    282283    , m_isTrackingRepaints(false)
    283284    , m_layersWithTiledBackingCount(0)
     
    730731                m_rootContentLayer->setChildren(childList);
    731732        }
     733       
     734        reattachSubframeScrollLayers();
    732735    } else if (needGeometryUpdate) {
    733736        // We just need to do a geometry update. This is only used for position:fixed scrolling;
    734737        // most of the time, geometry is updated via RenderLayer::styleChanged().
    735738        updateLayerTreeGeometry(*updateRoot, 0);
     739        ASSERT(!isFullUpdate || !m_subframeScrollLayersNeedReattach);
    736740    }
    737741   
     
    25242528}
    25252529
    2526 #if PLATFORM(IOS)
    2527 bool RenderLayerCompositor::requiresCompositingForScrolling(const RenderLayer& layer) const
    2528 {
    2529     if (!layer.hasAcceleratedTouchScrolling())
    2530         return false;
    2531 
    2532     if (!m_inPostLayoutUpdate) {
    2533         m_reevaluateCompositingAfterLayout = true;
    2534         return layer.isComposited();
    2535     }
    2536 
    2537     return layer.hasTouchScrollableOverflow();
    2538 }
    2539 #endif
    2540 
    25412530bool RenderLayerCompositor::requiresCompositingForFilters(RenderLayerModelObject& renderer) const
    25422531{
     
    25522541}
    25532542
     2543bool RenderLayerCompositor::isAsyncScrollableStickyLayer(const RenderLayer& layer, const RenderLayer** enclosingAcceleratedOverflowLayer) const
     2544{
     2545    ASSERT(layer.renderer().isStickyPositioned());
     2546
     2547    RenderLayer* enclosingOverflowLayer = layer.enclosingOverflowClipLayer(ExcludeSelf);
     2548
    25542549#if PLATFORM(IOS)
    2555 static bool isStickyInAcceleratedScrollingLayerOrViewport(const RenderLayer& layer, const RenderLayer** enclosingAcceleratedOverflowLayer = 0)
    2556 {
    2557     ASSERT(layer.renderer().isStickyPositioned());
    2558 
    2559     RenderLayer* enclosingOverflowLayer = layer.enclosingOverflowClipLayer(ExcludeSelf);
    25602550    if (enclosingOverflowLayer && enclosingOverflowLayer->hasTouchScrollableOverflow()) {
    25612551        if (enclosingAcceleratedOverflowLayer)
     
    25632553        return true;
    25642554    }
    2565 
    2566     return !enclosingOverflowLayer;
    2567 }
    2568 #endif
    2569 
    2570 static bool isViewportConstrainedFixedOrStickyLayer(const RenderLayer& layer)
    2571 {
     2555#else
     2556    UNUSED_PARAM(enclosingAcceleratedOverflowLayer);
     2557#endif
     2558    // If the layer is inside normal overflow, it's not async-scrollable.
     2559    if (enclosingOverflowLayer)
     2560        return false;
     2561
     2562    // No overflow ancestor, so see if the frame supports async scrolling.
     2563    if (hasCoordinatedScrolling())
     2564        return true;
     2565
    25722566#if PLATFORM(IOS)
     2567    // iOS WK1 has fixed/sticky support in the main frame via WebFixedPositionContent.
     2568    return m_renderView.frameView().frame().isMainFrame();
     2569#else
     2570    return false;
     2571#endif
     2572}
     2573
     2574bool RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer(const RenderLayer& layer) const
     2575{
    25732576    if (layer.renderer().isStickyPositioned())
    2574         return isStickyInAcceleratedScrollingLayerOrViewport(layer);
    2575 #else
    2576     if (layer.renderer().isStickyPositioned())
    2577         return !layer.enclosingOverflowClipLayer(ExcludeSelf);
    2578 #endif
     2577        return isAsyncScrollableStickyLayer(layer);
    25792578
    25802579    if (layer.renderer().style().position() != FixedPosition)
     
    25902589}
    25912590
    2592 static bool isMainFrameScrollingOrOverflowScrolling(RenderView& view, const RenderLayer& layer)
    2593 {
    2594     if (layer.isRootLayer() && !view.document().ownerElement())
     2591static bool useCoordinatedScrollingForLayer(RenderView& view, const RenderLayer& layer)
     2592{
     2593    if (layer.isRootLayer() && view.frameView().frame().isMainFrame())
    25952594        return true;
    25962595
     
    26252624
    26262625    if (isSticky)
    2627         return hasCoordinatedScrolling() && isViewportConstrainedFixedOrStickyLayer(layer);
     2626        return isAsyncScrollableStickyLayer(layer);
    26282627
    26292628    auto container = renderer.container();
     
    26742673    return layer.needsCompositedScrolling();
    26752674}
     2675
     2676#if PLATFORM(IOS)
     2677bool RenderLayerCompositor::requiresCompositingForScrolling(const RenderLayer& layer) const
     2678{
     2679    if (!layer.hasAcceleratedTouchScrolling())
     2680        return false;
     2681
     2682    if (!m_inPostLayoutUpdate) {
     2683        m_reevaluateCompositingAfterLayout = true;
     2684        return layer.isComposited();
     2685    }
     2686
     2687    return layer.hasTouchScrollableOverflow();
     2688}
     2689#endif
    26762690
    26772691bool RenderLayerCompositor::isRunningAcceleratedTransformAnimation(RenderLayerModelObject& renderer) const
     
    34273441void RenderLayerCompositor::notifyIFramesOfCompositingChange()
    34283442{
    3429     Frame& frame = m_renderView.frameView().frame();
    3430 
    3431     for (Frame* child = frame.tree().firstChild(); child; child = child->tree().traverseNext(&frame)) {
     3443    for (Frame* child = m_renderView.frameView().frame().tree().firstChild(); child; child = child->tree().nextSibling()) {
    34323444        if (child->document() && child->document()->ownerElement())
    34333445            child->document()->ownerElement()->scheduleSetNeedsStyleRecalc(SyntheticStyleChange);
     
    34943506        coordinationReasons |= FixedOrSticky;
    34953507
    3496     if (isMainFrameScrollingOrOverflowScrolling(m_renderView, layer))
     3508    if (useCoordinatedScrollingForLayer(m_renderView, layer))
    34973509        coordinationReasons |= Scrolling;
    3498        
     3510
    34993511    if (coordinationReasons) {
    3500         m_scrollCoordinatedLayers.add(&layer);
     3512        if (m_scrollCoordinatedLayers.add(&layer).isNewEntry)
     3513            m_subframeScrollLayersNeedReattach = true;
     3514
    35013515        updateScrollCoordinatedLayer(layer, coordinationReasons);
    35023516    } else
     
    35093523        return;
    35103524
     3525    m_subframeScrollLayersNeedReattach = true;
     3526   
    35113527    m_scrollCoordinatedLayers.remove(&layer);
    35123528    m_scrollCoordinatedLayersNeedingUpdate.remove(&layer);
     
    35723588}
    35733589
    3574 static RenderLayerBacking* nearestScrollCoordinatedAncestor(RenderLayer& layer)
    3575 {
    3576     RenderLayer* ancestor = layer.parent();
    3577     while (ancestor) {
    3578         if (RenderLayerBacking* backing = ancestor->backing()) {
    3579             if (backing->scrollingNodeIDForChildren())
    3580                 return backing;
    3581         }
    3582         ancestor = ancestor->parent();
    3583     }
    3584 
    3585     return nullptr;
     3590static ScrollingNodeID enclosingScrollingNodeID(RenderLayer& layer, IncludeSelfOrNot includeSelf)
     3591{
     3592    RenderLayer* currLayer = includeSelf == IncludeSelf ? &layer : layer.parent();
     3593    while (currLayer) {
     3594        if (RenderLayerBacking* backing = currLayer->backing()) {
     3595            if (ScrollingNodeID nodeID = backing->scrollingNodeIDForChildren())
     3596                return nodeID;
     3597        }
     3598        currLayer = currLayer->parent();
     3599    }
     3600
     3601    return 0;
     3602}
     3603
     3604static ScrollingNodeID scrollCoordinatedAncestorInParentOfFrame(Frame& frame)
     3605{
     3606    if (!frame.document() || !frame.view())
     3607        return 0;
     3608
     3609    // Find the frame's enclosing layer in our render tree.
     3610    HTMLFrameOwnerElement* ownerElement = frame.document()->ownerElement();
     3611    RenderElement* frameRenderer = ownerElement ? ownerElement->renderer() : nullptr;
     3612    if (!frameRenderer)
     3613        return 0;
     3614
     3615    RenderLayer* layerInParentDocument = frameRenderer->enclosingLayer();
     3616    if (!layerInParentDocument)
     3617        return 0;
     3618
     3619    return enclosingScrollingNodeID(*layerInParentDocument, IncludeSelf);
     3620}
     3621
     3622void RenderLayerCompositor::reattachSubframeScrollLayers()
     3623{
     3624    if (!m_subframeScrollLayersNeedReattach)
     3625        return;
     3626   
     3627    m_subframeScrollLayersNeedReattach = false;
     3628
     3629    ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
     3630
     3631    for (Frame* child = m_renderView.frameView().frame().tree().firstChild(); child; child = child->tree().nextSibling()) {
     3632        if (!child->document() || !child->view())
     3633            continue;
     3634
     3635        // Ignore frames that are not scroll-coordinated.
     3636        FrameView* childFrameView = child->view();
     3637        ScrollingNodeID frameScrollingNodeID = childFrameView->scrollLayerID();
     3638        if (!frameScrollingNodeID)
     3639            continue;
     3640
     3641        ScrollingNodeID parentNodeID = scrollCoordinatedAncestorInParentOfFrame(*child);
     3642        if (!parentNodeID)
     3643            continue;
     3644
     3645        scrollingCoordinator->attachToStateTree(FrameScrollingNode, frameScrollingNodeID, parentNodeID);
     3646    }
     3647}
     3648
     3649ScrollingNodeID RenderLayerCompositor::attachScrollingNode(RenderLayer& layer, ScrollingNodeType nodeType, ScrollingNodeID parentNodeID)
     3650{
     3651    ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
     3652    RenderLayerBacking* backing = layer.backing();
     3653
     3654    ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(nodeType);
     3655    if (!nodeID)
     3656        nodeID = scrollingCoordinator->uniqueScrollLayerID();
     3657
     3658    nodeID = scrollingCoordinator->attachToStateTree(nodeType, nodeID, parentNodeID);
     3659    if (!nodeID)
     3660        return 0;
     3661
     3662    backing->setScrollingNodeIDForRole(nodeID, nodeType);
     3663    m_scrollingNodeToLayerMap.add(nodeID, &layer);
     3664   
     3665    return nodeID;
     3666}
     3667
     3668void RenderLayerCompositor::updateScrollCoordinationForThisFrame(ScrollingNodeID parentNodeID)
     3669{
     3670    ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
     3671    ASSERT(scrollingCoordinator->coordinatesScrollingForFrameView(&m_renderView.frameView()));
     3672
     3673    ScrollingNodeID nodeID = attachScrollingNode(*m_renderView.layer(), FrameScrollingNode, parentNodeID);
     3674    scrollingCoordinator->updateFrameScrollingNode(nodeID, m_scrollLayer.get(), m_rootContentLayer.get(), fixedRootBackgroundLayer(), clipLayer());
    35863675}
    35873676
    35883677void RenderLayerCompositor::updateScrollCoordinatedLayer(RenderLayer& layer, ScrollCoordinationReasons reasons)
    35893678{
    3590     // FIXME: support scrolling layers in iframes.
    3591     if (m_renderView.document().ownerElement())
    3592         return;
    3593 
    35943679    ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator();
    3595     if (!scrollingCoordinator)
    3596         return;
    3597    
     3680    if (!scrollingCoordinator || !scrollingCoordinator->coordinatesScrollingForFrameView(&m_renderView.frameView()))
     3681        return;
     3682
    35983683    bool isRootLayer = &layer == m_renderView.layer();
    35993684
     
    36093694        return;
    36103695
    3611     RenderLayerBacking* parent = nearestScrollCoordinatedAncestor(layer);
    3612     if (!parent && !isRootLayer)
    3613         return;
    3614 
    3615     ScrollingNodeID parentNodeID = parent ? parent->scrollingNodeIDForChildren() : 0;
     3696    if (!m_renderView.frame().isMainFrame()) {
     3697        ScrollingNodeID parentDocumentHostingNodeID = scrollCoordinatedAncestorInParentOfFrame(m_renderView.frame());
     3698        if (!parentDocumentHostingNodeID)
     3699            return;
     3700
     3701        updateScrollCoordinationForThisFrame(parentDocumentHostingNodeID);
     3702        if (!(reasons & FixedOrSticky) && isRootLayer)
     3703            return;
     3704    }
     3705
     3706    ScrollingNodeID parentNodeID = enclosingScrollingNodeID(layer, ExcludeSelf);
     3707    if (!parentNodeID && !isRootLayer)
     3708        return;
    36163709   
    36173710    // Always call this even if the backing is already attached because the parent may have changed.
    36183711    // If a node plays both roles, fixed/sticky is always the ancestor node of scrolling.
    36193712    if (reasons & FixedOrSticky) {
    3620         ScrollingNodeID nodeID = backing->viewportConstrainedNodeID();
    3621         if (!nodeID)
    3622             nodeID = scrollingCoordinator->uniqueScrollLayerID();
    3623 
    36243713        ScrollingNodeType nodeType = FrameScrollingNode;
    36253714        if (layer.renderer().style().position() == FixedPosition)
     
    36303719            ASSERT_NOT_REACHED();
    36313720
    3632         nodeID = scrollingCoordinator->attachToStateTree(nodeType, nodeID, parentNodeID);
     3721        ScrollingNodeID nodeID = attachScrollingNode(layer, nodeType, parentNodeID);
    36333722        if (!nodeID)
    36343723            return;
    3635 
    3636         backing->setViewportConstrainedNodeID(nodeID);
    36373724
    36383725        switch (nodeType) {
     
    36523739
    36533740    if (reasons & Scrolling) {
    3654         ScrollingNodeID nodeID = backing->scrollingNodeID();
    3655         if (!nodeID)
    3656             nodeID = scrollingCoordinator->uniqueScrollLayerID();
    3657 
    3658         nodeID = scrollingCoordinator->attachToStateTree(isRootLayer ? FrameScrollingNode : OverflowScrollingNode, nodeID, parentNodeID);
    3659         if (!nodeID)
    3660             return;
    3661 
    3662         backing->setScrollingNodeID(nodeID);
    3663         m_scrollingNodeToLayerMap.add(nodeID, &layer);
    3664 
    3665         GraphicsLayer* scrollingLayer = backing->scrollingLayer();
    3666         GraphicsLayer* scrolledContentsLayer = backing->scrollingContentsLayer();
    3667         GraphicsLayer* counterScrollingLayer = nullptr;
    3668         GraphicsLayer* insetClipLayer = nullptr;
    3669 
    3670         if (isRootLayer) {
    3671             scrollingLayer = m_scrollLayer.get();
    3672             scrolledContentsLayer = m_rootContentLayer.get();
    3673             counterScrollingLayer = fixedRootBackgroundLayer();
    3674             insetClipLayer = clipLayer();
    3675             scrollingCoordinator->updateFrameScrollingNode(nodeID, scrollingLayer, scrolledContentsLayer, counterScrollingLayer, insetClipLayer);
    3676         } else {
     3741        if (isRootLayer)
     3742            updateScrollCoordinationForThisFrame(parentNodeID);
     3743        else {
     3744            ScrollingNodeType nodeType = isRootLayer ? FrameScrollingNode : OverflowScrollingNode;
     3745            ScrollingNodeID nodeID = attachScrollingNode(layer, nodeType, parentNodeID);
     3746            if (!nodeID)
     3747                return;
     3748
    36773749            ScrollingCoordinator::ScrollingGeometry scrollingGeometry;
    36783750            scrollingGeometry.scrollOrigin = layer.scrollOrigin();
     
    36803752            scrollingGeometry.scrollableAreaSize = layer.visibleSize();
    36813753            scrollingGeometry.contentSize = layer.contentsSize();
    3682             scrollingCoordinator->updateOverflowScrollingNode(nodeID, scrollingLayer, scrolledContentsLayer, &scrollingGeometry);
     3754            scrollingCoordinator->updateOverflowScrollingNode(nodeID, backing->scrollingLayer(), backing->scrollingContentsLayer(), &scrollingGeometry);
    36833755        }
    36843756    }
     
    36913763        return;
    36923764
     3765    if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FrameScrollingNode))
     3766        m_scrollingNodeToLayerMap.remove(nodeID);
     3767
     3768    if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FixedNode))
     3769        m_scrollingNodeToLayerMap.remove(nodeID);
     3770
    36933771    backing->detachFromScrollingCoordinator();
    3694 
    3695     if (ScrollingNodeID nodeID = backing->scrollingNodeID())
    3696         m_scrollingNodeToLayerMap.remove(nodeID);
    36973772}
    36983773
     
    37293804            constraints = std::make_unique<StickyPositionViewportConstraints>(computeStickyViewportConstraints(layer));
    37303805            const RenderLayer* enclosingTouchScrollableLayer = nullptr;
    3731             if (isStickyInAcceleratedScrollingLayerOrViewport(layer, &enclosingTouchScrollableLayer) && enclosingTouchScrollableLayer) {
     3806            if (isAsyncScrollableStickyLayer(layer, &enclosingTouchScrollableLayer) && enclosingTouchScrollableLayer) {
    37323807                ASSERT(enclosingTouchScrollableLayer->isComposited());
    37333808                stickyContainerMap.add(layer.backing()->graphicsLayer()->platformLayer(), enclosingTouchScrollableLayer->backing()->scrollingLayer()->platformLayer());
     
    37923867   
    37933868        if (backing)
    3794             scrollingCoordinator->detachFromStateTree(backing->scrollingNodeID());
     3869            backing->detachFromScrollingCoordinator();
    37953870
    37963871        // For Coordinated Graphics.
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r169299 r169733  
    396396#endif
    397397
    398     // Whether a running transition or animation enforces the need for a compositing layer.
    399398    bool requiresCompositingForAnimation(RenderLayerModelObject&) const;
    400399    bool requiresCompositingForTransform(RenderLayerModelObject&) const;
     
    425424    typedef unsigned ScrollCoordinationReasons;
    426425
     426    void updateScrollCoordinationForThisFrame(ScrollingNodeID);
     427    ScrollingNodeID attachScrollingNode(RenderLayer&, ScrollingNodeType, ScrollingNodeID parentNodeID);
    427428    void updateScrollCoordinatedLayer(RenderLayer&, ScrollCoordinationReasons);
    428429    void detachScrollCoordinatedLayer(RenderLayer&);
    429 
     430    void reattachSubframeScrollLayers();
     431   
    430432    FixedPositionViewportConstraints computeFixedViewportConstraints(RenderLayer&) const;
    431433    StickyPositionViewportConstraints computeStickyViewportConstraints(RenderLayer&) const;
     
    440442#endif
    441443
     444    // True if the FrameView uses a ScrollingCoordinator.
    442445    bool hasCoordinatedScrolling() const;
     446
     447    bool isAsyncScrollableStickyLayer(const RenderLayer&, const RenderLayer** enclosingAcceleratedOverflowLayer = nullptr) const;
     448    bool isViewportConstrainedFixedOrStickyLayer(const RenderLayer&) const;
     449   
    443450    bool shouldCompositeOverflowControls() const;
    444451
     
    481488    bool m_forceCompositingMode;
    482489    bool m_inPostLayoutUpdate; // true when it's OK to trust layout information (e.g. layer sizes and positions)
     490    bool m_subframeScrollLayersNeedReattach;
    483491
    484492    bool m_isTrackingRepaints; // Used for testing.
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r169407 r169733  
    840840        return;
    841841
     842    // FIXME: view() is just *this here.
    842843    bool caretChanged = m_selectionWasCaret != view().frame().selection().isCaret();
    843844    m_selectionWasCaret = view().frame().selection().isCaret();
  • trunk/Source/WebCore/testing/InternalSettings.cpp

    r168144 r169733  
    487487}
    488488
    489 }
     489void InternalSettings::setScrollingTreeIncludesFrames(bool enabled, ExceptionCode& ec)
     490{
     491    InternalSettingsGuardForSettings();
     492    settings()->setScrollingTreeIncludesFrames(enabled);
     493}
     494
     495}
  • trunk/Source/WebCore/testing/InternalSettings.h

    r167732 r169733  
    101101    void resetToConsistentState();
    102102
    103     void setUsesOverlayScrollbars(bool enabled, ExceptionCode&);
    104     void setTouchEventEmulationEnabled(bool enabled, ExceptionCode&);
     103    void setUsesOverlayScrollbars(bool, ExceptionCode&);
     104    void setTouchEventEmulationEnabled(bool, ExceptionCode&);
    105105    void setStandardFontFamily(const String& family, const String& script, ExceptionCode&);
    106106    void setSerifFontFamily(const String& family, const String& script, ExceptionCode&);
     
    114114    void setTextAutosizingFontScaleFactor(float fontScaleFactor, ExceptionCode&);
    115115    void setMediaTypeOverride(const String& mediaType, ExceptionCode&);
    116     void setCSSExclusionsEnabled(bool enabled, ExceptionCode&);
    117     void setCSSShapesEnabled(bool enabled, ExceptionCode&);
     116    void setCSSExclusionsEnabled(bool, ExceptionCode&);
     117    void setCSSShapesEnabled(bool, ExceptionCode&);
    118118    void setCanStartMedia(bool, ExceptionCode&);
    119119    void setEditingBehavior(const String&, ExceptionCode&);
     
    122122    void setStorageBlockingPolicy(const String&, ExceptionCode&);
    123123    void setLangAttributeAwareFormControlUIEnabled(bool);
    124     void setImagesEnabled(bool enabled, ExceptionCode&);
     124    void setImagesEnabled(bool, ExceptionCode&);
    125125    void setMinimumTimerInterval(double intervalInSeconds, ExceptionCode&);
    126126    void setDefaultVideoPosterURL(const String& url, ExceptionCode&);
    127127    void setTimeWithoutMouseMovementBeforeHidingControls(double time, ExceptionCode&);
    128     void setUseLegacyBackgroundSizeShorthandBehavior(bool enabled, ExceptionCode&);
    129     void setAutoscrollForDragAndDropEnabled(bool enabled, ExceptionCode&);
    130     void setFontFallbackPrefersPictographs(bool preferPictographs, ExceptionCode&);
     128    void setUseLegacyBackgroundSizeShorthandBehavior(bool, ExceptionCode&);
     129    void setAutoscrollForDragAndDropEnabled(bool, ExceptionCode&);
     130    void setFontFallbackPrefersPictographs(bool, ExceptionCode&);
    131131    void setPluginReplacementEnabled(bool);
    132     void setBackgroundShouldExtendBeyondPage(bool hasExtendedBackground, ExceptionCode&);
    133     void setShouldConvertPositionStyleOnCopy(bool convert, ExceptionCode&);
    134 
     132    void setBackgroundShouldExtendBeyondPage(bool, ExceptionCode&);
     133    void setShouldConvertPositionStyleOnCopy(bool, ExceptionCode&);
     134    void setScrollingTreeIncludesFrames(bool, ExceptionCode&);
    135135
    136136private:
  • trunk/Source/WebCore/testing/InternalSettings.idl

    r169706 r169733  
    6969    [RaisesException] void setAutoscrollForDragAndDropEnabled(boolean enabled);
    7070    [RaisesException] void setBackgroundShouldExtendBeyondPage(boolean hasExtendedBackground);
     71    [RaisesException] void setScrollingTreeIncludesFrames(boolean enabled);
    7172
    7273    [RaisesException] void setMinimumTimerInterval(unrestricted double intervalInSeconds);
  • trunk/Source/WebKit2/ChangeLog

    r169732 r169733  
     12014-06-09  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Work towards having frames in the scrolling tree
     4        https://bugs.webkit.org/show_bug.cgi?id=133665
     5
     6        Reviewed by Tim Horton.
     7       
     8        Override coordinatesScrollingForFrameView() to always return true for composited
     9        frames, for iOS WK2 (eventually this class will have to be specialized for iOS and OS X).
     10
     11        * WebProcess/Scrolling/RemoteScrollingCoordinator.h:
     12        * WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
     13        (WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):
     14
    1152014-06-09  Anders Carlsson  <andersca@apple.com>
    216
  • trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.h

    r168338 r169733  
    6262   
    6363    // ScrollingCoordinator
     64    virtual bool coordinatesScrollingForFrameView(WebCore::FrameView*) const override;
    6465    virtual void scheduleTreeStateCommit() override;
    6566
  • trunk/Source/WebKit2/WebProcess/Scrolling/RemoteScrollingCoordinator.mm

    r168338 r169733  
    7575}
    7676
     77bool RemoteScrollingCoordinator::coordinatesScrollingForFrameView(FrameView* frameView) const
     78{
     79    RenderView* renderView = frameView->renderView();
     80    return renderView && renderView->usesCompositing();
     81}
     82
    7783bool RemoteScrollingCoordinator::isRubberBandInProgress() const
    7884{
Note: See TracChangeset for help on using the changeset viewer.