Stub out scrolling tree classes for overflow scrolling nodes on macOS
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 07:46:10 +0000 (07:46 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 07:46:10 +0000 (07:46 +0000)
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240105 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeMac.cpp
Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h [new file with mode: 0644]
Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm [new file with mode: 0644]
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h

index 2dd9d50..e1656df 100644 (file)
@@ -1,3 +1,42 @@
+2019-01-16  Simon Fraser  <simon.fraser@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_fan@apple.com>
 
         [WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
index 2005c9a..90cefd2 100644 (file)
@@ -157,6 +157,7 @@ page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm
 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
 
index c498fa8..4d2bccc 100644 (file)
                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>"; };
                                93C4A4141629DF5A00C3EB6E /* ScrollingTreeFrameScrollingNodeMac.mm */,
                                0FE5806119327A6200DE32EB /* ScrollingTreeMac.cpp */,
                                0FE5806219327A6200DE32EB /* ScrollingTreeMac.h */,
+                               0FC0516A219B5EBE0031C39E /* ScrollingTreeOverflowScrollingNodeMac.h */,
+                               0FC05168219B5EBE0031C39E /* ScrollingTreeOverflowScrollingNodeMac.mm */,
                                0FB88908167D2FA10010CDA5 /* ScrollingTreeStickyNode.h */,
                                0FB88909167D2FA10010CDA5 /* ScrollingTreeStickyNode.mm */,
                        );
index cb87383..908c221 100644 (file)
@@ -87,6 +87,14 @@ bool ScrollingCoordinator::coordinatesScrollingForFrameView(const FrameView& fra
     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();
index 614b670..7cb8845 100644 (file)
@@ -77,6 +77,7 @@ class FrameView;
 class GraphicsLayer;
 class Page;
 class Region;
+class RenderLayer;
 class ScrollableArea;
 class ViewportConstraints;
 
@@ -131,7 +132,10 @@ public:
     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&) { }
index 2fddf23..8830f12 100644 (file)
 #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 {
-    
+
 void ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars(Scrollbar* verticalScrollbar, Scrollbar* horizontalScrollbar)
 {
     ScrollbarTheme& scrollbarTheme = ScrollbarTheme::theme();
index 78e6ee3..6010e3a 100644 (file)
@@ -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 @@ Ref<ScrollingTreeNode> ScrollingTreeMac::createScrollingTreeNode(ScrollingNodeTy
     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);
diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h
new file mode 100644 (file)
index 0000000..f1eedbe
--- /dev/null
@@ -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)
diff --git a/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm b/Source/WebCore/page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm
new file mode 100644 (file)
index 0000000..56dbc51
--- /dev/null
@@ -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)
index 6c2a423..072e937 100644 (file)
@@ -2223,7 +2223,7 @@ bool RenderLayer::usesCompositedScrolling() const
 // 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)
index 29f75fc..d08d691 100644 (file)
@@ -2837,10 +2837,10 @@ bool RenderLayerCompositor::useCoordinatedScrollingForLayer(const RenderLayer& l
     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
index 9c9074d..4a2c3be 100644 (file)
@@ -324,6 +324,8 @@ public:
     void updateScrollCoordinatedStatus(RenderLayer&, OptionSet<ScrollingNodeChangeFlags>);
     void removeFromScrollCoordinatedLayers(RenderLayer&);
 
+    bool useCoordinatedScrollingForLayer(const RenderLayer&) const;
+
     void willRemoveScrollingLayerWithBacking(RenderLayer&, RenderLayerBacking&);
     void didAddScrollingLayer(RenderLayer&);
 
@@ -492,7 +494,6 @@ private:
 
     // 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;