Changeset 241860 in webkit


Ignore:
Timestamp:
Feb 20, 2019 7:32:50 PM (5 years ago)
Author:
Simon Fraser
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r241852 r241860  
     12019-02-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (240698): Fixed position banners flicker and move when scrolling on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=194889
     5        rdar://problem/47755552
     6
     7        Reviewed by Tim Horton.
     8       
     9        After r240698 we could commit scrolling changes for a fixed node where the "viewportRectAtLastLayout" and the layer
     10        position were mismatched; this happened when AsyncScrollingCoordinator::reconcileScrollingState() came back from the UI process
     11        with an unstable update and set a new layoutViewport, then some other layout triggered a compositing tree update. During the tree
     12        update, we'd update the fixed scrolling node with the new viewport, and an old layer position.
     13       
     14        Fix by ensuring that we only update the geometry info for a scrolling tree node when we update layer geometry for the corresponding
     15        layer.
     16
     17        Not currently testable.
     18
     19        * rendering/RenderLayerCompositor.cpp:
     20        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
     21
    1222019-02-20  Dean Jackson  <dino@apple.com>
    223
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r241830 r241860  
    11701170        }
    11711171       
    1172         if (layerNeedsUpdate || layer.needsCompositingGeometryUpdate() || layer.needsScrollingTreeUpdate())
     1172        OptionSet<ScrollingNodeChangeFlags> scrollingNodeChanges = { ScrollingNodeChangeFlags::Layer };
     1173        if (layerNeedsUpdate || layer.needsCompositingGeometryUpdate() || layer.needsScrollingTreeUpdate()) {
    11731174            layerBacking->updateGeometry();
     1175            scrollingNodeChanges.add(ScrollingNodeChangeFlags::LayerGeometry);
     1176        }
    11741177
    11751178        if (auto* reflection = layer.reflectionLayer()) {
     
    11861189        // FIXME: do based on dirty flags. Need to do this for changes of geometry, configuration and hierarchy.
    11871190        // Need to be careful to do the right thing when a scroll-coordinated layer loses a scroll-coordinated ancestor.
    1188         stateForDescendants.parentNodeID = updateScrollCoordinationForLayer(layer, scrollingTreeState, layerBacking->coordinatedScrollingRoles(), { ScrollingNodeChangeFlags::Layer, ScrollingNodeChangeFlags::LayerGeometry });
     1191        stateForDescendants.parentNodeID = updateScrollCoordinationForLayer(layer, scrollingTreeState, layerBacking->coordinatedScrollingRoles(), scrollingNodeChanges);
    11891192        stateForDescendants.nextChildIndex = 0;
    11901193
Note: See TracChangeset for help on using the changeset viewer.