Title: [269909] trunk/Source/WebCore
Revision
269909
Author
cl...@igalia.com
Date
2020-11-17 09:38:27 -0800 (Tue, 17 Nov 2020)

Log Message

REGRESSION(r269579) [WPE] Many tests with scrolling flaky after this revision
https://bugs.webkit.org/show_bug.cgi?id=218859

Reviewed by Simon Fraser.

Set scrolling node ID correctly on CoordinatedGraphicsLayer.

* page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
* page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
* page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setScrollingNodeID):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269908 => 269909)


--- trunk/Source/WebCore/ChangeLog	2020-11-17 17:28:09 UTC (rev 269908)
+++ trunk/Source/WebCore/ChangeLog	2020-11-17 17:38:27 UTC (rev 269909)
@@ -1,3 +1,21 @@
+2020-11-17  Chris Lord  <cl...@igalia.com>
+
+        REGRESSION(r269579) [WPE] Many tests with scrolling flaky after this revision
+        https://bugs.webkit.org/show_bug.cgi?id=218859
+
+        Reviewed by Simon Fraser.
+
+        Set scrolling node ID correctly on CoordinatedGraphicsLayer.
+
+        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
+        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
+        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
+        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::setScrollingNodeID):
+        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+
 2020-11-17  Peng Liu  <peng.l...@apple.com>
 
         [Media In GPU Process][MSE] Add infrastructure needed to run MediaPlayerPrivateMediaSourceAVFObjC in the GPU process

Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp (269908 => 269909)


--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp	2020-11-17 17:28:09 UTC (rev 269908)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp	2020-11-17 17:38:27 UTC (rev 269909)
@@ -89,16 +89,6 @@
         auto* layer = static_cast<Nicosia::PlatformLayer*>(scrollingStateNode.footerLayer());
         m_footerLayer = downcast<Nicosia::CompositionLayer>(layer);
     }
-    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;
-        });
-    }
 }
 
 void ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren(const ScrollingStateNode& stateNode)

Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp (269908 => 269909)


--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp	2020-11-17 17:28:09 UTC (rev 269908)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp	2020-11-17 17:38:27 UTC (rev 269909)
@@ -56,23 +56,6 @@
 
 ScrollingTreeOverflowScrollingNodeNicosia::~ScrollingTreeOverflowScrollingNodeNicosia() = default;
 
-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;
-        });
-    }
-}
-
 void ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren(const ScrollingStateNode& stateNode)
 {
     ScrollingTreeOverflowScrollingNode::commitStateAfterChildren(stateNode);

Modified: trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h (269908 => 269909)


--- trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h	2020-11-17 17:28:09 UTC (rev 269908)
+++ trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h	2020-11-17 17:38:27 UTC (rev 269909)
@@ -44,7 +44,6 @@
 private:
     ScrollingTreeOverflowScrollingNodeNicosia(ScrollingTree&, ScrollingNodeID);
 
-    void commitStateBeforeChildren(const ScrollingStateNode&) override;
     void commitStateAfterChildren(const ScrollingStateNode&) override;
 
     FloatPoint adjustedScrollPosition(const FloatPoint&, ScrollClamping) const override;

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (269908 => 269909)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2020-11-17 17:28:09 UTC (rev 269908)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp	2020-11-17 17:38:27 UTC (rev 269909)
@@ -244,6 +244,15 @@
     GraphicsLayer::removeFromParent();
 }
 
+void CoordinatedGraphicsLayer::setScrollingNodeID(ScrollingNodeID nodeID)
+{
+    if (scrollingNodeID() == nodeID)
+        return;
+
+    GraphicsLayer::setScrollingNodeID(nodeID);
+    m_nicosia.delta.scrollingNodeChanged = true;
+}
+
 void CoordinatedGraphicsLayer::setPosition(const FloatPoint& p)
 {
     if (position() == p)
@@ -1002,6 +1011,8 @@
                     state.imageBacking = m_nicosia.imageBacking;
                 if (localDelta.animatedBackingStoreClientChanged)
                     state.animatedBackingStoreClient = m_nicosia.animatedBackingStoreClient;
+                if (localDelta.scrollingNodeChanged)
+                    state.scrollingNodeID = scrollingNodeID();
             });
         m_nicosia.performLayerSync = !!m_nicosia.delta.value;
         m_nicosia.delta = { };

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (269908 => 269909)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h	2020-11-17 17:28:09 UTC (rev 269908)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h	2020-11-17 17:38:27 UTC (rev 269909)
@@ -71,6 +71,7 @@
     void addChildBelow(Ref<GraphicsLayer>&&, GraphicsLayer*) override;
     bool replaceChild(GraphicsLayer*, Ref<GraphicsLayer>&&) override;
     void removeFromParent() override;
+    void setScrollingNodeID(ScrollingNodeID) override;
     void setPosition(const FloatPoint&) override;
     void syncPosition(const FloatPoint&) override;
     void setAnchorPoint(const FloatPoint3D&) override;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to