Title: [240105] trunk/Source/WebCore
Revision
240105
Author
simon.fra...@apple.com
Date
2019-01-16 23:46:10 -0800 (Wed, 16 Jan 2019)

Log Message

Stub out scrolling tree classes for overflow scrolling nodes on macOS
https://bugs.webkit.org/show_bug.cgi?id=193524

Reviewed by Antti Koivisto.

Add an empty implementation of ScrollingTreeOverflowScrollingNodeMac for macOS. Change
ScrollingTreeMac::createScrollingTreeNode() to create these nodes.

Minor refactor of RenderLayerCompositor::useCoordinatedScrollingForLayer() code to ask
the scrolling coordinator if it can coordinate scrolling for this layer; no behavior
change for existing code paths.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::coordinatesScrollingForOverflowLayer const):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
* page/scrolling/mac/ScrollingTreeMac.cpp:
(ScrollingTreeMac::createScrollingTreeNode):
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm.
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: Added.
(WebCore::ScrollingTreeOverflowScrollingNodeMac::create):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::ScrollingTreeOverflowScrollingNodeMac):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::~ScrollingTreeOverflowScrollingNodeMac):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterAncestorChange):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterDelegatedScroll):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::usesAsyncScrolling const):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):
* rendering/RenderLayerCompositor.h:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (240104 => 240105)


--- trunk/Source/WebCore/ChangeLog	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/ChangeLog	2019-01-17 07:46:10 UTC (rev 240105)
@@ -1,3 +1,42 @@
+2019-01-16  Simon Fraser  <simon.fra...@apple.com>
+
+        Stub out scrolling tree classes for overflow scrolling nodes on macOS
+        https://bugs.webkit.org/show_bug.cgi?id=193524
+
+        Reviewed by Antti Koivisto.
+
+        Add an empty implementation of ScrollingTreeOverflowScrollingNodeMac for macOS. Change
+        ScrollingTreeMac::createScrollingTreeNode() to create these nodes.
+        
+        Minor refactor of RenderLayerCompositor::useCoordinatedScrollingForLayer() code to ask
+        the scrolling coordinator if it can coordinate scrolling for this layer; no behavior
+        change for existing code paths.
+
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::coordinatesScrollingForOverflowLayer const):
+        * page/scrolling/ScrollingCoordinator.h:
+        * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
+        * page/scrolling/mac/ScrollingTreeMac.cpp:
+        (ScrollingTreeMac::createScrollingTreeNode):
+        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm.
+        * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: Added.
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::create):
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::ScrollingTreeOverflowScrollingNodeMac):
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::~ScrollingTreeOverflowScrollingNodeMac):
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterAncestorChange):
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
+        (WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterDelegatedScroll):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::usesAsyncScrolling const):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):
+        * rendering/RenderLayerCompositor.h:
+
 2019-01-16  Justin Fan  <justin_...@apple.com>
 
         [WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer

Modified: trunk/Source/WebCore/SourcesCocoa.txt (240104 => 240105)


--- trunk/Source/WebCore/SourcesCocoa.txt	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/SourcesCocoa.txt	2019-01-17 07:46:10 UTC (rev 240105)
@@ -157,6 +157,7 @@
 page/scrolling/mac/ScrollingThreadMac.mm
 page/scrolling/mac/ScrollingTreeFixedNode.mm
 page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
+page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm
 page/scrolling/mac/ScrollingTreeMac.cpp
 page/scrolling/mac/ScrollingTreeStickyNode.mm
 

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (240104 => 240105)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-01-17 07:46:10 UTC (rev 240105)
@@ -5783,6 +5783,8 @@
 		0FB88909167D2FA10010CDA5 /* ScrollingTreeStickyNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollingTreeStickyNode.mm; sourceTree = "<group>"; };
 		0FB8890C167D30160010CDA5 /* ScrollingStateStickyNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingStateStickyNode.cpp; sourceTree = "<group>"; };
 		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>"; };
@@ -16928,6 +16930,8 @@
 				93C4A4141629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.mm */,
 				0FE5806119327A6200DE32EB /* ScrollingTreeMac.cpp */,
 				0FE5806219327A6200DE32EB /* ScrollingTreeMac.h */,
+				0FC0516A219B5EBE0031C39E /* ScrollingTreeOverflowScrollingNodeMac.h */,
+				0FC05168219B5EBE0031C39E /* ScrollingTreeOverflowScrollingNodeMac.mm */,
 				0FB88908167D2FA10010CDA5 /* ScrollingTreeStickyNode.h */,
 				0FB88909167D2FA10010CDA5 /* ScrollingTreeStickyNode.mm */,
 			);

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (240104 => 240105)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2019-01-17 07:46:10 UTC (rev 240105)
@@ -87,6 +87,14 @@
     return renderView->usesCompositing();
 }
 
+bool ScrollingCoordinator::coordinatesScrollingForOverflowLayer(const RenderLayer& layer) const
+{
+    ASSERT(isMainThread());
+    ASSERT(m_page);
+
+    return layer.hasCompositedScrollableOverflow();
+}
+
 EventTrackingRegions ScrollingCoordinator::absoluteEventTrackingRegionsForFrame(const Frame& frame) const
 {
     auto* renderView = frame.contentRenderer();

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (240104 => 240105)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h	2019-01-17 07:46:10 UTC (rev 240105)
@@ -77,6 +77,7 @@
 class GraphicsLayer;
 class Page;
 class Region;
+class RenderLayer;
 class ScrollableArea;
 class ViewportConstraints;
 
@@ -131,8 +132,11 @@
     virtual bool isRemoteScrollingCoordinator() const { return false; }
 
     // Return whether this scrolling coordinator handles scrolling for the given frame view.
-    virtual bool coordinatesScrollingForFrameView(const FrameView&) const;
+    WEBCORE_EXPORT virtual bool coordinatesScrollingForFrameView(const FrameView&) const;
 
+    // Return whether this scrolling coordinator handles scrolling for the given overflow scroll layer.
+    WEBCORE_EXPORT virtual bool coordinatesScrollingForOverflowLayer(const RenderLayer&) const;
+
     // Should be called whenever the given frame view has been laid out.
     virtual void frameViewLayoutUpdated(FrameView&) { }
 

Modified: trunk/Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm (240104 => 240105)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm	2019-01-17 07:46:10 UTC (rev 240105)
@@ -26,15 +26,15 @@
 #include "config.h"
 #include "ScrollingStateFrameScrollingNode.h"
 
+#if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC)
+
 #include "GraphicsLayer.h"
 #include "Scrollbar.h"
 #include "ScrollbarThemeMac.h"
 #include "ScrollingStateTree.h"
 
-#if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC)
+namespace WebCore {
 
-namespace WebCore {
-    
 void ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars(Scrollbar* verticalScrollbar, Scrollbar* horizontalScrollbar)
 {
     ScrollbarTheme& scrollbarTheme = ScrollbarTheme::theme();

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


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp	2019-01-17 07:46:10 UTC (rev 240105)
@@ -28,6 +28,7 @@
 
 #include "ScrollingTreeFixedNode.h"
 #include "ScrollingTreeFrameScrollingNodeMac.h"
+#include "ScrollingTreeOverflowScrollingNodeMac.h"
 #include "ScrollingTreeStickyNode.h"
 
 #if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC)
@@ -51,7 +52,7 @@
     case ScrollingNodeType::Subframe:
         return ScrollingTreeFrameScrollingNodeMac::create(*this, nodeType, nodeID);
     case ScrollingNodeType::Overflow:
-        ASSERT_NOT_REACHED();
+        return ScrollingTreeOverflowScrollingNodeMac::create(*this, nodeID);
         break;
     case ScrollingNodeType::Fixed:
         return ScrollingTreeFixedNode::create(*this, nodeID);

Copied: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h (from rev 240104, trunk/Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm) (0 => 240105)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h	                        (rev 0)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h	2019-01-17 07:46:10 UTC (rev 240105)
@@ -0,0 +1,59 @@
+/*
+ * 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) && PLATFORM(MAC)
+
+#include "ScrollingTreeOverflowScrollingNode.h"
+
+namespace WebCore {
+
+class ScrollingTreeOverflowScrollingNodeMac : public WebCore::ScrollingTreeOverflowScrollingNode {
+public:
+    static Ref<ScrollingTreeOverflowScrollingNodeMac> create(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
+    virtual ~ScrollingTreeOverflowScrollingNodeMac();
+
+private:
+    ScrollingTreeOverflowScrollingNodeMac(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
+
+    void commitStateBeforeChildren(const WebCore::ScrollingStateNode&) override;
+    void commitStateAfterChildren(const WebCore::ScrollingStateNode&) override;
+    
+    WebCore::FloatPoint scrollPosition() const override;
+
+    void setScrollLayerPosition(const WebCore::FloatPoint&, const WebCore::FloatRect& layoutViewport) override;
+
+    void updateLayersAfterViewportChange(const WebCore::FloatRect&, double) override { }
+    void updateLayersAfterDelegatedScroll(const WebCore::FloatPoint& scrollPosition) override;
+
+    void updateLayersAfterAncestorChange(const WebCore::ScrollingTreeNode& changedNode, const WebCore::FloatRect& fixedPositionRect, const WebCore::FloatSize& cumulativeDelta) override;
+
+    void handleWheelEvent(const WebCore::PlatformWheelEvent&) override { }
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC)

Added: trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm (0 => 240105)


--- trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm	                        (rev 0)
+++ trunk/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm	2019-01-17 07:46:10 UTC (rev 240105)
@@ -0,0 +1,81 @@
+/*
+ * 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 "ScrollingTreeOverflowScrollingNodeMac.h"
+
+#if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC)
+
+namespace WebCore {
+
+Ref<ScrollingTreeOverflowScrollingNodeMac> ScrollingTreeOverflowScrollingNodeMac::create(WebCore::ScrollingTree& scrollingTree, WebCore::ScrollingNodeID nodeID)
+{
+    return adoptRef(*new ScrollingTreeOverflowScrollingNodeMac(scrollingTree, nodeID));
+}
+
+ScrollingTreeOverflowScrollingNodeMac::ScrollingTreeOverflowScrollingNodeMac(WebCore::ScrollingTree& scrollingTree, WebCore::ScrollingNodeID nodeID)
+    : ScrollingTreeOverflowScrollingNode(scrollingTree, nodeID)
+{
+}
+
+ScrollingTreeOverflowScrollingNodeMac::~ScrollingTreeOverflowScrollingNodeMac()
+{
+}
+
+void ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren(const WebCore::ScrollingStateNode& stateNode)
+{
+    ScrollingTreeOverflowScrollingNode::commitStateBeforeChildren(stateNode);
+}
+
+void ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren(const ScrollingStateNode& stateNode)
+{
+    ScrollingTreeOverflowScrollingNode::commitStateAfterChildren(stateNode);
+}
+
+void ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta)
+{
+    UNUSED_PARAM(changedNode);
+    UNUSED_PARAM(fixedPositionRect);
+    UNUSED_PARAM(cumulativeDelta);
+}
+
+FloatPoint ScrollingTreeOverflowScrollingNodeMac::scrollPosition() const
+{
+    return { };
+}
+
+void ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition(const FloatPoint& scrollPosition, const FloatRect&)
+{
+    UNUSED_PARAM(scrollPosition);
+}
+
+void ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterDelegatedScroll(const FloatPoint& scrollPosition)
+{
+    UNUSED_PARAM(scrollPosition);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC)

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (240104 => 240105)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-01-17 07:46:10 UTC (rev 240105)
@@ -2223,7 +2223,7 @@
 // FIXME: this is only valid after we've made layers.
 bool RenderLayer::usesAsyncScrolling() const
 {
-    return usesCompositedScrolling();
+    return compositor().useCoordinatedScrollingForLayer(*this);
 }
 
 static inline int adjustedScrollDelta(int beginningDelta)

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (240104 => 240105)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-01-17 07:46:10 UTC (rev 240105)
@@ -2837,10 +2837,10 @@
     if (layer.isRenderViewLayer() && hasCoordinatedScrolling())
         return true;
 
-#if PLATFORM(IOS_FAMILY)
-    return layer.hasCompositedScrollableOverflow();
-#endif
-    return false; // FIXME: Fix for composited scrolling on other platforms.
+    if (auto* scrollingCoordinator = this->scrollingCoordinator())
+        return scrollingCoordinator->coordinatesScrollingForOverflowLayer(layer);
+    
+    return false;
 }
 
 bool RenderLayerCompositor::isRunningTransformAnimation(RenderLayerModelObject& renderer) const

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (240104 => 240105)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2019-01-17 05:56:18 UTC (rev 240104)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2019-01-17 07:46:10 UTC (rev 240105)
@@ -324,6 +324,8 @@
     void updateScrollCoordinatedStatus(RenderLayer&, OptionSet<ScrollingNodeChangeFlags>);
     void removeFromScrollCoordinatedLayers(RenderLayer&);
 
+    bool useCoordinatedScrollingForLayer(const RenderLayer&) const;
+
     void willRemoveScrollingLayerWithBacking(RenderLayer&, RenderLayerBacking&);
     void didAddScrollingLayer(RenderLayer&);
 
@@ -492,7 +494,6 @@
 
     // True if the FrameView uses a ScrollingCoordinator.
     bool hasCoordinatedScrolling() const;
-    bool useCoordinatedScrollingForLayer(const RenderLayer&) const;
 
     // FIXME: make the coordinated/async terminology consistent.
     bool isAsyncScrollableStickyLayer(const RenderLayer&, const RenderLayer** enclosingAcceleratedOverflowLayer = nullptr) const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to