<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[269579] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/269579">269579</a></dd>
<dt>Author</dt> <dd>clord@igalia.com</dd>
<dt>Date</dt> <dd>2020-11-09 02:20:55 -0800 (Mon, 09 Nov 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK][WPE] Scrolling with mouse wheel doesn't work on iframes with async scrolling enabled
https://bugs.webkit.org/show_bug.cgi?id=214179

Reviewed by Žan Doberšek.

Implement ScrollingTree::scrollingNodeForPoint in
ScrollingTreeNicosia. This fixes overflow and iframe scrolling when
async scrolling is enabled on WPE and GTK ports.

* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
* page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
* page/scrolling/nicosia/ScrollingTreeNicosia.cpp:
(WebCore::collectDescendantLayersAtPoint):
(WebCore::ScrollingTreeNicosia::scrollingNodeForPoint):
* page/scrolling/nicosia/ScrollingTreeNicosia.h:
* page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateBeforeChildren):
* page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
* platform/graphics/nicosia/NicosiaPlatformLayer.h:
(Nicosia::CompositionLayer::flushState):
(Nicosia::CompositionLayer::accessPending):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagescrollingThreadedScrollingTreeh">trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingnicosiaScrollingTreeFrameScrollingNodeNicosiacpp">trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingnicosiaScrollingTreeFrameScrollingNodeNicosiah">trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingnicosiaScrollingTreeNicosiacpp">trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingnicosiaScrollingTreeNicosiah">trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingnicosiaScrollingTreeOverflowScrollingNodeNicosiacpp">trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingnicosiaScrollingTreeOverflowScrollingNodeNicosiah">trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsnicosiaNicosiaPlatformLayerh">trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/ChangeLog      2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2020-11-09  Chris Lord  <clord@igalia.com>
</span><span class="cx"> 
</span><ins>+        [GTK][WPE] Scrolling with mouse wheel doesn't work on iframes with async scrolling enabled
+        https://bugs.webkit.org/show_bug.cgi?id=214179
+
+        Reviewed by Žan Doberšek.
+
+        Implement ScrollingTree::scrollingNodeForPoint in
+        ScrollingTreeNicosia. This fixes overflow and iframe scrolling when
+        async scrolling is enabled on WPE and GTK ports.
+
+        * page/scrolling/ThreadedScrollingTree.h:
+        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
+        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
+        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
+        * page/scrolling/nicosia/ScrollingTreeNicosia.cpp:
+        (WebCore::collectDescendantLayersAtPoint):
+        (WebCore::ScrollingTreeNicosia::scrollingNodeForPoint):
+        * page/scrolling/nicosia/ScrollingTreeNicosia.h:
+        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
+        (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateBeforeChildren):
+        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
+        * platform/graphics/nicosia/NicosiaPlatformLayer.h:
+        (Nicosia::CompositionLayer::flushState):
+        (Nicosia::CompositionLayer::accessPending):
+
+2020-11-09  Chris Lord  <clord@igalia.com>
+
</ins><span class="cx">         REGRESSION(r269503): [GTK][WPE] >200 tests are failing
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=218654
</span><span class="cx">         <rdar://problem/71116949>
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingThreadedScrollingTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h      2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.h 2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -77,6 +77,8 @@
</span><span class="cx">     void reportExposedUnfilledArea(MonotonicTime, unsigned unfilledArea) override;
</span><span class="cx">     void reportSynchronousScrollingReasonsChanged(MonotonicTime, OptionSet<SynchronousScrollingReason>) override;
</span><span class="cx"> 
</span><ins>+    RefPtr<AsyncScrollingCoordinator> m_scrollingCoordinator;
+
</ins><span class="cx"> private:
</span><span class="cx">     bool isThreadedScrollingTree() const override { return true; }
</span><span class="cx">     void propagateSynchronousScrollingReasons(const HashSet<ScrollingNodeID>&) override;
</span><span class="lines">@@ -91,8 +93,6 @@
</span><span class="cx"> 
</span><span class="cx">     Seconds maxAllowableRenderingUpdateDurationForSynchronization();
</span><span class="cx"> 
</span><del>-    RefPtr<AsyncScrollingCoordinator> m_scrollingCoordinator;
-
</del><span class="cx">     enum class SynchronizationState : uint8_t {
</span><span class="cx">         Idle,
</span><span class="cx">         WaitingForRenderingUpdate,
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingnicosiaScrollingTreeFrameScrollingNodeNicosiacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp   2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp      2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -89,6 +89,16 @@
</span><span class="cx">         auto* layer = static_cast<Nicosia::PlatformLayer*>(scrollingStateNode.footerLayer());
</span><span class="cx">         m_footerLayer = downcast<Nicosia::CompositionLayer>(layer);
</span><span class="cx">     }
</span><ins>+    if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrolledContentsLayer)) {
+        auto* scrollLayer = static_cast<Nicosia::PlatformLayer*>(scrolledContentsLayer());
+        ASSERT(scrollLayer);
+        auto& compositionLayer = downcast<Nicosia::CompositionLayer>(*scrollLayer);
+        auto updateScope = compositionLayer.createUpdateScope();
+        compositionLayer.updateState([nodeID = scrollingNodeID()](Nicosia::CompositionLayer::LayerState& state) {
+            state.scrollingNodeID = nodeID;
+            state.delta.scrollingNodeChanged = true;
+        });
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren(const ScrollingStateNode& stateNode)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingnicosiaScrollingTreeFrameScrollingNodeNicosiah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h     2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h        2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -47,6 +47,8 @@
</span><span class="cx">     static Ref<ScrollingTreeFrameScrollingNode> create(ScrollingTree&, ScrollingNodeType, ScrollingNodeID);
</span><span class="cx">     virtual ~ScrollingTreeFrameScrollingNodeNicosia();
</span><span class="cx"> 
</span><ins>+    RefPtr<Nicosia::CompositionLayer> rootContentsLayer() const { return m_rootContentsLayer; }
+
</ins><span class="cx"> private:
</span><span class="cx">     ScrollingTreeFrameScrollingNodeNicosia(ScrollingTree&, ScrollingNodeType, ScrollingNodeID);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingnicosiaScrollingTreeNicosiacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.cpp (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.cpp     2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.cpp        2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING) && USE(NICOSIA)
</span><span class="cx"> 
</span><ins>+#include "AsyncScrollingCoordinator.h"
+#include "NicosiaPlatformLayer.h"
</ins><span class="cx"> #include "ScrollingTreeFixedNode.h"
</span><span class="cx"> #include "ScrollingTreeFrameHostingNode.h"
</span><span class="cx"> #include "ScrollingTreeFrameScrollingNodeNicosia.h"
</span><span class="lines">@@ -73,6 +75,68 @@
</span><span class="cx">     RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+using Nicosia::CompositionLayer;
+
+static void collectDescendantLayersAtPoint(Vector<RefPtr<CompositionLayer>>& layersAtPoint, RefPtr<CompositionLayer> parent, const FloatPoint& point)
+{
+    bool childExistsAtPoint = false;
+
+    parent->accessPending([&](const CompositionLayer::LayerState& state) {
+        for (auto child : state.children) {
+            bool containsPoint = false;
+            FloatPoint transformedPoint;
+            child->accessPending([&](const CompositionLayer::LayerState& childState) {
+                if (!childState.transform.isInvertible())
+                    return;
+                float originX = childState.anchorPoint.x() * childState.size.width();
+                float originY = childState.anchorPoint.y() * childState.size.height();
+                auto transform = *(TransformationMatrix()
+                    .translate3d(originX + childState.position.x(), originY + childState.position.y(), childState.anchorPoint.z())
+                    .multiply(childState.transform)
+                    .translate3d(-originX, -originY, -childState.anchorPoint.z()).inverse());
+                auto childPoint = transform.projectPoint(point);
+                if (FloatRect(FloatPoint(), childState.size).contains(childPoint)) {
+                    containsPoint = true;
+                    transformedPoint.set(childPoint.x(), childPoint.y());
+                }
+            });
+            if (containsPoint) {
+                childExistsAtPoint = true;
+                collectDescendantLayersAtPoint(layersAtPoint, child, transformedPoint);
+            }
+        }
+    });
+
+    if (!childExistsAtPoint)
+        layersAtPoint.append(parent);
+}
+
+RefPtr<ScrollingTreeNode> ScrollingTreeNicosia::scrollingNodeForPoint(FloatPoint point)
+{
+    auto* rootScrollingNode = rootNode();
+    if (!rootScrollingNode)
+        return nullptr;
+
+    LayerTreeHitTestLocker layerLocker(m_scrollingCoordinator.get());
+
+    auto rootContentsLayer = static_cast<ScrollingTreeFrameScrollingNodeNicosia*>(rootScrollingNode)->rootContentsLayer();
+    Vector<RefPtr<CompositionLayer>> layersAtPoint;
+    collectDescendantLayersAtPoint(layersAtPoint, rootContentsLayer, point);
+
+    ScrollingTreeNode* returnNode = nullptr;
+    for (auto layer : WTF::makeReversedRange(layersAtPoint)) {
+        layer->accessCommitted([&](const CompositionLayer::LayerState& state) {
+            auto* scrollingNode = nodeForID(state.scrollingNodeID);
+            if (is<ScrollingTreeScrollingNode>(scrollingNode))
+                returnNode = scrollingNode;
+        });
+        if (returnNode)
+            break;
+    }
+
+    return returnNode ? returnNode : rootScrollingNode;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(ASYNC_SCROLLING) && USE(NICOSIA)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingnicosiaScrollingTreeNicosiah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.h (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.h       2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.h  2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -41,6 +41,8 @@
</span><span class="cx">     explicit ScrollingTreeNicosia(AsyncScrollingCoordinator&);
</span><span class="cx"> 
</span><span class="cx">     Ref<ScrollingTreeNode> createScrollingTreeNode(ScrollingNodeType, ScrollingNodeID) override;
</span><ins>+
+    RefPtr<ScrollingTreeNode> scrollingNodeForPoint(FloatPoint) final;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingnicosiaScrollingTreeOverflowScrollingNodeNicosiacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp        2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp   2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -56,6 +56,23 @@
</span><span class="cx"> 
</span><span class="cx"> ScrollingTreeOverflowScrollingNodeNicosia::~ScrollingTreeOverflowScrollingNodeNicosia() = default;
</span><span class="cx"> 
</span><ins>+void ScrollingTreeOverflowScrollingNodeNicosia::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
+{
+    ScrollingTreeScrollingNode::commitStateBeforeChildren(stateNode);
+
+    const auto& scrollingStateNode = downcast<ScrollingStateOverflowScrollingNode>(stateNode);
+    if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrolledContentsLayer)) {
+        auto* scrollLayer = static_cast<Nicosia::PlatformLayer*>(scrolledContentsLayer());
+        ASSERT(scrollLayer);
+        auto& compositionLayer = downcast<Nicosia::CompositionLayer>(*scrollLayer);
+        auto updateScope = compositionLayer.createUpdateScope();
+        compositionLayer.updateState([nodeID = scrollingNodeID()](Nicosia::CompositionLayer::LayerState& state) {
+            state.scrollingNodeID = nodeID;
+            state.delta.scrollingNodeChanged = true;
+        });
+    }
+}
+
</ins><span class="cx"> void ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren(const ScrollingStateNode& stateNode)
</span><span class="cx"> {
</span><span class="cx">     ScrollingTreeOverflowScrollingNode::commitStateAfterChildren(stateNode);
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingnicosiaScrollingTreeOverflowScrollingNodeNicosiah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h  2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h     2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx"> private:
</span><span class="cx">     ScrollingTreeOverflowScrollingNodeNicosia(ScrollingTree&, ScrollingNodeID);
</span><span class="cx"> 
</span><ins>+    void commitStateBeforeChildren(const ScrollingStateNode&) override;
</ins><span class="cx">     void commitStateAfterChildren(const ScrollingStateNode&) override;
</span><span class="cx"> 
</span><span class="cx">     FloatPoint adjustedScrollPosition(const FloatPoint&, ScrollClamping) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsnicosiaNicosiaPlatformLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h (269578 => 269579)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h    2020-11-09 10:19:34 UTC (rev 269578)
+++ trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPlatformLayer.h       2020-11-09 10:20:55 UTC (rev 269579)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include "NicosiaAnimatedBackingStoreClient.h"
</span><span class="cx"> #include "NicosiaAnimation.h"
</span><span class="cx"> #include "NicosiaSceneIntegration.h"
</span><ins>+#include "ScrollTypes.h"
</ins><span class="cx"> #include "TransformationMatrix.h"
</span><span class="cx"> #include <wtf/Function.h>
</span><span class="cx"> #include <wtf/Lock.h>
</span><span class="lines">@@ -134,6 +135,7 @@
</span><span class="cx">                     bool animatedBackingStoreClientChanged : 1;
</span><span class="cx">                     bool repaintCounterChanged : 1;
</span><span class="cx">                     bool debugBorderChanged : 1;
</span><ins>+                    bool scrollingNodeChanged : 1;
</ins><span class="cx">                 };
</span><span class="cx">                 uint32_t value { 0 };
</span><span class="cx">             };
</span><span class="lines">@@ -198,6 +200,8 @@
</span><span class="cx">             float width { 0 };
</span><span class="cx">             bool visible { false };
</span><span class="cx">         } debugBorder;
</span><ins>+
+        WebCore::ScrollingNodeID scrollingNodeID { 0 };
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     template<typename T>
</span><span class="lines">@@ -266,6 +270,9 @@
</span><span class="cx">         if (pending.delta.debugBorderChanged)
</span><span class="cx">             staging.debugBorder = pending.debugBorder;
</span><span class="cx"> 
</span><ins>+        if (pending.delta.scrollingNodeChanged)
+            staging.scrollingNodeID = pending.scrollingNodeID;
+
</ins><span class="cx">         if (pending.delta.backingStoreChanged)
</span><span class="cx">             staging.backingStore = pending.backingStore;
</span><span class="cx">         if (pending.delta.contentLayerChanged)
</span><span class="lines">@@ -291,6 +298,13 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     template<typename T>
</span><ins>+    void accessPending(const T& functor)
+    {
+        LockHolder locker(PlatformLayer::m_state.lock);
+        functor(m_state.pending);
+    }
+
+    template<typename T>
</ins><span class="cx">     void accessCommitted(const T& functor)
</span><span class="cx">     {
</span><span class="cx">         LockHolder locker(PlatformLayer::m_state.lock);
</span></span></pre>
</div>
</div>

</body>
</html>