WebKit Bugzilla
Attachment 362834 Details for
Bug 194980
: Remove remnants of iOS WK1 scrolling tree code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194980-20190223133707.patch (text/plain), 66.53 KB, created by
Simon Fraser (smfr)
on 2019-02-23 13:37:09 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-02-23 13:37:09 PST
Size:
66.53 KB
patch
obsolete
>Subversion Revision: 241987 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d86be8da0cfbfad6f567afded3fd5b37f657b640..eb3e30aca03f5533525365b7fbf2a282fef21da7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,62 @@ >+2019-02-23 Simon Fraser <simon.fraser@apple.com> >+ >+ Remove remnants of iOS WK1 scrolling tree code >+ https://bugs.webkit.org/show_bug.cgi?id=194980 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove ScrollingTreeIOS and ScrollingCoordinatorIOS which were never instantiated, >+ to reduce maintenance costs and simplify. >+ >+ Merge ScrollingTreeFrameScrollingNodeIOS into ScrollingTreeFrameScrollingNodeRemoteIOS >+ since that was the only concrete subclass, removing code which never applies to iOS WK2 >+ (e.g. the synchronous scrolling code path). >+ >+ * SourcesCocoa.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * page/FrameView.h: >+ * page/scrolling/ScrollingCoordinator.cpp: >+ * page/scrolling/ScrollingTree.h: >+ * page/scrolling/ScrollingTreeFrameScrollingNode.h: >+ * page/scrolling/ScrollingTreeNode.h: >+ * page/scrolling/ScrollingTreeScrollingNode.cpp: >+ (WebCore::ScrollingTreeScrollingNode::handleWheelEvent): >+ * page/scrolling/ScrollingTreeScrollingNode.h: >+ (WebCore::ScrollingTreeScrollingNode::updateLayersAfterDelegatedScroll): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::scrollableAreaSize const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::totalContentsSize const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsets const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::verticalSnapOffsets const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::horizontalSnapOffsetRanges const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::verticalSnapOffsetRanges const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::currentHorizontalSnapPointIndex const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::currentVerticalSnapPointIndex const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::setCurrentHorizontalSnapPointIndex): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::setCurrentVerticalSnapPointIndex): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::useDarkAppearanceForScrollbars const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::reachableContentsSize const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::parentRelativeScrollableRect const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::scrollOrigin const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::totalContentsSizeForRubberBand const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::setTotalContentsSizeForRubberBand): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::canHaveScrollbars const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::expectsWheelEventTestTrigger const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::scrollContainerLayer const): Deleted. >+ (WebCore::ScrollingTreeScrollingNode::scrolledContentsLayer const): Deleted. >+ * page/scrolling/ios/ScrollingCoordinatorIOS.h: Removed. >+ * page/scrolling/ios/ScrollingCoordinatorIOS.mm: Removed. >+ * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: Removed. >+ * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Removed. >+ * page/scrolling/ios/ScrollingTreeIOS.cpp: Removed. >+ * page/scrolling/ios/ScrollingTreeIOS.h: Removed. >+ * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: >+ (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPosition): >+ > 2019-02-22 Ryosuke Niwa <rniwa@webkit.org> > > Crash in SWServerJobQueue::runNextJobSynchronously >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index b3a142de975e0ed9555a1d0c3bb3dcfdc6425492..2a4b48023f429ff0260dd3fa2a24c7cffb9fe315 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,32 @@ >+2019-02-23 Simon Fraser <simon.fraser@apple.com> >+ >+ Remove remnants of iOS WK1 scrolling tree code >+ https://bugs.webkit.org/show_bug.cgi?id=194980 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove ScrollingTreeIOS and ScrollingCoordinatorIOS which were never instantiated. >+ >+ Merge ScrollingTreeFrameScrollingNodeIOS into ScrollingTreeFrameScrollingNodeRemoteIOS, >+ removing code which never applies to iOS WK2 (e.g. the synchronous scrolling code path). >+ >+ * UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp: >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h: >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm: >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::ScrollingTreeFrameScrollingNodeRemoteIOS): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::minimumScrollPosition const): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::maximumScrollPosition const): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::scrollPosition const): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollPosition): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollLayerPosition): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateChildNodesAfterScroll): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterDelegatedScroll): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterViewportChange): >+ (WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange): >+ * UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h: >+ > 2019-02-22 Andy Estes <aestes@apple.com> > > [Cocoa] Do not suppress deprecation warnings when calling sandbox_extension_issue_file >diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt >index 2aa2367f1adf482128ea69ffbf1fcfdfb592b4a5..79d53ee21c7959dcafd30f401d15559319b5dde0 100644 >--- a/Source/WebCore/SourcesCocoa.txt >+++ b/Source/WebCore/SourcesCocoa.txt >@@ -149,10 +149,6 @@ page/scrolling/cocoa/ScrollingStateNode.mm > page/scrolling/cocoa/ScrollingTreeFixedNode.mm > page/scrolling/cocoa/ScrollingTreeStickyNode.mm > >-page/scrolling/ios/ScrollingCoordinatorIOS.mm >-page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm >-page/scrolling/ios/ScrollingTreeIOS.cpp >- > page/scrolling/mac/ScrollingCoordinatorMac.mm > page/scrolling/mac/ScrollingMomentumCalculatorMac.mm > page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 46a2d8ce7084e774b3f282772c6cee0b5017e6f3..fef90f398dc457530a8c5b4da715b29b72313151 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -365,9 +365,6 @@ > 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, ); }; }; >- 0FC4E40D187F82E10045882C /* ScrollingCoordinatorIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4E407187F82E10045882C /* ScrollingCoordinatorIOS.h */; }; >- 0FC4E410187F82E10045882C /* ScrollingTreeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4E40A187F82E10045882C /* ScrollingTreeIOS.h */; }; >- 0FC4E411187F82E10045882C /* ScrollingTreeFrameScrollingNodeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4E40B187F82E10045882C /* ScrollingTreeFrameScrollingNodeIOS.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 */; }; >@@ -5812,12 +5809,6 @@ > 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>"; }; >- 0FC4E407187F82E10045882C /* ScrollingCoordinatorIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingCoordinatorIOS.h; sourceTree = "<group>"; }; >- 0FC4E408187F82E10045882C /* ScrollingCoordinatorIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingCoordinatorIOS.mm; sourceTree = "<group>"; }; >- 0FC4E409187F82E10045882C /* ScrollingTreeIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingTreeIOS.cpp; sourceTree = "<group>"; }; >- 0FC4E40A187F82E10045882C /* ScrollingTreeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeIOS.h; sourceTree = "<group>"; }; >- 0FC4E40B187F82E10045882C /* ScrollingTreeFrameScrollingNodeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingTreeFrameScrollingNodeIOS.h; sourceTree = "<group>"; }; >- 0FC4E40C187F82E10045882C /* ScrollingTreeFrameScrollingNodeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeFrameScrollingNodeIOS.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>"; }; >@@ -16378,19 +16369,6 @@ > tabWidth = 4; > usesTabs = 0; > }; >- 0FC4E406187F82D30045882C /* ios */ = { >- isa = PBXGroup; >- children = ( >- 0FC4E407187F82E10045882C /* ScrollingCoordinatorIOS.h */, >- 0FC4E408187F82E10045882C /* ScrollingCoordinatorIOS.mm */, >- 0FC4E40B187F82E10045882C /* ScrollingTreeFrameScrollingNodeIOS.h */, >- 0FC4E40C187F82E10045882C /* ScrollingTreeFrameScrollingNodeIOS.mm */, >- 0FC4E409187F82E10045882C /* ScrollingTreeIOS.cpp */, >- 0FC4E40A187F82E10045882C /* ScrollingTreeIOS.h */, >- ); >- path = ios; >- sourceTree = "<group>"; >- }; > 0FE5FBC91C3DD5060007A2CA /* displaylists */ = { > isa = PBXGroup; > children = ( >@@ -16941,7 +16919,6 @@ > isa = PBXGroup; > children = ( > 93EF7D531954E98F00DFB71D /* cocoa */, >- 0FC4E406187F82D30045882C /* ios */, > 1AF62EE214DA22A70041556C /* mac */, > 0FFD4D5E18651FA300512F6E /* AsyncScrollingCoordinator.cpp */, > 0FFD4D5F18651FA300512F6E /* AsyncScrollingCoordinator.h */, >@@ -31497,7 +31474,6 @@ > 1AA84F05143BA7BD0051D153 /* ScrollController.h in Headers */, > 0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */, > 1AF62EE814DA22A70041556C /* ScrollingCoordinator.h in Headers */, >- 0FC4E40D187F82E10045882C /* ScrollingCoordinatorIOS.h in Headers */, > 9391A991162746CB00297330 /* ScrollingCoordinatorMac.h in Headers */, > 712DBA4921F8AD83008F36B2 /* ScrollingCoordinatorTypes.h in Headers */, > 51C61B0B1DE536E7008A212D /* ScrollingMomentumCalculator.h in Headers */, >@@ -31515,9 +31491,7 @@ > 0F94B6472208FE3600157014 /* ScrollingTreeFixedNode.h in Headers */, > 0FD41E6821F80C0E000C006D /* ScrollingTreeFrameHostingNode.h in Headers */, > 0FEA3E88191B3BD7000F1B55 /* ScrollingTreeFrameScrollingNode.h in Headers */, >- 0FC4E411187F82E10045882C /* ScrollingTreeFrameScrollingNodeIOS.h in Headers */, > 93C4A4151629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.h in Headers */, >- 0FC4E410187F82E10045882C /* ScrollingTreeIOS.h in Headers */, > 0FE5806419327A6200DE32EB /* ScrollingTreeMac.h in Headers */, > 1AAADDE414DC8C8F00AF64B3 /* ScrollingTreeNode.h in Headers */, > 0FEA3E80191B3169000F1B55 /* ScrollingTreeOverflowScrollingNode.h in Headers */, >diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h >index 2173dac3d28ecc81780a0dc72bda87ed26308028..e0d1878904ff9b68fbcc4257748e8eaec3e66735 100644 >--- a/Source/WebCore/page/FrameView.h >+++ b/Source/WebCore/page/FrameView.h >@@ -305,7 +305,7 @@ public: > LayoutPoint scrollPositionForFixedPosition() const; > > // Static function can be called from another thread. >- static LayoutPoint scrollPositionForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements, int headerHeight, int footerHeight); >+ WEBCORE_EXPORT static LayoutPoint scrollPositionForFixedPosition(const LayoutRect& visibleContentRect, const LayoutSize& totalContentsSize, const LayoutPoint& scrollPosition, const LayoutPoint& scrollOrigin, float frameScaleFactor, bool fixedElementsLayoutRelativeToFrame, ScrollBehaviorForFixedElements, int headerHeight, int footerHeight); > > WEBCORE_EXPORT static LayoutSize expandedLayoutViewportSize(const LayoutSize& baseLayoutViewportSize, const LayoutSize& documentSize, double heightExpansionFactor); > >diff --git a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >index 22f9fc2dbe986a4e67b0b6b083a9aa3b7a6f52b1..cb8afa831c76c5b0b790cfac67b59d23f37e465f 100644 >--- a/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >+++ b/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp >@@ -47,7 +47,7 @@ > > namespace WebCore { > >-#if !PLATFORM(COCOA) && !USE(COORDINATED_GRAPHICS) >+#if !PLATFORM(MAC) && !USE(COORDINATED_GRAPHICS) > Ref<ScrollingCoordinator> ScrollingCoordinator::create(Page* page) > { > return adoptRef(*new ScrollingCoordinator(page)); >diff --git a/Source/WebCore/page/scrolling/ScrollingTree.h b/Source/WebCore/page/scrolling/ScrollingTree.h >index 68ba220d2a6fd50b1b6e9c5e410b08f97d552ddc..00345c0c2e5227377286073a91c5f26bc7a07009 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTree.h >+++ b/Source/WebCore/page/scrolling/ScrollingTree.h >@@ -126,7 +126,7 @@ public: > bool isHandlingProgrammaticScroll(); > > void setScrollPinningBehavior(ScrollPinningBehavior); >- ScrollPinningBehavior scrollPinningBehavior(); >+ WEBCORE_EXPORT ScrollPinningBehavior scrollPinningBehavior(); > > WEBCORE_EXPORT bool willWheelEventStartSwipeGesture(const PlatformWheelEvent&); > >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h b/Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h >index 945da246fddaac506115c8b9cf5ba1d2d6164915..8f5a464afde8b60c4d629c4fb14553aed2e7d63e 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h >+++ b/Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h >@@ -35,7 +35,7 @@ class PlatformWheelEvent; > class ScrollingTree; > class ScrollingStateScrollingNode; > >-class ScrollingTreeFrameScrollingNode : public ScrollingTreeScrollingNode { >+class WEBCORE_EXPORT ScrollingTreeFrameScrollingNode : public ScrollingTreeScrollingNode { > public: > virtual ~ScrollingTreeFrameScrollingNode(); > >@@ -44,8 +44,6 @@ public: > // FIXME: We should implement this when we support ScrollingTreeScrollingNodes as children. > void updateLayersAfterAncestorChange(const ScrollingTreeNode& /*changedNode*/, const FloatRect& /*fixedPositionRect*/, const FloatSize& /*cumulativeDelta*/) override { } > >- ScrollingEventResult handleWheelEvent(const PlatformWheelEvent&) override = 0; >- > void updateLayersAfterViewportChange(const FloatRect& fixedPositionRect, double scale) override = 0; > void updateLayersAfterDelegatedScroll(const FloatPoint&) override { } > >@@ -76,10 +74,10 @@ protected: > ScrollBehaviorForFixedElements scrollBehaviorForFixedElements() const { return m_behaviorForFixed; } > > private: >- WEBCORE_EXPORT LayoutPoint parentToLocalPoint(LayoutPoint) const final; >- WEBCORE_EXPORT LayoutPoint localToContentsPoint(LayoutPoint) const final; >+ LayoutPoint parentToLocalPoint(LayoutPoint) const final; >+ LayoutPoint localToContentsPoint(LayoutPoint) const final; > >- WEBCORE_EXPORT void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override; >+ void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override; > > FloatRect m_layoutViewport; > FloatPoint m_minLayoutViewportOrigin; >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeNode.h b/Source/WebCore/page/scrolling/ScrollingTreeNode.h >index 6754a278781b497a06849657337ab0b599af8272..e9f58aad072038c12a9c6549f61c71ad09a5f587 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTreeNode.h >+++ b/Source/WebCore/page/scrolling/ScrollingTreeNode.h >@@ -63,7 +63,7 @@ public: > ScrollingTreeNode* parent() const { return m_parent; } > void setParent(ScrollingTreeNode* parent) { m_parent = parent; } > >- bool isRootNode() const; >+ WEBCORE_EXPORT bool isRootNode() const; > > Vector<RefPtr<ScrollingTreeNode>>* children() { return m_children.get(); } > const Vector<RefPtr<ScrollingTreeNode>>* children() const { return m_children.get(); } >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp b/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp >index 6ccb6fdd3e1c1573cdfbc53d49b9237b7330f106..45dafcca9f9bb835ada94afb3641651b42749379 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp >+++ b/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp >@@ -122,6 +122,11 @@ void ScrollingTreeScrollingNode::updateLayersAfterAncestorChange(const Scrolling > child->updateLayersAfterAncestorChange(changedNode, fixedPositionRect, cumulativeDelta); > } > >+ScrollingEventResult ScrollingTreeScrollingNode::handleWheelEvent(const PlatformWheelEvent&) >+{ >+ return ScrollingEventResult::DidNotHandleEvent; >+} >+ > void ScrollingTreeScrollingNode::setScrollPosition(const FloatPoint& scrollPosition, ScrollPositionClamp clamp) > { > FloatPoint newScrollPosition = scrollPosition; >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h b/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >index cb1ec97a4877068d6f4c9dec42f737048918e858..b78483c9ea211f72b4f0fc103442cde89efc18b3 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >+++ b/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >@@ -38,7 +38,7 @@ namespace WebCore { > class ScrollingTree; > class ScrollingStateScrollingNode; > >-class ScrollingTreeScrollingNode : public ScrollingTreeNode { >+class WEBCORE_EXPORT ScrollingTreeScrollingNode : public ScrollingTreeNode { > friend class ScrollingTreeScrollingNodeDelegate; > #if PLATFORM(MAC) > friend class ScrollingTreeScrollingNodeDelegateMac; >@@ -47,13 +47,13 @@ class ScrollingTreeScrollingNode : public ScrollingTreeNode { > public: > virtual ~ScrollingTreeScrollingNode(); > >- WEBCORE_EXPORT void commitStateBeforeChildren(const ScrollingStateNode&) override; >- WEBCORE_EXPORT void commitStateAfterChildren(const ScrollingStateNode&) override; >+ void commitStateBeforeChildren(const ScrollingStateNode&) override; >+ void commitStateAfterChildren(const ScrollingStateNode&) override; > >- WEBCORE_EXPORT void updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) override; >+ void updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) override; > >- virtual ScrollingEventResult handleWheelEvent(const PlatformWheelEvent&) = 0; >- WEBCORE_EXPORT virtual void setScrollPosition(const FloatPoint&, ScrollPositionClamp = ScrollPositionClamp::ToContentEdges); >+ virtual ScrollingEventResult handleWheelEvent(const PlatformWheelEvent&); >+ virtual void setScrollPosition(const FloatPoint&, ScrollPositionClamp = ScrollPositionClamp::ToContentEdges); > > void scrollBy(const FloatSize&, ScrollPositionClamp = ScrollPositionClamp::ToContentEdges); > >@@ -78,13 +78,13 @@ public: > bool useDarkAppearanceForScrollbars() const { return m_scrollableAreaParameters.useDarkAppearanceForScrollbars; } > > bool scrollLimitReached(const PlatformWheelEvent&) const; >- WEBCORE_EXPORT ScrollingTreeScrollingNode* scrollingNodeForPoint(LayoutPoint) const override; >+ ScrollingTreeScrollingNode* scrollingNodeForPoint(LayoutPoint) const override; > > protected: > ScrollingTreeScrollingNode(ScrollingTree&, ScrollingNodeType, ScrollingNodeID); > >- WEBCORE_EXPORT virtual FloatPoint minimumScrollPosition() const; >- WEBCORE_EXPORT virtual FloatPoint maximumScrollPosition() const; >+ virtual FloatPoint minimumScrollPosition() const; >+ virtual FloatPoint maximumScrollPosition() const; > > FloatPoint clampScrollPosition(const FloatPoint&) const; > >@@ -116,10 +116,10 @@ protected: > CALayer *scrolledContentsLayer() const { return m_scrolledContentsLayer.get(); } > #endif > >- WEBCORE_EXPORT LayoutPoint parentToLocalPoint(LayoutPoint) const override; >- WEBCORE_EXPORT LayoutPoint localToContentsPoint(LayoutPoint) const override; >+ LayoutPoint parentToLocalPoint(LayoutPoint) const override; >+ LayoutPoint localToContentsPoint(LayoutPoint) const override; > >- WEBCORE_EXPORT void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override; >+ void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override; > > private: > FloatSize m_scrollableAreaSize; >diff --git a/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h b/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h >deleted file mode 100644 >index 9cf639ecbd4e07589cb9a28bcf7d9b2b4f896fe0..0000000000000000000000000000000000000000 >--- a/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.h >+++ /dev/null >@@ -1,62 +0,0 @@ >-/* >- * Copyright (C) 2014 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) && PLATFORM(IOS_FAMILY) >- >-#include "AsyncScrollingCoordinator.h" >- >-namespace WebCore { >- >-class Scrollbar; >-class ScrollingStateNode; >-class ScrollingStateScrollingNode; >-class ScrollingStateTree; >-class ThreadedScrollingTree; >- >-class ScrollingCoordinatorIOS : public AsyncScrollingCoordinator { >-public: >- explicit ScrollingCoordinatorIOS(Page*); >- virtual ~ScrollingCoordinatorIOS(); >- >- void pageDestroyed() override; >- >- void commitTreeStateIfNeeded() override; >- >- // Handle the wheel event on the scrolling thread. Returns whether the event was handled or not. >- ScrollingEventResult handleWheelEvent(FrameView&, const PlatformWheelEvent&) override { return ScrollingEventResult::DidNotHandleEvent; } >- >-private: >- void scheduleTreeStateCommit() override; >- >- void commitTreeState(); >- >- Timer m_scrollingStateTreeCommitterTimer; >-}; >- >-} // namespace WebCore >- >-#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm b/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm >deleted file mode 100644 >index 8b08a1387cb53a6cbab37c07d87b7b43c51fd40f..0000000000000000000000000000000000000000 >--- a/Source/WebCore/page/scrolling/ios/ScrollingCoordinatorIOS.mm >+++ /dev/null >@@ -1,103 +0,0 @@ >-/* >- * Copyright (C) 2014 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" >- >-#if ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >- >-#import "ScrollingCoordinatorIOS.h" >- >-#include "Frame.h" >-#include "FrameView.h" >-#include "Page.h" >-#include "Region.h" >-#include "ScrollingStateTree.h" >-#include "ScrollingThread.h" >-#include "ScrollingTreeFixedNode.h" >-#include "ScrollingTreeFrameScrollingNodeIOS.h" >-#include "ScrollingTreeStickyNode.h" >-#include "ScrollingTreeIOS.h" >-#include <wtf/MainThread.h> >- >-namespace WebCore { >- >-Ref<ScrollingCoordinator> ScrollingCoordinator::create(Page* page) >-{ >- return adoptRef(*new ScrollingCoordinatorIOS(page)); >-} >- >-ScrollingCoordinatorIOS::ScrollingCoordinatorIOS(Page* page) >- : AsyncScrollingCoordinator(page) >- , m_scrollingStateTreeCommitterTimer(*this, &ScrollingCoordinatorIOS::commitTreeState) >-{ >- setScrollingTree(ScrollingTreeIOS::create(*this)); >-} >- >-ScrollingCoordinatorIOS::~ScrollingCoordinatorIOS() >-{ >- ASSERT(!scrollingTree()); >-} >- >-void ScrollingCoordinatorIOS::pageDestroyed() >-{ >- AsyncScrollingCoordinator::pageDestroyed(); >- >- m_scrollingStateTreeCommitterTimer.stop(); >- >- // Invalidating the scrolling tree will break the reference cycle between the ScrollingCoordinator and ScrollingTree objects. >- releaseScrollingTree(); >-} >- >-void ScrollingCoordinatorIOS::commitTreeStateIfNeeded() >-{ >- if (!scrollingStateTree()->hasChangedProperties()) >- return; >- >- commitTreeState(); >- m_scrollingStateTreeCommitterTimer.stop(); >-} >- >-void ScrollingCoordinatorIOS::scheduleTreeStateCommit() >-{ >- ASSERT(scrollingStateTree()->hasChangedProperties()); >- >- if (m_scrollingStateTreeCommitterTimer.isActive()) >- return; >- >- m_scrollingStateTreeCommitterTimer.startOneShot(0_s); >-} >- >-void ScrollingCoordinatorIOS::commitTreeState() >-{ >- ASSERT(scrollingStateTree()->hasChangedProperties()); >- >- scrollingStateTree()->commit(LayerRepresentation::PlatformLayerRepresentation); >- // FIXME: figure out how to commit. >-} >- >- >-} // namespace WebCore >- >-#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h b/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h >deleted file mode 100644 >index f2fa2102029eae7cd8405ddf57af862bf2c3e5b7..0000000000000000000000000000000000000000 >--- a/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h >+++ /dev/null >@@ -1,74 +0,0 @@ >-/* >- * Copyright (C) 2014 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) && PLATFORM(IOS_FAMILY) >- >-#include "ScrollingTreeFrameScrollingNode.h" >-#include <wtf/RetainPtr.h> >- >-OBJC_CLASS CALayer; >- >-namespace WebCore { >- >-class WEBCORE_EXPORT ScrollingTreeFrameScrollingNodeIOS : public ScrollingTreeFrameScrollingNode { >-public: >- static Ref<ScrollingTreeFrameScrollingNodeIOS> create(ScrollingTree&, ScrollingNodeType, ScrollingNodeID); >- virtual ~ScrollingTreeFrameScrollingNodeIOS(); >- >-protected: >- ScrollingTreeFrameScrollingNodeIOS(ScrollingTree&, ScrollingNodeType, ScrollingNodeID); >- >- // ScrollingTreeNode member functions. >- void commitStateBeforeChildren(const ScrollingStateNode&) override; >- void commitStateAfterChildren(const ScrollingStateNode&) override; >- >- ScrollingEventResult handleWheelEvent(const PlatformWheelEvent&) override; >- >- FloatPoint scrollPosition() const override; >- >- void updateLayersAfterViewportChange(const FloatRect& fixedPositionRect, double scale) override; >- void updateLayersAfterDelegatedScroll(const FloatPoint&) override; >- void updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) override; >- >- void setScrollPosition(const FloatPoint&, ScrollPositionClamp = ScrollPositionClamp::ToContentEdges) override; >- void setScrollLayerPosition(const FloatPoint&, const FloatRect& layoutViewport) override; >- >- FloatPoint minimumScrollPosition() const override; >- FloatPoint maximumScrollPosition() const override; >- >-private: >- void updateChildNodesAfterScroll(const FloatPoint&); >- >- RetainPtr<CALayer> m_counterScrollingLayer; >- RetainPtr<CALayer> m_headerLayer; >- RetainPtr<CALayer> m_footerLayer; >- FloatPoint m_probableMainThreadScrollPosition; >-}; >- >-} // namespace WebCore >- >-#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm b/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm >deleted file mode 100644 >index 9aaaab81cba07218b2e79e38635782732e3ee573..0000000000000000000000000000000000000000 >--- a/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm >+++ /dev/null >@@ -1,221 +0,0 @@ >-/* >- * Copyright (C) 2014 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 "ScrollingTreeFrameScrollingNodeIOS.h" >- >-#if ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >- >-#import "FrameView.h" >-#import "ScrollingCoordinator.h" >-#import "ScrollingStateFrameScrollingNode.h" >-#import "ScrollingStateTree.h" >-#import "ScrollingTree.h" >-#import "TileController.h" >-#import "WebLayer.h" >-#import <QuartzCore/QuartzCore.h> >- >-namespace WebCore { >- >-Ref<ScrollingTreeFrameScrollingNodeIOS> ScrollingTreeFrameScrollingNodeIOS::create(ScrollingTree& scrollingTree, ScrollingNodeType nodeType, ScrollingNodeID nodeID) >-{ >- return adoptRef(*new ScrollingTreeFrameScrollingNodeIOS(scrollingTree, nodeType, nodeID)); >-} >- >-ScrollingTreeFrameScrollingNodeIOS::ScrollingTreeFrameScrollingNodeIOS(ScrollingTree& scrollingTree, ScrollingNodeType nodeType, ScrollingNodeID nodeID) >- : ScrollingTreeFrameScrollingNode(scrollingTree, nodeType, nodeID) >-{ >-} >- >-ScrollingTreeFrameScrollingNodeIOS::~ScrollingTreeFrameScrollingNodeIOS() >-{ >-} >- >-void ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren(const ScrollingStateNode& stateNode) >-{ >- ScrollingTreeFrameScrollingNode::commitStateBeforeChildren(stateNode); >- >- const auto& scrollingStateNode = downcast<ScrollingStateFrameScrollingNode>(stateNode); >- >- if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer)) >- m_counterScrollingLayer = scrollingStateNode.counterScrollingLayer(); >- >- if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::HeaderLayer)) >- m_headerLayer = scrollingStateNode.headerLayer(); >- >- if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::FooterLayer)) >- m_footerLayer = scrollingStateNode.footerLayer(); >- >- if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::ReasonsForSynchronousScrolling)) { >- if (shouldUpdateScrollLayerPositionSynchronously()) { >- // We're transitioning to the slow "update scroll layer position on the main thread" mode. >- // Initialize the probable main thread scroll position with the current scroll layer position. >- if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) >- m_probableMainThreadScrollPosition = scrollingStateNode.requestedScrollPosition(); >- else { >- CGPoint scrollLayerPosition = scrolledContentsLayer().position; >- m_probableMainThreadScrollPosition = IntPoint(-scrollLayerPosition.x, -scrollLayerPosition.y); >- } >- } >- } >-} >- >-void ScrollingTreeFrameScrollingNodeIOS::commitStateAfterChildren(const ScrollingStateNode& stateNode) >-{ >- ScrollingTreeFrameScrollingNode::commitStateAfterChildren(stateNode); >- >- const auto& scrollingStateNode = downcast<ScrollingStateFrameScrollingNode>(stateNode); >- >- // Update the scroll position after child nodes have been updated, because they need to have updated their constraints before any scrolling happens. >- if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) >- setScrollPosition(scrollingStateNode.requestedScrollPosition()); >-} >- >-ScrollingEventResult ScrollingTreeFrameScrollingNodeIOS::handleWheelEvent(const PlatformWheelEvent&) >-{ >- return ScrollingEventResult::DidNotHandleEvent; >-} >- >-FloatPoint ScrollingTreeFrameScrollingNodeIOS::scrollPosition() const >-{ >- if (shouldUpdateScrollLayerPositionSynchronously()) >- return m_probableMainThreadScrollPosition; >- >- return -scrolledContentsLayer().position; >-} >- >-void ScrollingTreeFrameScrollingNodeIOS::setScrollPosition(const FloatPoint& position, ScrollPositionClamp clamp) >-{ >- auto scrollPosition = position; >- if (clamp == ScrollPositionClamp::ToContentEdges) >- scrollPosition = clampScrollPosition(scrollPosition); >- >- if (shouldUpdateScrollLayerPositionSynchronously()) { >- m_probableMainThreadScrollPosition = scrollPosition; >- scrollingTree().scrollingTreeNodeDidScroll(scrollingNodeID(), scrollPosition, WTF::nullopt, ScrollingLayerPositionAction::Set); >- return; >- } >- >- FloatRect layoutViewport; // FIXME: implement for iOS WK1. >- setScrollLayerPosition(scrollPosition, layoutViewport); >- scrollingTree().scrollingTreeNodeDidScroll(scrollingNodeID(), scrollPosition, WTF::nullopt); >-} >- >-void ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition(const FloatPoint& scrollPosition, const FloatRect&) >-{ >- ASSERT(!shouldUpdateScrollLayerPositionSynchronously()); >- [scrolledContentsLayer() setPosition:-scrollPosition]; >- >- updateChildNodesAfterScroll(scrollPosition); >-} >- >-void ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterViewportChange(const FloatRect& fixedPositionRect, double /*scale*/) >-{ >- // Note: we never currently have a m_counterScrollingLayer (which is used for background-attachment:fixed) on iOS. >- [m_counterScrollingLayer setPosition:fixedPositionRect.location()]; >- >- if (!m_children) >- return; >- >- for (auto& child : *m_children) >- child->updateLayersAfterAncestorChange(*this, fixedPositionRect, FloatSize()); >-} >- >-void ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect&, const FloatSize&) >-{ >- if (!m_children) >- return; >- >- FloatRect fixedPositionRect(scrollPosition(), scrollableAreaSize()); >- for (auto& child : *m_children) >- child->updateLayersAfterAncestorChange(changedNode, fixedPositionRect, FloatSize()); >-} >- >-void ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterDelegatedScroll(const FloatPoint& scrollPosition) >-{ >- updateChildNodesAfterScroll(scrollPosition); >-} >- >-void ScrollingTreeFrameScrollingNodeIOS::updateChildNodesAfterScroll(const FloatPoint& scrollPosition) >-{ >- ScrollBehaviorForFixedElements behaviorForFixed = scrollBehaviorForFixedElements(); >- FloatRect viewportRect(scrollPosition, scrollableAreaSize()); >- FloatPoint scrollPositionForFixedChildren = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollPosition), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()); >- >- [m_counterScrollingLayer setPosition:scrollPositionForFixedChildren]; >- >- if (m_headerLayer || m_footerLayer) { >- // Generally the banners should have the same horizontal-position computation as a fixed element. However, >- // the banners are not affected by the frameScaleFactor(), so if there is currently a non-1 frameScaleFactor() >- // then we should recompute scrollPositionForFixedChildren for the banner with a scale factor of 1. >- float horizontalScrollOffsetForBanner = scrollPositionForFixedChildren.x(); >- if (frameScaleFactor() != 1) >- horizontalScrollOffsetForBanner = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollPosition), scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).x(); >- >- if (m_headerLayer) >- [m_headerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, 0)]; >- >- if (m_footerLayer) >- [m_footerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight())]; >- } >- >- if (!m_children) >- return; >- >- >- FloatRect fixedPositionRect; >- if (!parent()) >- fixedPositionRect = scrollingTree().fixedPositionRect(); >- else >- fixedPositionRect = FloatRect(scrollPosition, scrollableAreaSize()); >- >- for (auto& child : *m_children) >- child->updateLayersAfterAncestorChange(*this, fixedPositionRect, FloatSize()); >-} >- >-FloatPoint ScrollingTreeFrameScrollingNodeIOS::minimumScrollPosition() const >-{ >- FloatPoint position = ScrollableArea::scrollPositionFromOffset(FloatPoint(), toFloatSize(scrollOrigin())); >- >- if (scrollingTree().rootNode() == this && scrollingTree().scrollPinningBehavior() == PinToBottom) >- position.setY(maximumScrollPosition().y()); >- >- return position; >-} >- >-FloatPoint ScrollingTreeFrameScrollingNodeIOS::maximumScrollPosition() const >-{ >- FloatPoint position = ScrollableArea::scrollPositionFromOffset(FloatPoint(totalContentsSizeForRubberBand() - scrollableAreaSize()), toFloatSize(scrollOrigin())); >- position = position.expandedTo(FloatPoint()); >- >- if (scrollingTree().rootNode() == this && scrollingTree().scrollPinningBehavior() == PinToTop) >- position.setY(minimumScrollPosition().y()); >- >- return position; >-} >- >-} // namespace WebCore >- >-#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp b/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp >deleted file mode 100644 >index ac9e861197438d7dc1a3cc70b83b4e74ecdd30c7..0000000000000000000000000000000000000000 >--- a/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp >+++ /dev/null >@@ -1,127 +0,0 @@ >-/* >- * Copyright (C) 2014 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 "ScrollingTreeIOS.h" >- >-#if ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >- >-#include "AsyncScrollingCoordinator.h" >-#include "PlatformWheelEvent.h" >-#include "ScrollingThread.h" >-#include "ScrollingTreeFixedNode.h" >-#include "ScrollingTreeFrameHostingNode.h" >-#include "ScrollingTreeFrameScrollingNodeIOS.h" >-#include "ScrollingTreeNode.h" >-#include "ScrollingTreeScrollingNode.h" >-#include "ScrollingTreeStickyNode.h" >-#include <wtf/MainThread.h> >- >-namespace WebCore { >- >-Ref<ScrollingTreeIOS> ScrollingTreeIOS::create(AsyncScrollingCoordinator& scrollingCoordinator) >-{ >- return adoptRef(*new ScrollingTreeIOS(scrollingCoordinator)); >-} >- >-ScrollingTreeIOS::ScrollingTreeIOS(AsyncScrollingCoordinator& scrollingCoordinator) >- : m_scrollingCoordinator(&scrollingCoordinator) >-{ >-} >- >-ScrollingTreeIOS::~ScrollingTreeIOS() >-{ >- // invalidate() should have cleared m_scrollingCoordinator. >- ASSERT(!m_scrollingCoordinator); >-} >- >-void ScrollingTreeIOS::invalidate() >-{ >- // Invalidate is dispatched by the ScrollingCoordinator class on the ScrollingThread >- // to break the reference cycle between ScrollingTree and ScrollingCoordinator when the >- // ScrollingCoordinator's page is destroyed. >- ASSERT(ScrollingThread::isCurrentThread()); >- >- // Since this can potentially be the last reference to the scrolling coordinator, >- // we need to release it on the main thread since it has member variables (such as timers) >- // that expect to be destroyed from the main thread. >- callOnMainThread([scrollingCoordinator = WTFMove(m_scrollingCoordinator)] { >- }); >-} >- >-void ScrollingTreeIOS::scrollingTreeNodeDidScroll(ScrollingNodeID nodeID, const FloatPoint& scrollPosition, const Optional<FloatPoint>& layoutViewportOrigin, ScrollingLayerPositionAction scrollingLayerPositionAction) >-{ >- if (!m_scrollingCoordinator) >- return; >- >- if (nodeID == rootNode()->scrollingNodeID()) >- setMainFrameScrollPosition(scrollPosition); >- >- callOnMainThread([scrollingCoordinator = m_scrollingCoordinator, nodeID, scrollPosition, layoutViewportOrigin, localIsHandlingProgrammaticScroll = isHandlingProgrammaticScroll(), scrollingLayerPositionAction] { >- scrollingCoordinator->scheduleUpdateScrollPositionAfterAsyncScroll(nodeID, scrollPosition, layoutViewportOrigin, localIsHandlingProgrammaticScroll, scrollingLayerPositionAction); >- }); >-} >- >-Ref<ScrollingTreeNode> ScrollingTreeIOS::createScrollingTreeNode(ScrollingNodeType nodeType, ScrollingNodeID nodeID) >-{ >- switch (nodeType) { >- case ScrollingNodeType::MainFrame: >- case ScrollingNodeType::Subframe: >- return ScrollingTreeFrameScrollingNodeIOS::create(*this, nodeType, nodeID); >- case ScrollingNodeType::FrameHosting: >- return ScrollingTreeFrameHostingNode::create(*this, nodeID); >- case ScrollingNodeType::Overflow: >- ASSERT_NOT_REACHED(); >- break; >- case ScrollingNodeType::Fixed: >- return ScrollingTreeFixedNode::create(*this, nodeID); >- case ScrollingNodeType::Sticky: >- return ScrollingTreeStickyNode::create(*this, nodeID); >- } >- ASSERT_NOT_REACHED(); >- return ScrollingTreeFixedNode::create(*this, nodeID); >-} >- >-FloatRect ScrollingTreeIOS::fixedPositionRect() >-{ >- // When ScrollingTreeIOS starts being used for WK1 on iOS, this needs to get the customFixedPositionRect from >- // the ScrollingCoordinator. >- ASSERT_NOT_REACHED(); >- return FloatRect(); >-} >- >-void ScrollingTreeIOS::currentSnapPointIndicesDidChange(WebCore::ScrollingNodeID nodeID, unsigned horizontal, unsigned vertical) >-{ >- if (!m_scrollingCoordinator) >- return; >- >- callOnMainThread([scrollingCoordinator = m_scrollingCoordinator, nodeID, horizontal, vertical] { >- scrollingCoordinator->setActiveScrollSnapIndices(nodeID, horizontal, vertical); >- }); >-} >- >-} // namespace WebCore >- >-#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h b/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h >deleted file mode 100644 >index e9035d0a22c904e8008d73c920e130d7696e9b8e..0000000000000000000000000000000000000000 >--- a/Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h >+++ /dev/null >@@ -1,65 +0,0 @@ >-/* >- * Copyright (C) 2014 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) && PLATFORM(IOS_FAMILY) >- >-#include "ScrollingStateTree.h" >-#include "ScrollingTree.h" >- >-namespace WebCore { >- >-class AsyncScrollingCoordinator; >- >-class ScrollingTreeIOS final : public ScrollingTree { >-public: >- static Ref<ScrollingTreeIOS> create(AsyncScrollingCoordinator&); >- virtual ~ScrollingTreeIOS(); >- >-private: >- explicit ScrollingTreeIOS(AsyncScrollingCoordinator&); >- >- bool isScrollingTreeIOS() const final { return true; } >- >- // No wheel events on iOS >- ScrollingEventResult handleWheelEvent(const PlatformWheelEvent&) final { return ScrollingEventResult::DidNotHandleEvent; } >- ScrollingEventResult tryToHandleWheelEvent(const PlatformWheelEvent&) final { return ScrollingEventResult::DidNotHandleEvent; } >- >- void invalidate() final; >- >- Ref<ScrollingTreeNode> createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) final; >- void scrollingTreeNodeDidScroll(ScrollingNodeID, const FloatPoint& scrollPosition, const Optional<FloatPoint>& layoutViewportOrigin, ScrollingLayerPositionAction = ScrollingLayerPositionAction::Sync) final; >- void currentSnapPointIndicesDidChange(WebCore::ScrollingNodeID, unsigned horizontal, unsigned vertical) final; >- FloatRect fixedPositionRect() final; >- >- RefPtr<AsyncScrollingCoordinator> m_scrollingCoordinator; >-}; >- >-} // namespace WebCore >- >-SPECIALIZE_TYPE_TRAITS_SCROLLING_TREE(WebCore::ScrollingTreeIOS, isScrollingTreeIOS()) >- >-#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) >diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >index 211ac8d88b76300d1be83e061b8ac042b5ef7ac4..3b66c6a607d47da7bef4c97107c168ee74212278 100644 >--- a/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >+++ b/Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >@@ -237,8 +237,7 @@ void ScrollingTreeFrameScrollingNodeMac::setScrollPosition(const FloatPoint& pos > // FIXME: wrong if we're not the main frame. > updateMainFramePinState(scrollPosition); > >- FloatPoint visibleContentOrigin = scrollPosition; >- FloatRect newLayoutViewport = layoutViewportForScrollPosition(visibleContentOrigin, frameScaleFactor()); >+ FloatRect newLayoutViewport = layoutViewportForScrollPosition(scrollPosition, frameScaleFactor()); > setLayoutViewport(newLayoutViewport); > auto layoutViewportOrigin = newLayoutViewport.location(); > >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp >index f30e25ca112918babab686a051112be7758c7161..8d50ec9a723ba574256fe63ed4172a2eb1acd99a 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp >@@ -37,7 +37,6 @@ > #if PLATFORM(IOS_FAMILY) > #include "ScrollingTreeFrameScrollingNodeRemoteIOS.h" > #include "ScrollingTreeOverflowScrollingNodeIOS.h" >-#include <WebCore/ScrollingTreeFrameScrollingNodeIOS.h> > #else > #include "ScrollingTreeFrameScrollingNodeRemoteMac.h" > #endif >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h >index e4feb81cac047a33bebad262330d444c552f7913..ddd86c439bbaa45e68f1d90b7fc2656fd695904f 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.h >@@ -27,13 +27,13 @@ > > #if ENABLE(ASYNC_SCROLLING) && PLATFORM(IOS_FAMILY) > >-#include <WebCore/ScrollingTreeFrameScrollingNodeIOS.h> >+#include <WebCore/ScrollingTreeFrameScrollingNode.h> > > namespace WebKit { > > class ScrollingTreeScrollingNodeDelegateIOS; > >-class ScrollingTreeFrameScrollingNodeRemoteIOS : public WebCore::ScrollingTreeFrameScrollingNodeIOS { >+class ScrollingTreeFrameScrollingNodeRemoteIOS : public WebCore::ScrollingTreeFrameScrollingNode { > public: > static Ref<ScrollingTreeFrameScrollingNodeRemoteIOS> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeType, WebCore::ScrollingNodeID); > virtual ~ScrollingTreeFrameScrollingNodeRemoteIOS(); >@@ -44,13 +44,24 @@ private: > void commitStateBeforeChildren(const WebCore::ScrollingStateNode&) override; > void commitStateAfterChildren(const WebCore::ScrollingStateNode&) override; > >+ FloatPoint minimumScrollPosition() const override; >+ FloatPoint maximumScrollPosition() const override; >+ > WebCore::FloatPoint scrollPosition() const override; >+ void setScrollPosition(const WebCore::FloatPoint&, WebCore::ScrollPositionClamp = WebCore::ScrollPositionClamp::ToContentEdges) override; > void setScrollLayerPosition(const WebCore::FloatPoint&, const WebCore::FloatRect& layoutViewport) override; > >+ void updateChildNodesAfterScroll(const FloatPoint&); >+ > void updateLayersAfterDelegatedScroll(const WebCore::FloatPoint& scrollPosition) override; >+ void updateLayersAfterViewportChange(const WebCore::FloatRect& fixedPositionRect, double scale) override; > void updateLayersAfterAncestorChange(const WebCore::ScrollingTreeNode& changedNode, const WebCore::FloatRect& fixedPositionRect, const WebCore::FloatSize& cumulativeDelta) override; > > std::unique_ptr<ScrollingTreeScrollingNodeDelegateIOS> m_scrollingNodeDelegate; >+ >+ RetainPtr<CALayer> m_counterScrollingLayer; >+ RetainPtr<CALayer> m_headerLayer; >+ RetainPtr<CALayer> m_footerLayer; > }; > > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm >index 78ab20e1e847c26f52287184924bd06c5458c6be..5fb10a2b88e9d26fe711b44ee4045116955cac8a 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm >@@ -40,7 +40,7 @@ Ref<ScrollingTreeFrameScrollingNodeRemoteIOS> ScrollingTreeFrameScrollingNodeRem > } > > ScrollingTreeFrameScrollingNodeRemoteIOS::ScrollingTreeFrameScrollingNodeRemoteIOS(ScrollingTree& scrollingTree, ScrollingNodeType nodeType, ScrollingNodeID nodeID) >- : ScrollingTreeFrameScrollingNodeIOS(scrollingTree, nodeType, nodeID) >+ : ScrollingTreeFrameScrollingNode(scrollingTree, nodeType, nodeID) > { > } > >@@ -50,7 +50,18 @@ ScrollingTreeFrameScrollingNodeRemoteIOS::~ScrollingTreeFrameScrollingNodeRemote > > void ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren(const ScrollingStateNode& stateNode) > { >- ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren(stateNode); >+ ScrollingTreeFrameScrollingNode::commitStateBeforeChildren(stateNode); >+ >+ const auto& scrollingStateNode = downcast<ScrollingStateFrameScrollingNode>(stateNode); >+ >+ if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer)) >+ m_counterScrollingLayer = scrollingStateNode.counterScrollingLayer(); >+ >+ if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::HeaderLayer)) >+ m_headerLayer = scrollingStateNode.headerLayer(); >+ >+ if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::FooterLayer)) >+ m_footerLayer = scrollingStateNode.footerLayer(); > > if (stateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollContainerLayer)) { > if (scrollContainerLayer()) >@@ -65,19 +76,37 @@ void ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren(const S > > void ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateAfterChildren(const ScrollingStateNode& stateNode) > { >- ScrollingTreeFrameScrollingNodeIOS::commitStateAfterChildren(stateNode); >+ ScrollingTreeFrameScrollingNode::commitStateAfterChildren(stateNode); >+ >+ const auto& scrollingStateNode = downcast<ScrollingStateFrameScrollingNode>(stateNode); >+ >+ // Update the scroll position after child nodes have been updated, because they need to have updated their constraints before any scrolling happens. >+ if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) >+ setScrollPosition(scrollingStateNode.requestedScrollPosition()); > > if (m_scrollingNodeDelegate) > m_scrollingNodeDelegate->commitStateAfterChildren(downcast<ScrollingStateScrollingNode>(stateNode)); > } > >-void ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) >+FloatPoint ScrollingTreeFrameScrollingNodeRemoteIOS::minimumScrollPosition() const > { >- if (m_scrollingNodeDelegate) { >- m_scrollingNodeDelegate->updateLayersAfterAncestorChange(changedNode, fixedPositionRect, cumulativeDelta); >- return; >- } >- ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterAncestorChange(changedNode, fixedPositionRect, cumulativeDelta); >+ FloatPoint position = ScrollableArea::scrollPositionFromOffset(FloatPoint(), toFloatSize(scrollOrigin())); >+ >+ if (isRootNode() && scrollingTree().scrollPinningBehavior() == PinToBottom) >+ position.setY(maximumScrollPosition().y()); >+ >+ return position; >+} >+ >+FloatPoint ScrollingTreeFrameScrollingNodeRemoteIOS::maximumScrollPosition() const >+{ >+ FloatPoint position = ScrollableArea::scrollPositionFromOffset(FloatPoint(totalContentsSizeForRubberBand() - scrollableAreaSize()), toFloatSize(scrollOrigin())); >+ position = position.expandedTo(FloatPoint()); >+ >+ if (isRootNode() && scrollingTree().scrollPinningBehavior() == PinToTop) >+ position.setY(minimumScrollPosition().y()); >+ >+ return position; > } > > FloatPoint ScrollingTreeFrameScrollingNodeRemoteIOS::scrollPosition() const >@@ -85,7 +114,21 @@ FloatPoint ScrollingTreeFrameScrollingNodeRemoteIOS::scrollPosition() const > if (m_scrollingNodeDelegate) > return m_scrollingNodeDelegate->scrollPosition(); > >- return ScrollingTreeFrameScrollingNodeIOS::scrollPosition(); >+ return -scrolledContentsLayer().position; >+} >+ >+void ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollPosition(const FloatPoint& position, ScrollPositionClamp clamp) >+{ >+ auto scrollPosition = position; >+ if (clamp == ScrollPositionClamp::ToContentEdges) >+ scrollPosition = clampScrollPosition(scrollPosition); >+ >+ FloatRect newLayoutViewport = layoutViewportForScrollPosition(scrollPosition, frameScaleFactor()); >+ setLayoutViewport(newLayoutViewport); >+ auto layoutViewportOrigin = newLayoutViewport.location(); >+ >+ setScrollLayerPosition(scrollPosition, layoutViewport()); >+ scrollingTree().scrollingTreeNodeDidScroll(scrollingNodeID(), scrollPosition, layoutViewportOrigin); > } > > void ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollLayerPosition(const FloatPoint& scrollPosition, const FloatRect& layoutViewport) >@@ -94,7 +137,46 @@ void ScrollingTreeFrameScrollingNodeRemoteIOS::setScrollLayerPosition(const Floa > m_scrollingNodeDelegate->setScrollLayerPosition(scrollPosition); > return; > } >- ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition(scrollPosition, layoutViewport); >+ >+ [scrolledContentsLayer() setPosition:-scrollPosition]; >+ updateChildNodesAfterScroll(scrollPosition); >+} >+ >+void ScrollingTreeFrameScrollingNodeRemoteIOS::updateChildNodesAfterScroll(const FloatPoint& scrollPosition) >+{ >+ ScrollBehaviorForFixedElements behaviorForFixed = scrollBehaviorForFixedElements(); >+ FloatRect viewportRect(scrollPosition, scrollableAreaSize()); >+ FloatPoint scrollPositionForFixedChildren = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollPosition), scrollOrigin(), frameScaleFactor(), fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()); >+ >+ [m_counterScrollingLayer setPosition:scrollPositionForFixedChildren]; >+ >+ if (m_headerLayer || m_footerLayer) { >+ // Generally the banners should have the same horizontal-position computation as a fixed element. However, >+ // the banners are not affected by the frameScaleFactor(), so if there is currently a non-1 frameScaleFactor() >+ // then we should recompute scrollPositionForFixedChildren for the banner with a scale factor of 1. >+ float horizontalScrollOffsetForBanner = scrollPositionForFixedChildren.x(); >+ if (frameScaleFactor() != 1) >+ horizontalScrollOffsetForBanner = FrameView::scrollPositionForFixedPosition(enclosingLayoutRect(viewportRect), LayoutSize(totalContentsSize()), LayoutPoint(scrollPosition), scrollOrigin(), 1, fixedElementsLayoutRelativeToFrame(), behaviorForFixed, headerHeight(), footerHeight()).x(); >+ >+ if (m_headerLayer) >+ [m_headerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, 0)]; >+ >+ if (m_footerLayer) >+ [m_footerLayer setPosition:FloatPoint(horizontalScrollOffsetForBanner, totalContentsSize().height() - footerHeight())]; >+ } >+ >+ if (!m_children) >+ return; >+ >+ >+ FloatRect fixedPositionRect; >+ if (!parent()) >+ fixedPositionRect = scrollingTree().fixedPositionRect(); >+ else >+ fixedPositionRect = FloatRect(scrollPosition, scrollableAreaSize()); >+ >+ for (auto& child : *m_children) >+ child->updateLayersAfterAncestorChange(*this, fixedPositionRect, FloatSize()); > } > > void ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterDelegatedScroll(const FloatPoint& scrollPosition) >@@ -103,9 +185,36 @@ void ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterDelegatedScroll( > m_scrollingNodeDelegate->updateChildNodesAfterScroll(scrollPosition); > return; > } >- ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterDelegatedScroll(scrollPosition); >+ >+ updateChildNodesAfterScroll(scrollPosition); > } > >+void ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterViewportChange(const FloatRect& fixedPositionRect, double /*scale*/) >+{ >+ // Note: we never currently have a m_counterScrollingLayer (which is used for background-attachment:fixed) on iOS. >+ [m_counterScrollingLayer setPosition:fixedPositionRect.location()]; >+ >+ if (!m_children) >+ return; >+ >+ for (auto& child : *m_children) >+ child->updateLayersAfterAncestorChange(*this, fixedPositionRect, FloatSize()); > } > >+void ScrollingTreeFrameScrollingNodeRemoteIOS::updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) >+{ >+ if (m_scrollingNodeDelegate) { >+ m_scrollingNodeDelegate->updateLayersAfterAncestorChange(changedNode, fixedPositionRect, cumulativeDelta); >+ return; >+ } >+ >+ if (!m_children) >+ return; >+ >+ FloatRect currFrameFixedPositionRect(scrollPosition(), scrollableAreaSize()); // FIXME: use up-to-date layout viewport. >+ for (auto& child : *m_children) >+ child->updateLayersAfterAncestorChange(changedNode, currFrameFixedPositionRect, { }); >+} >+ >+} > #endif >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h >index b3aeaa9ed52ba0a28e5785187b5a88a59f87a2b5..04dafa39e6df1635fb52f9376d7e47977cce5ebf 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h >@@ -53,8 +53,6 @@ private: > > void updateLayersAfterAncestorChange(const WebCore::ScrollingTreeNode& changedNode, const WebCore::FloatRect& fixedPositionRect, const WebCore::FloatSize& cumulativeDelta) override; > >- WebCore::ScrollingEventResult handleWheelEvent(const WebCore::PlatformWheelEvent&) override { return WebCore::ScrollingEventResult::DidNotHandleEvent; } >- > std::unique_ptr<ScrollingTreeScrollingNodeDelegateIOS> m_scrollingNodeDelegate; > }; >
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
Flags:
sam
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194980
: 362834 |
362838