Title: [243145] trunk/Source/WebCore
Revision
243145
Author
[email protected]
Date
2019-03-19 10:37:35 -0700 (Tue, 19 Mar 2019)

Log Message

[Async overflow] Handle positioned nodes in a few more places
https://bugs.webkit.org/show_bug.cgi?id=195946

Reviewed by Zalan Bujtas.

When I added support for positioned nodes in the scrolling tree I missed handling
the ScrollCoordinationRole::Positioning in a few places.

I wasn't able to come up with a test for this; when a positioned node toggles between
tiled and non-tiled, hitting the code in didChangePlatformLayerForLayer(), we already
update the node with the new layer.

* rendering/RenderLayer.cpp:
(WebCore::outputPaintOrderTreeRecursive): Logging.
* rendering/RenderLayerBacking.cpp:
(WebCore::operator<<): Logging.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): Update the node's layer.
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Handle detaching of this node type.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (243144 => 243145)


--- trunk/Source/WebCore/ChangeLog	2019-03-19 17:31:01 UTC (rev 243144)
+++ trunk/Source/WebCore/ChangeLog	2019-03-19 17:37:35 UTC (rev 243145)
@@ -1,3 +1,25 @@
+2019-03-19  Simon Fraser  <[email protected]>
+
+        [Async overflow] Handle positioned nodes in a few more places
+        https://bugs.webkit.org/show_bug.cgi?id=195946
+
+        Reviewed by Zalan Bujtas.
+
+        When I added support for positioned nodes in the scrolling tree I missed handling
+        the ScrollCoordinationRole::Positioning in a few places.
+
+        I wasn't able to come up with a test for this; when a positioned node toggles between
+        tiled and non-tiled, hitting the code in didChangePlatformLayerForLayer(), we already
+        update the node with the new layer.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::outputPaintOrderTreeRecursive): Logging.
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::operator<<): Logging.
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer): Update the node's layer.
+        (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Handle detaching of this node type.
+
 2019-03-19  Alex Christensen  <[email protected]>
 
         Make WTFLogChannelState and WTFLogLevel enum classes

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (243144 => 243145)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-03-19 17:31:01 UTC (rev 243144)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2019-03-19 17:37:35 UTC (rev 243145)
@@ -6744,6 +6744,7 @@
         auto scrollingNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::Scrolling);
         auto frameHostingNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::FrameHosting);
         auto viewportConstrainedNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::ViewportConstrained);
+        auto positionedNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::Positioning);
 
         if (scrollingNodeID || frameHostingNodeID || viewportConstrainedNodeID) {
             stream << " {";
@@ -6766,6 +6767,12 @@
                 stream << "vc " << viewportConstrainedNodeID;
             }
 
+            if (positionedNodeID) {
+                if (!first)
+                    stream << ", ";
+                stream << "pos " << positionedNodeID;
+            }
+
             stream << "}";
         }
     }

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (243144 => 243145)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2019-03-19 17:31:01 UTC (rev 243144)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2019-03-19 17:37:35 UTC (rev 243145)
@@ -3135,6 +3135,8 @@
         ts << " scrolling node " << nodeID;
     if (auto nodeID = backing.scrollingNodeIDForRole(ScrollCoordinationRole::FrameHosting))
         ts << " frame hosting node " << nodeID;
+    if (auto nodeID = backing.scrollingNodeIDForRole(ScrollCoordinationRole::Positioning))
+        ts << " positioning node " << nodeID;
     return ts;
 }
 

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (243144 => 243145)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-03-19 17:31:01 UTC (rev 243144)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-03-19 17:37:35 UTC (rev 243145)
@@ -552,6 +552,9 @@
 
     if (auto nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::FrameHosting))
         scrollingCoordinator->setNodeLayers(nodeID, { backing->graphicsLayer() });
+
+    if (auto nodeID = backing->scrollingNodeIDForRole(ScrollCoordinationRole::Positioning))
+        scrollingCoordinator->setNodeLayers(nodeID, { backing->graphicsLayer() });
 }
 
 void RenderLayerCompositor::didPaintBacking(RenderLayerBacking*)
@@ -3959,6 +3962,9 @@
     if (roles.contains(ScrollCoordinationRole::ViewportConstrained))
         detachScrollCoordinatedLayerWithRole(layer, *scrollingCoordinator, ScrollCoordinationRole::ViewportConstrained);
 
+    if (roles.contains(ScrollCoordinationRole::Positioning))
+        detachScrollCoordinatedLayerWithRole(layer, *scrollingCoordinator, ScrollCoordinationRole::Positioning);
+
     backing->detachFromScrollingCoordinator(roles);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to