Title: [241860] trunk/Source/WebCore
Revision
241860
Author
[email protected]
Date
2019-02-20 19:32:50 -0800 (Wed, 20 Feb 2019)

Log Message

REGRESSION (240698): Fixed position banners flicker and move when scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=194889
rdar://problem/47755552

Reviewed by Tim Horton.

After r240698 we could commit scrolling changes for a fixed node where the "viewportRectAtLastLayout" and the layer
position were mismatched; this happened when AsyncScrollingCoordinator::reconcileScrollingState() came back from the UI process
with an unstable update and set a new layoutViewport, then some other layout triggered a compositing tree update. During the tree
update, we'd update the fixed scrolling node with the new viewport, and an old layer position.

Fix by ensuring that we only update the geometry info for a scrolling tree node when we update layer geometry for the corresponding
layer.

Not currently testable.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (241859 => 241860)


--- trunk/Source/WebCore/ChangeLog	2019-02-21 03:28:11 UTC (rev 241859)
+++ trunk/Source/WebCore/ChangeLog	2019-02-21 03:32:50 UTC (rev 241860)
@@ -1,3 +1,24 @@
+2019-02-20  Simon Fraser  <[email protected]>
+
+        REGRESSION (240698): Fixed position banners flicker and move when scrolling on iOS
+        https://bugs.webkit.org/show_bug.cgi?id=194889
+        rdar://problem/47755552
+
+        Reviewed by Tim Horton.
+        
+        After r240698 we could commit scrolling changes for a fixed node where the "viewportRectAtLastLayout" and the layer
+        position were mismatched; this happened when AsyncScrollingCoordinator::reconcileScrollingState() came back from the UI process
+        with an unstable update and set a new layoutViewport, then some other layout triggered a compositing tree update. During the tree
+        update, we'd update the fixed scrolling node with the new viewport, and an old layer position.
+        
+        Fix by ensuring that we only update the geometry info for a scrolling tree node when we update layer geometry for the corresponding
+        layer.
+
+        Not currently testable.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
+
 2019-02-20  Dean Jackson  <[email protected]>
 
         Rotation animations sometimes use the wrong origin (affects apple.com)

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (241859 => 241860)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-02-21 03:28:11 UTC (rev 241859)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-02-21 03:32:50 UTC (rev 241860)
@@ -1169,8 +1169,11 @@
             layerBacking->updateDebugIndicators(m_showDebugBorders, m_showRepaintCounter);
         }
         
-        if (layerNeedsUpdate || layer.needsCompositingGeometryUpdate() || layer.needsScrollingTreeUpdate())
+        OptionSet<ScrollingNodeChangeFlags> scrollingNodeChanges = { ScrollingNodeChangeFlags::Layer };
+        if (layerNeedsUpdate || layer.needsCompositingGeometryUpdate() || layer.needsScrollingTreeUpdate()) {
             layerBacking->updateGeometry();
+            scrollingNodeChanges.add(ScrollingNodeChangeFlags::LayerGeometry);
+        }
 
         if (auto* reflection = layer.reflectionLayer()) {
             if (auto* reflectionBacking = reflection->backing()) {
@@ -1185,7 +1188,7 @@
 
         // FIXME: do based on dirty flags. Need to do this for changes of geometry, configuration and hierarchy.
         // Need to be careful to do the right thing when a scroll-coordinated layer loses a scroll-coordinated ancestor.
-        stateForDescendants.parentNodeID = updateScrollCoordinationForLayer(layer, scrollingTreeState, layerBacking->coordinatedScrollingRoles(), { ScrollingNodeChangeFlags::Layer, ScrollingNodeChangeFlags::LayerGeometry });
+        stateForDescendants.parentNodeID = updateScrollCoordinationForLayer(layer, scrollingTreeState, layerBacking->coordinatedScrollingRoles(), scrollingNodeChanges);
         stateForDescendants.nextChildIndex = 0;
 
 #if !LOG_DISABLED
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to