Title: [246723] trunk/Source
Revision
246723
Author
[email protected]
Date
2019-06-23 12:34:44 -0700 (Sun, 23 Jun 2019)

Log Message

Add OverflowScrollProxyNodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=199132

Reviewed by Antti Koivisto.
Source/WebCore:

Add ScrollingStateOverflowScrollProxyNode and ScrollingTreeOverflowScrollProxyNode. These
nodes represent clip and scroll position for an overflow:scroll in the containing block chain,
but not the paint ancestor chain of a layer. They will be used to correctly manipulate clip
rects for composited layers in non-stacking-context scrollers, and in a future patch will
replace the functionality of "Moves" positioned nodes.

An OverflowScrollProxyNode has the ScrollingNodeID of the scrolling node that it relates to,
and we use the existing "related overflow nodes" to create the back references in the scrolling tree.

These nodes are not instantiated yet; a future patch will hook them up.

* Sources.txt:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::operator<<):
* page/scrolling/ScrollingCoordinatorTypes.h:
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::isOverflowScrollProxyNode const):
* page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp: Added.
(WebCore::ScrollingStateOverflowScrollProxyNode::create):
(WebCore::ScrollingStateOverflowScrollProxyNode::ScrollingStateOverflowScrollProxyNode):
(WebCore::ScrollingStateOverflowScrollProxyNode::clone):
(WebCore::ScrollingStateOverflowScrollProxyNode::setOverflowScrollingNode):
(WebCore::ScrollingStateOverflowScrollProxyNode::dumpProperties const):
* page/scrolling/ScrollingStateOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
(WebCore::ScrollingStateOverflowScrollProxyNode::overflowScrollingNode const):
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::createNode):
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::isOverflowScrollProxyNode const):
* page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp: Added.
(WebCore::ScrollingTreeOverflowScrollProxyNode::create):
(WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
(WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
(WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
* page/scrolling/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
(WebCore::ScrollingTreeOverflowScrollProxyNode::overflowScrollingNodeID const):
(WebCore::ScrollingTreeOverflowScrollProxyNode::layer const):
* page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm: Added.
(WebCore::ScrollingTreeOverflowScrollProxyNode::create):
(WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
(WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollProxyNode::scrollDeltaSinceLastCommit const):
(WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
(WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
* page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::scrollCoordinationRoleForNodeType):

Source/WebKit:

Add ScrollingStateOverflowScrollProxyNode and ScrollingTreeOverflowScrollProxyNode. These
nodes represent clip and scroll position for an overflow:scroll in the containing block chain,
but not the paint ancestor chain of a layer. They will be used to correctly manipulate clip
rects for composited layers in non-stacking-context scrollers, and in a future patch will
replace the functionality of "Moves" positioned nodes.

An OverflowScrollProxyNode has the ScrollingNodeID of the scrolling node that it relates to,
and we use the existing "related overflow nodes" to create the back references in the scrolling tree.

These nodes are not instantiated yet; a future patch will hook them up.

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateOverflowScrollProxyNode>::encode):
(ArgumentCoder<ScrollingStateOverflowScrollProxyNode>::decode):
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::dump):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers):

Source/WTF:

Setting indent is useful if you want to make a new stream with the indent of an
existing stream.

* wtf/text/TextStream.h:
(WTF::TextStream::setIndent):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (246722 => 246723)


--- trunk/Source/WTF/ChangeLog	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WTF/ChangeLog	2019-06-23 19:34:44 UTC (rev 246723)
@@ -1,3 +1,16 @@
+2019-06-23  Simon Fraser  <[email protected]>
+
+        Add OverflowScrollProxyNodes to the scrolling tree
+        https://bugs.webkit.org/show_bug.cgi?id=199132
+
+        Reviewed by Antti Koivisto.
+        
+        Setting indent is useful if you want to make a new stream with the indent of an
+        existing stream.
+
+        * wtf/text/TextStream.h:
+        (WTF::TextStream::setIndent):
+
 2019-06-20  Fujii Hironori  <[email protected]>
 
         Try to use C++14 std::enable_if_t in CheckedArithmetic.h again

Modified: trunk/Source/WTF/wtf/text/TextStream.h (246722 => 246723)


--- trunk/Source/WTF/wtf/text/TextStream.h	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WTF/wtf/text/TextStream.h	2019-06-23 19:34:44 UTC (rev 246723)
@@ -95,6 +95,7 @@
     WTF_EXPORT_PRIVATE void nextLine(); // Output newline and indent.
 
     int indent() const { return m_indent; }
+    void setIndent(int indent) { m_indent = indent; }
     void increaseIndent(int amount = 1) { m_indent += amount; }
     void decreaseIndent(int amount = 1) { m_indent -= amount; ASSERT(m_indent >= 0); }
 

Modified: trunk/Source/WebCore/ChangeLog (246722 => 246723)


--- trunk/Source/WebCore/ChangeLog	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/ChangeLog	2019-06-23 19:34:44 UTC (rev 246723)
@@ -1,3 +1,71 @@
+2019-06-23  Simon Fraser  <[email protected]>
+
+        Add OverflowScrollProxyNodes to the scrolling tree
+        https://bugs.webkit.org/show_bug.cgi?id=199132
+
+        Reviewed by Antti Koivisto.
+
+        Add ScrollingStateOverflowScrollProxyNode and ScrollingTreeOverflowScrollProxyNode. These
+        nodes represent clip and scroll position for an overflow:scroll in the containing block chain,
+        but not the paint ancestor chain of a layer. They will be used to correctly manipulate clip
+        rects for composited layers in non-stacking-context scrollers, and in a future patch will
+        replace the functionality of "Moves" positioned nodes.
+
+        An OverflowScrollProxyNode has the ScrollingNodeID of the scrolling node that it relates to,
+        and we use the existing "related overflow nodes" to create the back references in the scrolling tree.
+
+        These nodes are not instantiated yet; a future patch will hook them up.
+
+        * Sources.txt:
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/scrolling/AsyncScrollingCoordinator.cpp:
+        (WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::operator<<):
+        * page/scrolling/ScrollingCoordinatorTypes.h:
+        * page/scrolling/ScrollingStateNode.h:
+        (WebCore::ScrollingStateNode::isOverflowScrollProxyNode const):
+        * page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp: Added.
+        (WebCore::ScrollingStateOverflowScrollProxyNode::create):
+        (WebCore::ScrollingStateOverflowScrollProxyNode::ScrollingStateOverflowScrollProxyNode):
+        (WebCore::ScrollingStateOverflowScrollProxyNode::clone):
+        (WebCore::ScrollingStateOverflowScrollProxyNode::setOverflowScrollingNode):
+        (WebCore::ScrollingStateOverflowScrollProxyNode::dumpProperties const):
+        * page/scrolling/ScrollingStateOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
+        (WebCore::ScrollingStateOverflowScrollProxyNode::overflowScrollingNode const):
+        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
+        * page/scrolling/ScrollingStateTree.cpp:
+        (WebCore::ScrollingStateTree::createNode):
+        * page/scrolling/ScrollingTreeNode.h:
+        (WebCore::ScrollingTreeNode::isOverflowScrollProxyNode const):
+        * page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp: Added.
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
+        * page/scrolling/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
+        * page/scrolling/ScrollingTreeScrollingNode.h:
+        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::overflowScrollingNodeID const):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::layer const):
+        * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm: Added.
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::scrollDeltaSinceLastCommit const):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
+        (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
+        * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+        * page/scrolling/mac/ScrollingTreeMac.cpp:
+        (ScrollingTreeMac::createScrollingTreeNode):
+        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::scrollCoordinationRoleForNodeType):
+
 2019-06-23  Zalan Bujtas  <[email protected]>
 
         [LFC][IFC] Non-baseline aligned inline container should not mutate the baseline

Modified: trunk/Source/WebCore/Sources.txt (246722 => 246723)


--- trunk/Source/WebCore/Sources.txt	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/Sources.txt	2019-06-23 19:34:44 UTC (rev 246723)
@@ -1603,6 +1603,7 @@
 page/scrolling/ScrollingStateFrameScrollingNode.cpp
 page/scrolling/ScrollingStateNode.cpp
 page/scrolling/ScrollingStateOverflowScrollingNode.cpp
+page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp
 page/scrolling/ScrollingStatePositionedNode.cpp
 page/scrolling/ScrollingStateScrollingNode.cpp
 page/scrolling/ScrollingStateStickyNode.cpp

Modified: trunk/Source/WebCore/SourcesCocoa.txt (246722 => 246723)


--- trunk/Source/WebCore/SourcesCocoa.txt	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/SourcesCocoa.txt	2019-06-23 19:34:44 UTC (rev 246723)
@@ -148,6 +148,7 @@
 
 page/scrolling/cocoa/ScrollingStateNode.mm
 page/scrolling/cocoa/ScrollingTreeFixedNode.mm
+page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm
 page/scrolling/cocoa/ScrollingTreePositionedNode.mm
 page/scrolling/cocoa/ScrollingTreeStickyNode.mm
 

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (246722 => 246723)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-06-23 19:34:44 UTC (rev 246723)
@@ -324,6 +324,7 @@
 		0F580FA31496939100FB5BD8 /* WebTiledBackingLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580FA11496939100FB5BD8 /* WebTiledBackingLayer.h */; };
 		0F580FAF149800D400FB5BD8 /* AnimationUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580FAE149800D400FB5BD8 /* AnimationUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		0F5DA8B122B8563900C266FA /* ScrollingStateOverflowScrollProxyNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F9B547522B4A772007B5E8A /* ScrollingStateOverflowScrollProxyNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F5E200618E771FC003EC3E5 /* PlatformCAAnimationCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5E200518E771FC003EC3E5 /* PlatformCAAnimationCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F605AEB15F94848004DF0C0 /* ScrollingConstraints.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0F60F32B1DFBB10700416D6C /* CommonVM.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F60F32A1DFBB10400416D6C /* CommonVM.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -343,6 +344,7 @@
 		0FA24D7A162DF91900A3F4C0 /* GraphicsLayerUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FA24D78162DF91900A3F4C0 /* GraphicsLayerUpdater.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0FB6252F18DE1B1500A07C05 /* GeometryUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB6252D18DE1B1500A07C05 /* GeometryUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0FB8890F167D30160010CDA5 /* ScrollingStateStickyNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB8890D167D30160010CDA5 /* ScrollingStateStickyNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		0FC4B00622B9A02D00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4B00422B9A02C00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0FCF332F0F2B9A25004B6795 /* WebLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCF332B0F2B9A25004B6795 /* WebLayer.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		0FD3080F117CF7E700A791F7 /* RenderFrameBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3080D117CF7E700A791F7 /* RenderFrameBase.h */; };
 		0FD308D6117D168500A791F7 /* RenderIFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD308D4117D168400A791F7 /* RenderIFrame.h */; };
@@ -5745,6 +5747,8 @@
 		0F94B6532209156C00157014 /* ScrollingTreePositionedNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScrollingTreePositionedNode.h; sourceTree = "<group>"; };
 		0F94B6542209156C00157014 /* ScrollingTreePositionedNode.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreePositionedNode.mm; sourceTree = "<group>"; };
 		0F97A657155DA81E00FADD4C /* DisplayRefreshMonitorIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DisplayRefreshMonitorIOS.mm; sourceTree = "<group>"; };
+		0F9B547522B4A772007B5E8A /* ScrollingStateOverflowScrollProxyNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScrollingStateOverflowScrollProxyNode.h; sourceTree = "<group>"; };
+		0F9B547622B4A773007B5E8A /* ScrollingStateOverflowScrollProxyNode.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingStateOverflowScrollProxyNode.cpp; sourceTree = "<group>"; };
 		0F9DAA0C1FD1C6630079C5B2 /* DOMGCOutputConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMGCOutputConstraint.cpp; sourceTree = "<group>"; };
 		0F9DAA0E1FD1C6640079C5B2 /* DOMGCOutputConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMGCOutputConstraint.h; sourceTree = "<group>"; };
 		0FA0852B1E6FB55A00975FDD /* CSSProperties.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = CSSProperties.json; sourceTree = "<group>"; };
@@ -5756,6 +5760,8 @@
 		0FB8890D167D30160010CDA5 /* ScrollingStateStickyNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingStateStickyNode.h; sourceTree = "<group>"; };
 		0FC05168219B5EBE0031C39E /* ScrollingTreeOverflowScrollingNodeMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeOverflowScrollingNodeMac.mm; sourceTree = "<group>"; };
 		0FC0516A219B5EBE0031C39E /* ScrollingTreeOverflowScrollingNodeMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeOverflowScrollingNodeMac.h; sourceTree = "<group>"; };
+		0FC4B00422B9A02C00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeOverflowScrollProxyNode.h; sourceTree = "<group>"; };
+		0FC4B00522B9A02D00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeOverflowScrollProxyNode.mm; sourceTree = "<group>"; };
 		0FCF33230F2B9715004B6795 /* ColorCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ColorCG.cpp; sourceTree = "<group>"; };
 		0FCF332A0F2B9A25004B6795 /* WebLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebLayer.mm; sourceTree = "<group>"; };
 		0FCF332B0F2B9A25004B6795 /* WebLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebLayer.h; sourceTree = "<group>"; };
@@ -16912,6 +16918,8 @@
 				931CBD07161A44E900E4C874 /* ScrollingStateNode.h */,
 				0FEA3E81191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.cpp */,
 				0FEA3E82191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h */,
+				0F9B547622B4A773007B5E8A /* ScrollingStateOverflowScrollProxyNode.cpp */,
+				0F9B547522B4A772007B5E8A /* ScrollingStateOverflowScrollProxyNode.h */,
 				0F94B64F220914FE00157014 /* ScrollingStatePositionedNode.cpp */,
 				0F94B651220914FF00157014 /* ScrollingStatePositionedNode.h */,
 				931CBD08161A44E900E4C874 /* ScrollingStateScrollingNode.cpp */,
@@ -21706,6 +21714,8 @@
 				93EF7D541954E98F00DFB71D /* ScrollingStateNode.mm */,
 				0F94B6422208F70100157014 /* ScrollingTreeFixedNode.h */,
 				0F94B6442208F70200157014 /* ScrollingTreeFixedNode.mm */,
+				0FC4B00422B9A02C00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.h */,
+				0FC4B00522B9A02D00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.mm */,
 				0F94B6532209156C00157014 /* ScrollingTreePositionedNode.h */,
 				0F94B6542209156C00157014 /* ScrollingTreePositionedNode.mm */,
 				0F94B6432208F70200157014 /* ScrollingTreeStickyNode.h */,
@@ -31383,6 +31393,7 @@
 				0FEA3E7B191B2FC5000F1B55 /* ScrollingStateFrameScrollingNode.h in Headers */,
 				931CBD0D161A44E900E4C874 /* ScrollingStateNode.h in Headers */,
 				0FEA3E84191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h in Headers */,
+				0F5DA8B122B8563900C266FA /* ScrollingStateOverflowScrollProxyNode.h in Headers */,
 				0F94B6522209150600157014 /* ScrollingStatePositionedNode.h in Headers */,
 				931CBD0F161A44E900E4C874 /* ScrollingStateScrollingNode.h in Headers */,
 				0FB8890F167D30160010CDA5 /* ScrollingStateStickyNode.h in Headers */,
@@ -31397,6 +31408,7 @@
 				1AAADDE414DC8C8F00AF64B3 /* ScrollingTreeNode.h in Headers */,
 				0FEA3E80191B3169000F1B55 /* ScrollingTreeOverflowScrollingNode.h in Headers */,
 				0F73B769222B3A0C00805316 /* ScrollingTreeOverflowScrollingNodeMac.h in Headers */,
+				0FC4B00622B9A02D00CF3B1E /* ScrollingTreeOverflowScrollProxyNode.h in Headers */,
 				0F94B655220931E400157014 /* ScrollingTreePositionedNode.h in Headers */,
 				9391A99D1629D70000297330 /* ScrollingTreeScrollingNode.h in Headers */,
 				A6D5A99D1629D70000297330 /* ScrollingTreeScrollingNodeDelegate.h in Headers */,

Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -42,6 +42,7 @@
 #include "ScrollingStateFixedNode.h"
 #include "ScrollingStateFrameHostingNode.h"
 #include "ScrollingStateFrameScrollingNode.h"
+#include "ScrollingStateOverflowScrollProxyNode.h"
 #include "ScrollingStateOverflowScrollingNode.h"
 #include "ScrollingStatePositionedNode.h"
 #include "ScrollingStateStickyNode.h"
@@ -710,9 +711,14 @@
     if (!node)
         return;
 
-    ASSERT(is<ScrollingStatePositionedNode>(*node));
-    if (auto* positionedNode = downcast<ScrollingStatePositionedNode>(node))
-        positionedNode->setRelatedOverflowScrollingNodes(WTFMove(relatedNodes));
+    if (is<ScrollingStatePositionedNode>(node))
+        downcast<ScrollingStatePositionedNode>(node)->setRelatedOverflowScrollingNodes(WTFMove(relatedNodes));
+    else if (is<ScrollingStateOverflowScrollProxyNode>(node)) {
+        auto* overflowScrollProxyNode = downcast<ScrollingStateOverflowScrollProxyNode>(node);
+        ASSERT(relatedNodes.size() == 1);
+        overflowScrollProxyNode->setOverflowScrollingNode(relatedNodes[0]);
+    } else
+        ASSERT_NOT_REACHED();
 }
 
 void AsyncScrollingCoordinator::setSynchronousScrollingReasons(FrameView& frameView, SynchronousScrollingReasons reasons)

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -464,6 +464,9 @@
     case ScrollingNodeType::Overflow:
         ts << "overflow-scrolling";
         break;
+    case ScrollingNodeType::OverflowProxy:
+        ts << "overflow-scroll-proxy";
+        break;
     case ScrollingNodeType::Fixed:
         ts << "fixed";
         break;

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h	2019-06-23 19:34:44 UTC (rev 246723)
@@ -36,9 +36,10 @@
     Subframe,
     FrameHosting,
     Overflow,
+    OverflowProxy,
     Fixed,
     Sticky,
-    Positioned,
+    Positioned
 };
 
 enum ScrollingStateTreeAsTextBehaviorFlags {

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h	2019-06-23 19:34:44 UTC (rev 246723)
@@ -195,6 +195,7 @@
     bool isFrameScrollingNode() const { return m_nodeType == ScrollingNodeType::MainFrame || m_nodeType == ScrollingNodeType::Subframe; }
     bool isFrameHostingNode() const { return m_nodeType == ScrollingNodeType::FrameHosting; }
     bool isOverflowScrollingNode() const { return m_nodeType == ScrollingNodeType::Overflow; }
+    bool isOverflowScrollProxyNode() const { return m_nodeType == ScrollingNodeType::OverflowProxy; }
 
     virtual Ref<ScrollingStateNode> clone(ScrollingStateTree& adoptiveTree) = 0;
     Ref<ScrollingStateNode> cloneAndReset(ScrollingStateTree& adoptiveTree);

Added: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp (0 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp	                        (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ScrollingStateOverflowScrollProxyNode.h"
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "ScrollingStateOverflowScrollingNode.h"
+#include "ScrollingStateTree.h"
+#include <wtf/text/TextStream.h>
+
+namespace WebCore {
+
+Ref<ScrollingStateOverflowScrollProxyNode> ScrollingStateOverflowScrollProxyNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
+{
+    return adoptRef(*new ScrollingStateOverflowScrollProxyNode(stateTree, nodeID));
+}
+
+ScrollingStateOverflowScrollProxyNode::ScrollingStateOverflowScrollProxyNode(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
+    : ScrollingStateNode(ScrollingNodeType::OverflowProxy, stateTree, nodeID)
+{
+}
+
+ScrollingStateOverflowScrollProxyNode::ScrollingStateOverflowScrollProxyNode(const ScrollingStateOverflowScrollProxyNode& stateNode, ScrollingStateTree& adoptiveTree)
+    : ScrollingStateNode(stateNode, adoptiveTree)
+    , m_overflowScrollingNodeID(stateNode.overflowScrollingNode())
+{
+}
+
+ScrollingStateOverflowScrollProxyNode::~ScrollingStateOverflowScrollProxyNode() = default;
+
+Ref<ScrollingStateNode> ScrollingStateOverflowScrollProxyNode::clone(ScrollingStateTree& adoptiveTree)
+{
+    return adoptRef(*new ScrollingStateOverflowScrollProxyNode(*this, adoptiveTree));
+}
+
+void ScrollingStateOverflowScrollProxyNode::setOverflowScrollingNode(ScrollingNodeID nodeID)
+{
+    if (nodeID == m_overflowScrollingNodeID)
+        return;
+    
+    m_overflowScrollingNodeID = nodeID;
+    setPropertyChanged(OverflowScrollingNode);
+}
+
+void ScrollingStateOverflowScrollProxyNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
+{
+    ts << "Overflow scroll proxy node";
+    
+    ScrollingStateNode::dumpProperties(ts, behavior);
+
+    if (auto* relatedOverflowNode = scrollingStateTree().stateNodeForID(m_overflowScrollingNodeID)) {
+        auto scrollPosition = downcast<ScrollingStateOverflowScrollingNode>(*relatedOverflowNode).scrollPosition();
+        ts.dumpProperty("related overflow scrolling node scroll position", scrollPosition);
+    }
+
+    if (behavior & ScrollingStateTreeAsTextBehaviorIncludeNodeIDs)
+        ts.dumpProperty("overflow scrolling node", overflowScrollingNode());
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)

Copied: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.h (from rev 246722, trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp) (0 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.h	                        (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.h	2019-06-23 19:34:44 UTC (rev 246723)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "ScrollingStateNode.h"
+
+namespace WebCore {
+
+class ScrollingStateOverflowScrollProxyNode : public ScrollingStateNode {
+public:
+    static Ref<ScrollingStateOverflowScrollProxyNode> create(ScrollingStateTree&, ScrollingNodeID);
+
+    Ref<ScrollingStateNode> clone(ScrollingStateTree&) override;
+
+    virtual ~ScrollingStateOverflowScrollProxyNode();
+
+    enum {
+        OverflowScrollingNode = NumStateNodeBits
+    };
+
+    // This is the node we get our scroll position from.
+    ScrollingNodeID overflowScrollingNode() const { return m_overflowScrollingNodeID; }
+    WEBCORE_EXPORT void setOverflowScrollingNode(ScrollingNodeID);
+
+    void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override;
+
+private:
+    ScrollingStateOverflowScrollProxyNode(ScrollingStateTree&, ScrollingNodeID);
+    ScrollingStateOverflowScrollProxyNode(const ScrollingStateOverflowScrollProxyNode&, ScrollingStateTree&);
+    
+    ScrollingNodeID m_overflowScrollingNodeID { 0 };
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_SCROLLING_STATE_NODE(ScrollingStateOverflowScrollProxyNode, isOverflowScrollProxyNode())
+
+#endif // ENABLE(ASYNC_SCROLLING)

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -54,7 +54,7 @@
 {
     return adoptRef(*new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
 }
-    
+
 void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
     ts << "Overflow scrolling node";

Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -33,6 +33,7 @@
 #include "ScrollingStateFixedNode.h"
 #include "ScrollingStateFrameHostingNode.h"
 #include "ScrollingStateFrameScrollingNode.h"
+#include "ScrollingStateOverflowScrollProxyNode.h"
 #include "ScrollingStateOverflowScrollingNode.h"
 #include "ScrollingStatePositionedNode.h"
 #include "ScrollingStateStickyNode.h"
@@ -72,6 +73,8 @@
         return ScrollingStateFrameHostingNode::create(*this, nodeID);
     case ScrollingNodeType::Overflow:
         return ScrollingStateOverflowScrollingNode::create(*this, nodeID);
+    case ScrollingNodeType::OverflowProxy:
+        return ScrollingStateOverflowScrollProxyNode::create(*this, nodeID);
     case ScrollingNodeType::Fixed:
         return ScrollingStateFixedNode::create(*this, nodeID);
     case ScrollingNodeType::Sticky:

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeNode.h	2019-06-23 19:34:44 UTC (rev 246723)
@@ -56,6 +56,7 @@
     bool isFrameScrollingNode() const { return nodeType() == ScrollingNodeType::MainFrame || nodeType() == ScrollingNodeType::Subframe; }
     bool isFrameHostingNode() const { return nodeType() == ScrollingNodeType::FrameHosting; }
     bool isOverflowScrollingNode() const { return nodeType() == ScrollingNodeType::Overflow; }
+    bool isOverflowScrollProxyNode() const { return nodeType() == ScrollingNodeType::OverflowProxy; }
 
     virtual void commitStateBeforeChildren(const ScrollingStateNode&) = 0;
     virtual void commitStateAfterChildren(const ScrollingStateNode&) { }

Added: trunk/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp (0 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp	                        (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "ScrollingTreeOverflowScrollProxyNode.h"
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "ScrollingStateOverflowScrollProxyNode.h"
+#include "ScrollingStateTree.h"
+#include "ScrollingTree.h"
+
+namespace WebCore {
+
+Ref<ScrollingTreeOverflowScrollProxyNode> ScrollingTreeOverflowScrollProxyNode::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+{
+    return adoptRef(*new ScrollingTreeOverflowScrollProxyNode(scrollingTree, nodeID));
+}
+
+ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+    : ScrollingTreeNode(scrollingTree, ScrollingNodeType::OverflowProxy, nodeID)
+{
+}
+
+ScrollingTreeOverflowScrollProxyNode::~ScrollingTreeOverflowScrollProxyNode() = default;
+
+void ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
+{
+    const ScrollingStateOverflowScrollProxyNode& overflowProxyStateNode = downcast<ScrollingStateOverflowScrollProxyNode>(stateNode);
+
+    if (overflowProxyStateNode.hasChangedProperty(ScrollingStateOverflowScrollProxyNode::OverflowScrollingNode))
+        m_overflowScrollingNode = overflowProxyStateNode.overflowScrollingNode();
+}
+
+void ScrollingTreeOverflowScrollProxyNode::applyLayerPositions()
+{
+    ScrollOffset scrollOffset;
+    if (auto* node = scrollingTree().nodeForID(m_overflowScrollingNode)) {
+        if (is<ScrollingTreeOverflowScrollingNode>(node)) {
+            auto& overflowNode = downcast<ScrollingTreeOverflowScrollingNode>(*node);
+            scrollOffset = overflowNode.currentScrollOffset();
+        }
+    }
+
+    LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeOverflowScrollProxyNode " << scrollingNodeID() << " applyLayerPositions: setting bounnds origin to " << scrollOffset);
+    [m_layer _web_setLayerBoundsOrigin:scrollOffset];
+}
+
+void ScrollingTreeOverflowScrollProxyNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
+{
+    ts << "overflow scroll proxy node";
+    ScrollingTreeNode::dumpProperties(ts, behavior);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)

Copied: trunk/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.h (from rev 246722, trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp) (0 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.h	                        (rev 0)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.h	2019-06-23 19:34:44 UTC (rev 246723)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "ScrollingTreeNode.h"
+
+namespace WebCore {
+
+class ScrollingTreeOverflowScrollProxyNode : public ScrollingTreeNode {
+public:
+    WEBCORE_EXPORT static Ref<ScrollingTreeOverflowScrollProxyNode> create(ScrollingTree&, ScrollingNodeID);
+    WEBCORE_EXPORT virtual ~ScrollingTreeOverflowScrollProxyNode();
+
+protected:
+    WEBCORE_EXPORT ScrollingTreeOverflowScrollProxyNode(ScrollingTree&, ScrollingNodeID);
+    
+    void commitStateBeforeChildren(const ScrollingStateNode&) override;
+    void applyLayerPositions() override;
+
+    WEBCORE_EXPORT void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const override;
+
+    ScrollingNodeID m_overflowScrollingNode;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_SCROLLING_NODE(ScrollingTreeOverflowScrollProxyNode, isOverflowScrollingNode())
+
+#endif // ENABLE(ASYNC_SCROLLING)

Modified: trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h	2019-06-23 19:34:44 UTC (rev 246723)
@@ -30,6 +30,7 @@
 #include "IntRect.h"
 #include "ScrollSnapOffsetsInfo.h"
 #include "ScrollTypes.h"
+#include "ScrollableArea.h"
 #include "ScrollingCoordinator.h"
 #include "ScrollingTreeNode.h"
 
@@ -54,6 +55,7 @@
     virtual ScrollingEventResult handleWheelEvent(const PlatformWheelEvent&);
 
     FloatPoint currentScrollPosition() const { return m_currentScrollPosition; }
+    FloatPoint currentScrollOffset() const { return ScrollableArea::scrollOffsetFromPosition(m_currentScrollPosition, toFloatSize(m_scrollOrigin)); }
     FloatPoint lastCommittedScrollPosition() const { return m_lastCommittedScrollPosition; }
     FloatSize scrollDeltaSinceLastCommit() const { return m_currentScrollPosition - m_lastCommittedScrollPosition; }
 

Copied: trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h (from rev 246722, trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp) (0 => 246723)


--- trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h	                        (rev 0)
+++ trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h	2019-06-23 19:34:44 UTC (rev 246723)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#include "ScrollingTreeNode.h"
+
+namespace WebCore {
+
+class ScrollingTreeOverflowScrollProxyNode : public ScrollingTreeNode {
+public:
+    WEBCORE_EXPORT static Ref<ScrollingTreeOverflowScrollProxyNode> create(ScrollingTree&, ScrollingNodeID);
+    WEBCORE_EXPORT virtual ~ScrollingTreeOverflowScrollProxyNode();
+
+    ScrollingNodeID overflowScrollingNodeID() const { return m_overflowScrollingNodeID; }
+
+    CALayer *layer() const { return m_layer.get(); }
+
+    FloatSize scrollDeltaSinceLastCommit() const;
+
+protected:
+    WEBCORE_EXPORT ScrollingTreeOverflowScrollProxyNode(ScrollingTree&, ScrollingNodeID);
+    
+    void commitStateBeforeChildren(const ScrollingStateNode&) override;
+    void applyLayerPositions() override;
+
+    WEBCORE_EXPORT void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const override;
+
+    ScrollingNodeID m_overflowScrollingNodeID;
+    RetainPtr<CALayer> m_layer;
+};
+
+} // namespace WebCore
+
+SPECIALIZE_TYPE_TRAITS_SCROLLING_NODE(ScrollingTreeOverflowScrollProxyNode, isOverflowScrollProxyNode())
+
+#endif // ENABLE(ASYNC_SCROLLING)

Added: trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm (0 => 246723)


--- trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm	                        (rev 0)
+++ trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm	2019-06-23 19:34:44 UTC (rev 246723)
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "ScrollingTreeOverflowScrollProxyNode.h"
+
+#if ENABLE(ASYNC_SCROLLING)
+
+#import "ScrollingStateOverflowScrollProxyNode.h"
+#import "ScrollingStateTree.h"
+#import "ScrollingTree.h"
+#import "WebCoreCALayerExtras.h"
+
+namespace WebCore {
+
+Ref<ScrollingTreeOverflowScrollProxyNode> ScrollingTreeOverflowScrollProxyNode::create(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+{
+    return adoptRef(*new ScrollingTreeOverflowScrollProxyNode(scrollingTree, nodeID));
+}
+
+ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode(ScrollingTree& scrollingTree, ScrollingNodeID nodeID)
+    : ScrollingTreeNode(scrollingTree, ScrollingNodeType::OverflowProxy, nodeID)
+{
+}
+
+ScrollingTreeOverflowScrollProxyNode::~ScrollingTreeOverflowScrollProxyNode() = default;
+
+void ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
+{
+    const ScrollingStateOverflowScrollProxyNode& overflowProxyStateNode = downcast<ScrollingStateOverflowScrollProxyNode>(stateNode);
+
+    if (stateNode.hasChangedProperty(ScrollingStateNode::Layer))
+        m_layer = stateNode.layer();
+
+    if (overflowProxyStateNode.hasChangedProperty(ScrollingStateOverflowScrollProxyNode::OverflowScrollingNode))
+        m_overflowScrollingNodeID = overflowProxyStateNode.overflowScrollingNode();
+
+    auto& relatedNodes = scrollingTree().overflowRelatedNodes();
+    relatedNodes.ensure(m_overflowScrollingNodeID, [] {
+        return Vector<ScrollingNodeID>();
+    }).iterator->value.append(scrollingNodeID());
+
+    scrollingTree().positionedNodesWithRelatedOverflow().add(scrollingNodeID());
+}
+
+FloatSize ScrollingTreeOverflowScrollProxyNode::scrollDeltaSinceLastCommit() const
+{
+    if (auto* node = scrollingTree().nodeForID(m_overflowScrollingNodeID)) {
+        if (is<ScrollingTreeOverflowScrollingNode>(node))
+            return downcast<ScrollingTreeOverflowScrollingNode>(*node).scrollDeltaSinceLastCommit();
+    }
+
+    return { };
+}
+
+void ScrollingTreeOverflowScrollProxyNode::applyLayerPositions()
+{
+    FloatPoint scrollOffset;
+    if (auto* node = scrollingTree().nodeForID(m_overflowScrollingNodeID)) {
+        if (is<ScrollingTreeOverflowScrollingNode>(node)) {
+            auto& overflowNode = downcast<ScrollingTreeOverflowScrollingNode>(*node);
+            scrollOffset = overflowNode.currentScrollOffset();
+        }
+    }
+
+    LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreeOverflowScrollProxyNode " << scrollingNodeID() << " applyLayerPositions: setting bounds origin to " << scrollOffset);
+    [m_layer _web_setLayerBoundsOrigin:scrollOffset];
+}
+
+void ScrollingTreeOverflowScrollProxyNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
+{
+    ts << "overflow scroll proxy node";
+    ScrollingTreeNode::dumpProperties(ts, behavior);
+
+    if (auto* relatedOverflowNode = scrollingTree().nodeForID(m_overflowScrollingNodeID)) {
+        auto scrollPosition = downcast<ScrollingTreeOverflowScrollingNode>(*relatedOverflowNode).currentScrollPosition();
+        ts.dumpProperty("related overflow scrolling node scroll position", scrollPosition);
+    }
+
+    if (behavior & ScrollingStateTreeAsTextBehaviorIncludeNodeIDs)
+        ts.dumpProperty("overflow scrolling node", m_overflowScrollingNodeID);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING)

Modified: trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm	2019-06-23 19:34:44 UTC (rev 246723)
@@ -33,7 +33,7 @@
 #import "ScrollingTree.h"
 #import "ScrollingTreeOverflowScrollingNode.h"
 #import "ScrollingTreeScrollingNode.h"
-#import <QuartzCore/CALayer.h>
+#import "WebCoreCALayerExtras.h"
 #import <wtf/text/TextStream.h>
 
 namespace WebCore {

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm	2019-06-23 19:34:44 UTC (rev 246723)
@@ -37,8 +37,7 @@
 #import "ScrollingStateTree.h"
 #import "ScrollingTree.h"
 #import "TileController.h"
-#import "WebLayer.h"
-#import <QuartzCore/QuartzCore.h>
+#import "WebCoreCALayerExtras.h"
 #import <wtf/Deque.h>
 #import <wtf/text/CString.h>
 #import <wtf/text/TextStream.h>

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -29,6 +29,7 @@
 #include "ScrollingTreeFixedNode.h"
 #include "ScrollingTreeFrameHostingNode.h"
 #include "ScrollingTreeFrameScrollingNodeMac.h"
+#include "ScrollingTreeOverflowScrollProxyNode.h"
 #include "ScrollingTreeOverflowScrollingNodeMac.h"
 #include "ScrollingTreePositionedNode.h"
 #include "ScrollingTreeStickyNode.h"
@@ -57,7 +58,8 @@
         return ScrollingTreeFrameHostingNode::create(*this, nodeID);
     case ScrollingNodeType::Overflow:
         return ScrollingTreeOverflowScrollingNodeMac::create(*this, nodeID);
-        break;
+    case ScrollingNodeType::OverflowProxy:
+        return ScrollingTreeOverflowScrollProxyNode::create(*this, nodeID);
     case ScrollingNodeType::Fixed:
         return ScrollingTreeFixedNode::create(*this, nodeID);
     case ScrollingNodeType::Sticky:

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm (246722 => 246723)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm	2019-06-23 19:34:44 UTC (rev 246723)
@@ -91,8 +91,7 @@
 
 void ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers()
 {
-    auto scrollOffset = ScrollableArea::scrollOffsetFromPosition(currentScrollPosition(), toFloatSize(scrollOrigin()));
-    [scrollContainerLayer() _web_setLayerBoundsOrigin:scrollOffset];
+    [scrollContainerLayer() _web_setLayerBoundsOrigin:currentScrollOffset()];
 }
 
 void ScrollingTreeOverflowScrollingNodeMac::repositionRelatedLayers()

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (246722 => 246723)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -4116,6 +4116,8 @@
         return ScrollCoordinationRole::ViewportConstrained;
     case ScrollingNodeType::Positioned:
         return ScrollCoordinationRole::Positioning;
+    case ScrollingNodeType::OverflowProxy:
+        break;
     }
     ASSERT_NOT_REACHED();
     return ScrollCoordinationRole::Scrolling;

Modified: trunk/Source/WebKit/ChangeLog (246722 => 246723)


--- trunk/Source/WebKit/ChangeLog	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebKit/ChangeLog	2019-06-23 19:34:44 UTC (rev 246723)
@@ -1,3 +1,36 @@
+2019-06-23  Simon Fraser  <[email protected]>
+
+        Add OverflowScrollProxyNodes to the scrolling tree
+        https://bugs.webkit.org/show_bug.cgi?id=199132
+
+        Reviewed by Antti Koivisto.
+
+        Add ScrollingStateOverflowScrollProxyNode and ScrollingTreeOverflowScrollProxyNode. These
+        nodes represent clip and scroll position for an overflow:scroll in the containing block chain,
+        but not the paint ancestor chain of a layer. They will be used to correctly manipulate clip
+        rects for composited layers in non-stacking-context scrollers, and in a future patch will
+        replace the functionality of "Moves" positioned nodes.
+
+        An OverflowScrollProxyNode has the ScrollingNodeID of the scrolling node that it relates to,
+        and we use the existing "related overflow nodes" to create the back references in the scrolling tree.
+
+        These nodes are not instantiated yet; a future patch will hook them up.
+
+        * Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
+        (ArgumentCoder<ScrollingStateOverflowScrollProxyNode>::encode):
+        (ArgumentCoder<ScrollingStateOverflowScrollProxyNode>::decode):
+        (WebKit::encodeNodeAndDescendants):
+        (WebKit::RemoteScrollingCoordinatorTransaction::decode):
+        (WebKit::dump):
+        * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
+        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
+        * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
+        (WebKit::RemoteScrollingTree::createScrollingTreeNode):
+        * UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
+        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
+        * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
+        (WebKit::ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers):
+
 2019-06-21  Jiewen Tan  <[email protected]>
 
         Unreviewed, a build fix after r246701

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp (246722 => 246723)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -32,6 +32,7 @@
 #include <WebCore/ScrollingStateFixedNode.h>
 #include <WebCore/ScrollingStateFrameHostingNode.h>
 #include <WebCore/ScrollingStateFrameScrollingNode.h>
+#include <WebCore/ScrollingStateOverflowScrollProxyNode.h>
 #include <WebCore/ScrollingStateOverflowScrollingNode.h>
 #include <WebCore/ScrollingStatePositionedNode.h>
 #include <WebCore/ScrollingStateStickyNode.h>
@@ -70,6 +71,11 @@
     static bool decode(Decoder&, ScrollingStateOverflowScrollingNode&);
 };
 
+template<> struct ArgumentCoder<ScrollingStateOverflowScrollProxyNode> {
+    static void encode(Encoder&, const ScrollingStateOverflowScrollProxyNode&);
+    static bool decode(Decoder&, ScrollingStateOverflowScrollProxyNode&);
+};
+
 template<> struct ArgumentCoder<ScrollingStateFixedNode> {
     static void encode(Encoder&, const ScrollingStateFixedNode&);
     static bool decode(Decoder&, ScrollingStateFixedNode&);
@@ -201,6 +207,12 @@
     encoder << static_cast<const ScrollingStateScrollingNode&>(node);
 }
 
+void ArgumentCoder<ScrollingStateOverflowScrollProxyNode>::encode(Encoder& encoder, const ScrollingStateOverflowScrollProxyNode& node)
+{
+    encoder << static_cast<const ScrollingStateNode&>(node);
+    SCROLLING_NODE_ENCODE(ScrollingStateOverflowScrollProxyNode::OverflowScrollingNode, overflowScrollingNode)
+}
+
 #define SCROLLING_NODE_DECODE(property, type, setter) \
     if (node.hasChangedProperty(property)) { \
         type decodedValue; \
@@ -345,6 +357,15 @@
     return true;
 }
 
+bool ArgumentCoder<ScrollingStateOverflowScrollProxyNode>::decode(Decoder& decoder, ScrollingStateOverflowScrollProxyNode& node)
+{
+    if (!decoder.decode(static_cast<ScrollingStateNode&>(node)))
+        return false;
+
+    SCROLLING_NODE_DECODE(ScrollingStateOverflowScrollProxyNode::OverflowScrollingNode, ScrollingNodeID, setOverflowScrollingNode);
+    return true;
+}
+
 void ArgumentCoder<ScrollingStateFixedNode>::encode(Encoder& encoder, const ScrollingStateFixedNode& node)
 {
     encoder << static_cast<const ScrollingStateNode&>(node);
@@ -441,6 +462,9 @@
     case ScrollingNodeType::Overflow:
         encoder << downcast<ScrollingStateOverflowScrollingNode>(stateNode);
         break;
+    case ScrollingNodeType::OverflowProxy:
+        encoder << downcast<ScrollingStateOverflowScrollProxyNode>(stateNode);
+        break;
     case ScrollingNodeType::Fixed:
         encoder << downcast<ScrollingStateFixedNode>(stateNode);
         break;
@@ -534,6 +558,10 @@
             if (!decoder.decode(downcast<ScrollingStateOverflowScrollingNode>(*newNode)))
                 return false;
             break;
+        case ScrollingNodeType::OverflowProxy:
+            if (!decoder.decode(downcast<ScrollingStateOverflowScrollProxyNode>(*newNode)))
+                return false;
+            break;
         case ScrollingNodeType::Fixed:
             if (!decoder.decode(downcast<ScrollingStateFixedNode>(*newNode)))
                 return false;
@@ -652,6 +680,12 @@
     dump(ts, static_cast<const ScrollingStateScrollingNode&>(node), changedPropertiesOnly);
 }
 
+static void dump(TextStream& ts, const ScrollingStateOverflowScrollProxyNode& node, bool changedPropertiesOnly)
+{
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateOverflowScrollProxyNode::OverflowScrollingNode))
+        ts.dumpProperty("overflow-scrolling-node", node.overflowScrollingNode());
+}
+
 static void dump(TextStream& ts, const ScrollingStateFixedNode& node, bool changedPropertiesOnly)
 {
     if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFixedNode::ViewportConstraints))
@@ -691,6 +725,9 @@
     case ScrollingNodeType::Overflow:
         dump(ts, downcast<ScrollingStateOverflowScrollingNode>(node), changedPropertiesOnly);
         break;
+    case ScrollingNodeType::OverflowProxy:
+        dump(ts, downcast<ScrollingStateOverflowScrollProxyNode>(node), changedPropertiesOnly);
+        break;
     case ScrollingNodeType::Fixed:
         dump(ts, downcast<ScrollingStateFixedNode>(node), changedPropertiesOnly);
         break;

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp (246722 => 246723)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -156,6 +156,7 @@
                 scrollingStateNode.setHorizontalScrollbarLayer(layerTreeHost.layerForID(scrollingStateNode.horizontalScrollbarLayer()));
             break;
         }
+        case ScrollingNodeType::OverflowProxy:
         case ScrollingNodeType::FrameHosting:
         case ScrollingNodeType::Fixed:
         case ScrollingNodeType::Sticky:

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp (246722 => 246723)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp	2019-06-23 19:34:44 UTC (rev 246723)
@@ -32,6 +32,7 @@
 #include "RemoteScrollingCoordinatorProxy.h"
 #include <WebCore/ScrollingTreeFixedNode.h>
 #include <WebCore/ScrollingTreeFrameHostingNode.h>
+#include <WebCore/ScrollingTreeOverflowScrollProxyNode.h>
 #include <WebCore/ScrollingTreePositionedNode.h>
 #include <WebCore/ScrollingTreeStickyNode.h>
 
@@ -129,6 +130,8 @@
 #else
         return ScrollingTreeOverflowScrollingNodeRemoteMac::create(*this, nodeID);
 #endif
+    case ScrollingNodeType::OverflowProxy:
+        return ScrollingTreeOverflowScrollProxyNode::create(*this, nodeID);
     case ScrollingNodeType::Fixed:
         return ScrollingTreeFixedNode::create(*this, nodeID);
     case ScrollingNodeType::Sticky:

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm (246722 => 246723)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm	2019-06-23 19:34:44 UTC (rev 246723)
@@ -34,6 +34,7 @@
 #import "WebPageProxy.h"
 #import <UIKit/UIView.h>
 #import <WebCore/ScrollingStateFrameScrollingNode.h>
+#import <WebCore/ScrollingStateOverflowScrollProxyNode.h>
 #import <WebCore/ScrollingStateOverflowScrollingNode.h>
 #import <WebCore/ScrollingStatePositionedNode.h>
 #import <WebCore/ScrollingStateTree.h>
@@ -43,6 +44,7 @@
 #import <WebCore/ScrollSnapOffsetsInfo.h>
 #import <WebCore/ScrollTypes.h>
 #import <WebCore/ScrollingTreeFrameScrollingNode.h>
+#import <WebCore/ScrollingTreeOverflowScrollProxyNode.h>
 #import <WebCore/ScrollingTreeOverflowScrollingNode.h>
 #import <WebCore/ScrollingTreePositionedNode.h>
 #endif
@@ -88,6 +90,7 @@
                 scrollingStateNode.setFooterLayer(layerTreeHost.layerForID(scrollingStateNode.footerLayer()));
             break;
         }
+        case ScrollingNodeType::OverflowProxy:
         case ScrollingNodeType::FrameHosting:
         case ScrollingNodeType::Fixed:
         case ScrollingNodeType::Sticky:

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (246722 => 246723)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm	2019-06-23 18:32:51 UTC (rev 246722)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm	2019-06-23 19:34:44 UTC (rev 246723)
@@ -295,8 +295,7 @@
 void ScrollingTreeScrollingNodeDelegateIOS::repositionScrollingLayers()
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS
-    auto scrollOffset = ScrollableArea::scrollOffsetFromPosition(scrollingNode().currentScrollPosition(), toFloatSize(scrollOrigin()));
-    [scrollView() setContentOffset:scrollOffset];
+    [scrollView() setContentOffset:scrollingNode().currentScrollOffset()];
     END_BLOCK_OBJC_EXCEPTIONS
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to