WebKit Bugzilla
Attachment 372692 Details for
Bug 199132
: Add OverflowScrollProxyNodes to the scrolling tree
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199132-20190622174220.patch (text/plain), 60.61 KB, created by
Simon Fraser (smfr)
on 2019-06-22 17:42:22 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-06-22 17:42:22 PDT
Size:
60.61 KB
patch
obsolete
>Subversion Revision: 246717 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 70cc1ae0a5656fc842d8b335e5020fae7d42e79b..ecee227fa7018744e1c11d90a8aaeac0f412820a 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-22 Simon Fraser <simon.fraser@apple.com> >+ >+ Add OverflowScrollProxyNodes to the scrolling tree >+ https://bugs.webkit.org/show_bug.cgi?id=199132 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 <Hironori.Fujii@sony.com> > > Try to use C++14 std::enable_if_t in CheckedArithmetic.h again >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5fc0c232180b7c2f0e3a8836f9ec519278682f84..6f8797050bbf2b6927352c236820d623d3dabb75 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,71 @@ >+2019-06-22 Simon Fraser <simon.fraser@apple.com> >+ >+ Add OverflowScrollProxyNodes to the scrolling tree >+ https://bugs.webkit.org/show_bug.cgi?id=199132 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-22 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] The anonymous InlineBox wrapper for the text node should take the parent style. >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 1bce3f913699aae1c55275fd405482c8604bfb01..7924816c5b6abb37fb8d97700cf511d4afb3efca 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,36 @@ >+2019-06-22 Simon Fraser <simon.fraser@apple.com> >+ >+ Add OverflowScrollProxyNodes to the scrolling tree >+ https://bugs.webkit.org/show_bug.cgi?id=199132 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 <jiewen_tan@apple.com> > > Unreviewed, a build fix after r246701 >diff --git a/Source/WTF/wtf/text/TextStream.h b/Source/WTF/wtf/text/TextStream.h >index 4fc0b2451a5ebe6ee386cfa90fc5bd98f400154d..0cc14cfb6be2122304bd7a86fc28e95b6496a1aa 100644 >--- a/Source/WTF/wtf/text/TextStream.h >+++ b/Source/WTF/wtf/text/TextStream.h >@@ -95,6 +95,7 @@ public: > 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); } > >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 07b3bdc641c4e0e6f36efb0ea45cf62c402fa18c..21c6b7317c465b6bbcc52fdf7ca15988ace7b3bd 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -1603,6 +1603,7 @@ page/scrolling/ScrollingStateFrameHostingNode.cpp > 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 >diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt >index e80a53da721767b3e0183d6f8e070274499dd6b6..7b1e575eab12d8155d46fee14b151381e3959014 100644 >--- a/Source/WebCore/SourcesCocoa.txt >+++ b/Source/WebCore/SourcesCocoa.txt >@@ -148,6 +148,7 @@ page/scrolling/ScrollingMomentumCalculator.cpp > > 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 > >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 073b06806acf889a9c8fb741fda6eb22b99e2ed6..da288703ba746788e0a229af50db5a3e716274c3 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -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 */, >diff --git a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >index ef065e374a3c026acbfa78e574bc2a0d1ce137c4..0093abad096efd043f4c238c0361e5484fdf28aa 100644 >--- a/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >+++ b/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >@@ -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 @@ void AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes(ScrollingNodeID > 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) >diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >index 9290b8b475ca94cd6512d4beeeb29170c7690ef9..a87815ef05b693356a5d524e8f4079a600bd191c 100644 >--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >@@ -464,6 +464,9 @@ TextStream& operator<<(TextStream& ts, ScrollingNodeType nodeType) > case ScrollingNodeType::Overflow: > ts << "overflow-scrolling"; > break; >+ case ScrollingNodeType::OverflowProxy: >+ ts << "overflow-scroll-proxy"; >+ break; > case ScrollingNodeType::Fixed: > ts << "fixed"; > break; >diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h b/Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h >index 0b95e7362f4cf60ee85e579ee0bb1f9b62633763..694efde67ee428523088f9fe08ea040796478845 100644 >--- a/Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h >+++ b/Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h >@@ -36,9 +36,10 @@ enum class ScrollingNodeType : uint8_t { > Subframe, > FrameHosting, > Overflow, >+ OverflowProxy, > Fixed, > Sticky, >- Positioned, >+ Positioned > }; > > enum ScrollingStateTreeAsTextBehaviorFlags { >diff --git a/Source/WebCore/page/scrolling/ScrollingStateNode.h b/Source/WebCore/page/scrolling/ScrollingStateNode.h >index 0f87ea19adab26de79acd571cabd08fa80c1a2ff..d501350120a1b128d91034e5a759af331b04dd47 100644 >--- a/Source/WebCore/page/scrolling/ScrollingStateNode.h >+++ b/Source/WebCore/page/scrolling/ScrollingStateNode.h >@@ -195,6 +195,7 @@ public: > 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); >diff --git a/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp b/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..02ce205dc478533f366378fe37e626c4c13850d0 >--- /dev/null >+++ b/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp >@@ -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) >diff --git a/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.h b/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.h >new file mode 100644 >index 0000000000000000000000000000000000000000..3c1d7b79da715851821cd161c150d76fa92b7f2a >--- /dev/null >+++ b/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.h >@@ -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) >diff --git a/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp b/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp >index e6aa63a0d1540715f6c4a7758a54ea84cfb74ff2..37cc6fa345ceb3eb7e20b1686abc4cda5c815283 100644 >--- a/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp >+++ b/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp >@@ -54,7 +54,7 @@ Ref<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStat > { > return adoptRef(*new ScrollingStateOverflowScrollingNode(*this, adoptiveTree)); > } >- >+ > void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const > { > ts << "Overflow scrolling node"; >diff --git a/Source/WebCore/page/scrolling/ScrollingStateTree.cpp b/Source/WebCore/page/scrolling/ScrollingStateTree.cpp >index f26cded7ea9433df2a9218501e81b68a304fe22c..8a96bcbaf1ef868f1697f24a64fdfcf099309c20 100644 >--- a/Source/WebCore/page/scrolling/ScrollingStateTree.cpp >+++ b/Source/WebCore/page/scrolling/ScrollingStateTree.cpp >@@ -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 @@ Ref<ScrollingStateNode> ScrollingStateTree::createNode(ScrollingNodeType nodeTyp > 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: >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeNode.h b/Source/WebCore/page/scrolling/ScrollingTreeNode.h >index 3b1b749452ec8caad3721b76cac8ca2b20e5f708..87bfc51a0ece01e13c216afcabb0b41ca0eba913 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTreeNode.h >+++ b/Source/WebCore/page/scrolling/ScrollingTreeNode.h >@@ -56,6 +56,7 @@ public: > 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&) { } >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp b/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..a0365616d7e4389c2401229f5536b88458d7cd18 >--- /dev/null >+++ b/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp >@@ -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) >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.h b/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.h >new file mode 100644 >index 0000000000000000000000000000000000000000..6ef2f4a9980410aa19ca9e5d5c5c6c12c924fb0e >--- /dev/null >+++ b/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollProxyNode.h >@@ -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) >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h b/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >index b4340288d06d2864901ac257a4300bdfde61c1e1..b22ffa79225a929cb069a6730f1bed7918d32409 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >+++ b/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >@@ -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 @@ public: > 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; } > >diff --git a/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h b/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h >new file mode 100644 >index 0000000000000000000000000000000000000000..4c712c6eddc3c85fdc43ec11e8fa9c1da7344745 >--- /dev/null >+++ b/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h >@@ -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) >diff --git a/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm b/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm >new file mode 100644 >index 0000000000000000000000000000000000000000..e11e72a687115cdfc37a8871583394b9e6f29974 >--- /dev/null >+++ b/Source/WebCore/page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm >@@ -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) >diff --git a/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm b/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm >index 25c56622b0dbdb3e9269961e7bf1ffff647d38b6..966cce51b10215bbc65630a1b9c8e399657e71cd 100644 >--- a/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm >+++ b/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm >@@ -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 { >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >index 899a4b026fba573e83baf46b372db54ef4493299..b53a684fa30c87f3615d52b98882a0f637b03728 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >@@ -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> >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp b/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp >index cab25035bc66a829a1b13fa279284d9bedec509f..5b4efee0537f8da25123f4dafe2c91d1c82c7d35 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp >+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp >@@ -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 @@ Ref<ScrollingTreeNode> ScrollingTreeMac::createScrollingTreeNode(ScrollingNodeTy > 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: >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >index 885742c30de0eb698f391c43c3fbf0b2565db37e..5b09793a84fa0f114cdb786496011d17bc74d26d 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm >@@ -91,8 +91,7 @@ FloatPoint ScrollingTreeOverflowScrollingNodeMac::adjustedScrollPosition(const F > > void ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers() > { >- auto scrollOffset = ScrollableArea::scrollOffsetFromPosition(currentScrollPosition(), toFloatSize(scrollOrigin())); >- [scrollContainerLayer() _web_setLayerBoundsOrigin:scrollOffset]; >+ [scrollContainerLayer() _web_setLayerBoundsOrigin:currentScrollOffset()]; > } > > void ScrollingTreeOverflowScrollingNodeMac::repositionRelatedLayers() >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 6752a87cf3949677bd73f4642622b5b975e1bdf3..3058334162b1186f88a3004a7123f25c95f8e27c 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -4116,6 +4116,8 @@ static inline ScrollCoordinationRole scrollCoordinationRoleForNodeType(Scrolling > return ScrollCoordinationRole::ViewportConstrained; > case ScrollingNodeType::Positioned: > return ScrollCoordinationRole::Positioning; >+ case ScrollingNodeType::OverflowProxy: >+ break; > } > ASSERT_NOT_REACHED(); > return ScrollCoordinationRole::Scrolling; >diff --git a/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp b/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp >index 35437c7a3562e3896a647da1e2f5dce6778e1e28..05e71967e7aac5531d11d125de2aaeb802e3022f 100644 >--- a/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp >+++ b/Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp >@@ -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 @@ template<> struct ArgumentCoder<ScrollingStateOverflowScrollingNode> { > 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 @@ void ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode(Encoder& encoder > 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 @@ bool ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode(Decoder& decoder > 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 @@ static void encodeNodeAndDescendants(IPC::Encoder& encoder, const ScrollingState > 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 @@ bool RemoteScrollingCoordinatorTransaction::decode(IPC::Decoder& decoder) > 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 @@ static void dump(TextStream& ts, const ScrollingStateOverflowScrollingNode& node > 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 @@ static void dump(TextStream& ts, const ScrollingStateNode& node, bool changedPro > 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; >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp >index d59d9c1bdf79cdb7339805cda7788832927e548f..faa41dc18ad78d707f157734a848c30b0e37dbe1 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp >@@ -156,6 +156,7 @@ void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree& > scrollingStateNode.setHorizontalScrollbarLayer(layerTreeHost.layerForID(scrollingStateNode.horizontalScrollbarLayer())); > break; > } >+ case ScrollingNodeType::OverflowProxy: > case ScrollingNodeType::FrameHosting: > case ScrollingNodeType::Fixed: > case ScrollingNodeType::Sticky: >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp >index bd5c451f0e0e3525f8a605155c437a74ed58ca14..afabbc1eae31f86b9d4ab89f67545efedec550f2 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp >@@ -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 @@ Ref<ScrollingTreeNode> RemoteScrollingTree::createScrollingTreeNode(ScrollingNod > #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: >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm b/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm >index 97dbcb4d757b5f292d40f810bcd154a730c7a06d..6b6d1077a10d3d677dfde34586b804ebeea84812 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm >@@ -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 @@ void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree& > scrollingStateNode.setFooterLayer(layerTreeHost.layerForID(scrollingStateNode.footerLayer())); > break; > } >+ case ScrollingNodeType::OverflowProxy: > case ScrollingNodeType::FrameHosting: > case ScrollingNodeType::Fixed: > case ScrollingNodeType::Sticky: >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm >index 5c39e7822d8f522f58445d343957d3ce62cb0d5a..cf1f3f8a890a99f9b2e4a9180998004dd1decddc 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm >@@ -295,8 +295,7 @@ void ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren(const Scrol > 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 > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199132
: 372692