Don't use base layer() as the scroll layer in scrolling tree.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2019 20:10:23 +0000 (20:10 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Feb 2019 20:10:23 +0000 (20:10 +0000)
commita63959393a065985e2a670e1d4d8382504d43792
tree21c8fb32cbf1d9209ea7b2aa1e41469aadec959e
parent6a051855e3c164a1e35f67b3bd8e25929e5bf3f7
Don't use base layer() as the scroll layer in scrolling tree.
https://bugs.webkit.org/show_bug.cgi?id=194160

Reviewed by Simon Fraser.

Source/WebCore:

Maintain scrollContainerLayer() and scrolledContentsLayer() separately in ScrollingTreeScrollingNode.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::setNodeLayers):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setNodeLayers):

Turn the long layer parameter list into a struct.

* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
(WebCore::ScrollingStateNode::setAllPropertiesChanged):
(WebCore::ScrollingStateNode::setLayer):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged):
(WebCore::ScrollingStateScrollingNode::setScrollContainerLayer):
(WebCore::ScrollingStateScrollingNode::dumpProperties const):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::scrollContainerLayer const):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::scrollContainerLayer const):
(WebCore::ScrollingTreeScrollingNode::scrolledContentsLayer const):
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollPosition const):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollLayer const): Deleted.
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition const):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::exposedUnfilledArea const):
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeForViewportConstrainedRole):
(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
(WebCore::RenderLayerCompositor::updateScrollingNodeForFrameHostingRole):

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateNode>::encode):
(ArgumentCoder<ScrollingStateNode>::decode):
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(WebKit::dump):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingStateNode.cpp
Source/WebCore/page/scrolling/ScrollingStateNode.h
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
Source/WebCore/page/scrolling/ScrollingTree.cpp
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h
Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h
Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm