Changeset 242997 in webkit
- Timestamp:
- Mar 15, 2019, 9:26:09 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 12 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt (modified) (2 diffs)
-
LayoutTests/scrollingcoordinator/ios/absolute-layer-should-not-move-with-scroll-expected.html (added)
-
LayoutTests/scrollingcoordinator/ios/absolute-layer-should-not-move-with-scroll.html (added)
-
LayoutTests/scrollingcoordinator/ios/relative-layer-should-move-with-scroll-expected.html (added)
-
LayoutTests/scrollingcoordinator/ios/relative-layer-should-move-with-scroll.html (added)
-
LayoutTests/scrollingcoordinator/ios/ui-scrolling-tree-expected.txt (modified) (1 diff)
-
LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/scrolling/ScrollingTree.cpp (modified) (6 diffs)
-
Source/WebCore/page/scrolling/ScrollingTree.h (modified) (2 diffs)
-
Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollingNode.cpp (modified) (1 diff)
-
Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollingNode.h (modified) (1 diff)
-
Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.h (modified) (1 diff)
-
Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm (modified) (2 diffs)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r242993 r242997 1 2019-03-15 Simon Fraser <simon.fraser@apple.com> 2 3 [Async overflow Scrolling] Update positioned node layers when overflows are scrolled 4 https://bugs.webkit.org/show_bug.cgi?id=195733 5 rdar://problem/11642295 6 7 Reviewed by Antti Koivisto. 8 9 New tests that use uiController.scrollUpdatesDisabled, and are the two move/stationary 10 cases. 11 12 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt: 13 * scrollingcoordinator/ios/absolute-layer-should-not-move-with-scroll-expected.html: Added. 14 * scrollingcoordinator/ios/absolute-layer-should-not-move-with-scroll.html: Added. 15 * scrollingcoordinator/ios/relative-layer-should-move-with-scroll-expected.html: Added. 16 * scrollingcoordinator/ios/relative-layer-should-move-with-scroll.html: Added. 17 * scrollingcoordinator/ios/ui-scrolling-tree-expected.txt: Fixed the last paren showing up. 18 * scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt: We make positioned nodes now. 19 1 20 2019-03-15 Fujii Hironori <Hironori.Fujii@sony.com> 2 21 -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt
r242913 r242997 18 18 (max layout viewport origin (0,141)) 19 19 (behavior for fixed 0) 20 (children 420 (children 5 21 21 (Overflow scrolling node 22 22 (scrollable area size 220 170) … … 55 55 ) 56 56 ) 57 (Positioned node 58 (layout constraints 59 (layer-position-at-last-layout (10,30)) 60 (positioning-behavior moves)) 61 (related overflow nodes 1) 62 ) 57 63 (Overflow scrolling node 58 64 (scrollable area size 220 170) -
trunk/LayoutTests/scrollingcoordinator/ios/ui-scrolling-tree-expected.txt
r217591 r242997 18 18 (viewport-rect-at-last-layout (0,0) width=320 height=548) 19 19 (layer-position-at-last-layout (12,10))) 20 (layer top left (12,10)))) 20 (layer top left (12,10))))) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/positioned-nodes-expected.txt
r242913 r242997 19 19 (max layout viewport origin (0,141)) 20 20 (behavior for fixed 0) 21 (children 421 (children 5 22 22 (Overflow scrolling node 23 23 (scrollable area size 205 155) … … 56 56 ) 57 57 ) 58 (Positioned node 59 (layout constraints 60 (layer-position-at-last-layout (10,28)) 61 (positioning-behavior moves)) 62 (related overflow nodes 1) 63 ) 58 64 (Overflow scrolling node 59 65 (scrollable area size 205 155) -
trunk/Source/WebCore/ChangeLog
r242995 r242997 1 2019-03-15 Simon Fraser <simon.fraser@apple.com> 2 3 [Async overflow Scrolling] Update positioned node layers when overflows are scrolled 4 https://bugs.webkit.org/show_bug.cgi?id=195733 5 rdar://problem/11642295 6 7 Reviewed by Antti Koivisto. 8 9 Make ScrollingTree positioned nodes in the two cases where we need them, as 10 detected by RenderLayerCompositor::computeCoordinatedPositioningForLayer(). 11 12 For "Moves" layers we know that the overflow is not in the z-order ancestor chain, 13 so ScrollingTree needs a map of overflow node -> affected positioned nodes which 14 notifyRelatedNodesAfterScrollPositionChange() uses to find nodes to update after 15 a scroll. Computing these dependent nodes in RenderLayerCompositor() would require 16 correct dependency analysis between an overflow layers and "positioned" layers which 17 is hard. It's easier to have "positioned" layers figure out which overflow nodes 18 affect them, then compute the inverse relationship when the scrolling tree is updated 19 which happens in ScrollingTreePositionedNode::commitStateBeforeChildren(). 20 21 Tests: scrollingcoordinator/ios/absolute-layer-should-not-move-with-scroll.html 22 scrollingcoordinator/ios/relative-layer-should-move-with-scroll.html 23 24 * page/scrolling/ScrollingTree.cpp: 25 (WebCore::ScrollingTree::commitTreeState): 26 (WebCore::ScrollingTree::applyLayerPositions): 27 (WebCore::ScrollingTree::notifyRelatedNodesAfterScrollPositionChange): 28 (WebCore::ScrollingTree::scrollingTreeAsText): 29 * page/scrolling/ScrollingTree.h: 30 (WebCore::ScrollingTree::overflowRelatedNodes): 31 * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp: 32 (WebCore::ScrollingTreeOverflowScrollingNode::dumpProperties const): 33 * page/scrolling/ScrollingTreeOverflowScrollingNode.h: 34 * page/scrolling/cocoa/ScrollingTreePositionedNode.mm: 35 (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren): 36 (WebCore::ScrollingTreePositionedNode::applyLayerPositions): 37 (WebCore::ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange): 38 * rendering/RenderLayerCompositor.cpp: 39 (WebCore::layerContainingBlockCrossesCoordinatedScrollingBoundary): 40 (WebCore::layerParentedAcrossCoordinatedScrollingBoundary): 41 (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const): 42 (WebCore::collectRelatedCoordinatedScrollingNodes): 43 (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole): 44 1 45 2019-03-15 Antti Koivisto <antti@apple.com> 2 46 -
trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp
r242913 r242997 175 175 unvisitedNodes.add(nodeID); 176 176 177 m_overflowRelatedNodesMap.clear(); 178 177 179 // orphanNodes keeps child nodes alive while we rebuild child lists. 178 180 OrphanScrollingNodeMap orphanNodes; … … 186 188 m_nodeMap.remove(nodeID); 187 189 } 190 191 LOG(Scrolling, "committed ScrollingTree\n%s", scrollingTreeAsText(ScrollingStateTreeAsTextBehaviorDebug).utf8().data()); 188 192 } 189 193 … … 264 268 return; 265 269 270 LOG(Scrolling, "\nScrollingTree %p applyLayerPositions", this); 271 266 272 applyLayerPositionsRecursive(*m_rootNode, { }, { }); 273 274 LOG(Scrolling, "ScrollingTree %p applyLayerPositions - done\n", this); 267 275 } 268 276 … … 292 300 void ScrollingTree::notifyRelatedNodesAfterScrollPositionChange(ScrollingTreeScrollingNode& changedNode) 293 301 { 302 Vector<ScrollingNodeID> additionalUpdateRoots; 303 294 304 FloatSize deltaFromLastCommittedScrollPosition; 295 305 FloatRect currentFrameLayoutViewport; … … 301 311 if (auto* frameScrollingNode = changedNode.enclosingFrameNodeIncludingSelf()) 302 312 currentFrameLayoutViewport = frameScrollingNode->layoutViewport(); 313 314 additionalUpdateRoots = overflowRelatedNodes().get(changedNode.scrollingNodeID()); 303 315 } 304 316 305 317 notifyRelatedNodesRecursive(changedNode, changedNode, currentFrameLayoutViewport, deltaFromLastCommittedScrollPosition); 318 319 for (auto positionedNodeID : additionalUpdateRoots) { 320 auto* positionedNode = nodeForID(positionedNodeID); 321 if (positionedNode) 322 notifyRelatedNodesRecursive(changedNode, *positionedNode, currentFrameLayoutViewport, deltaFromLastCommittedScrollPosition); 323 } 306 324 } 307 325 … … 452 470 } 453 471 454 String ScrollingTree::scrollingTreeAsText( )472 String ScrollingTree::scrollingTreeAsText(ScrollingStateTreeAsTextBehavior behavior) 455 473 { 456 474 TextStream ts(TextStream::LineMode::MultipleLine); 457 475 458 TextStream::GroupScope scope(ts); 459 ts << "scrolling tree"; 460 461 LockHolder locker(m_treeStateMutex); 462 463 if (m_treeState.latchedNodeID) 464 ts.dumpProperty("latched node", m_treeState.latchedNodeID); 465 466 if (!m_treeState.mainFrameScrollPosition.isZero()) 467 ts.dumpProperty("main frame scroll position", m_treeState.mainFrameScrollPosition); 468 469 if (m_rootNode) { 476 { 470 477 TextStream::GroupScope scope(ts); 471 m_rootNode->dump(ts, ScrollingStateTreeAsTextBehaviorIncludeLayerPositions); 472 } 473 478 ts << "scrolling tree"; 479 480 LockHolder locker(m_treeStateMutex); 481 482 if (m_treeState.latchedNodeID) 483 ts.dumpProperty("latched node", m_treeState.latchedNodeID); 484 485 if (!m_treeState.mainFrameScrollPosition.isZero()) 486 ts.dumpProperty("main frame scroll position", m_treeState.mainFrameScrollPosition); 487 488 if (m_rootNode) { 489 TextStream::GroupScope scope(ts); 490 m_rootNode->dump(ts, behavior | ScrollingStateTreeAsTextBehaviorIncludeLayerPositions); 491 } 492 493 if (behavior & ScrollingStateTreeAsTextBehaviorIncludeNodeIDs && !m_overflowRelatedNodesMap.isEmpty()) { 494 TextStream::GroupScope scope(ts); 495 ts << "overflow related nodes"; 496 { 497 TextStream::IndentScope indentScope(ts); 498 for (auto& it : m_overflowRelatedNodesMap) 499 ts << "\n" << indent << it.key << " -> " << it.value; 500 } 501 } 502 } 474 503 return ts.release(); 475 504 } -
trunk/Source/WebCore/page/scrolling/ScrollingTree.h
r242913 r242997 145 145 --m_fixedOrStickyNodeCount; 146 146 } 147 148 WEBCORE_EXPORT String scrollingTreeAsText(); 147 148 // A map of overflow scrolling nodes to positioned nodes which need to be updated 149 // when the scroller changes, but are not descendants. 150 using RelatedNodesMap = HashMap<ScrollingNodeID, Vector<ScrollingNodeID>>; 151 RelatedNodesMap& overflowRelatedNodes() { return m_overflowRelatedNodesMap; } 152 153 WEBCORE_EXPORT String scrollingTreeAsText(ScrollingStateTreeAsTextBehavior = ScrollingStateTreeAsTextBehaviorNormal); 149 154 150 155 protected: … … 167 172 using ScrollingTreeNodeMap = HashMap<ScrollingNodeID, ScrollingTreeNode*>; 168 173 ScrollingTreeNodeMap m_nodeMap; 174 175 RelatedNodesMap m_overflowRelatedNodesMap; 169 176 170 177 struct TreeState { -
trunk/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollingNode.cpp
r239548 r242997 41 41 ScrollingTreeOverflowScrollingNode::~ScrollingTreeOverflowScrollingNode() = default; 42 42 43 void ScrollingTreeOverflowScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const 44 { 45 ts << "overflow scrolling node"; 46 ScrollingTreeNode::dumpProperties(ts, behavior); 47 } 48 43 49 } // namespace WebCore 44 50 -
trunk/Source/WebCore/page/scrolling/ScrollingTreeOverflowScrollingNode.h
r208179 r242997 38 38 protected: 39 39 WEBCORE_EXPORT ScrollingTreeOverflowScrollingNode(ScrollingTree&, ScrollingNodeID); 40 41 WEBCORE_EXPORT void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const; 40 42 }; 41 43 -
trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.h
r242913 r242997 50 50 void applyLayerPositions(const FloatRect& layoutViewport, FloatSize& cumulativeDelta) override; 51 51 52 void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override;52 WEBCORE_EXPORT void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override; 53 53 54 54 Vector<ScrollingNodeID> m_relatedOverflowScrollingNodes; -
trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm
r242913 r242997 32 32 #import "ScrollingStatePositionedNode.h" 33 33 #import "ScrollingTree.h" 34 #import "ScrollingTreeOverflowScrollingNode.h" 34 35 #import "ScrollingTreeScrollingNode.h" 35 36 #import <QuartzCore/CALayer.h> … … 62 63 if (positionedStateNode.hasChangedProperty(ScrollingStatePositionedNode::LayoutConstraintData)) 63 64 m_constraints = positionedStateNode.layoutConstraints(); 65 66 // Tell the ScrollingTree about non-ancestor overflow nodes which affect this node. 67 if (m_constraints.scrollPositioningBehavior() == ScrollPositioningBehavior::Moves) { 68 auto& relatedNodes = scrollingTree().overflowRelatedNodes(); 69 for (auto overflowNodeID : m_relatedOverflowScrollingNodes) { 70 relatedNodes.ensure(overflowNodeID, [] { 71 return Vector<ScrollingNodeID>(); 72 }).iterator->value.append(scrollingNodeID()); 73 } 74 } 64 75 } 65 76 66 77 void ScrollingTreePositionedNode::applyLayerPositions(const FloatRect&, FloatSize& cumulativeDelta) 67 78 { 68 FloatSize layerOffset; // FIXME: layerOffset needs to be computed by looking at scrolling tree deltas 69 // in the overflow nodes that affect this node. Some of that may come in via cumulativeDelta. 79 // Note that we ignore cumulativeDelta because it will contain the delta for ancestor scrollers, 80 // but not non-ancestor ones, so it's simpler to just recompute from the scrollers we know about here. 81 FloatSize scrollOffsetSinceLastCommit; 82 for (auto nodeID : m_relatedOverflowScrollingNodes) { 83 if (auto* node = scrollingTree().nodeForID(nodeID)) { 84 if (is<ScrollingTreeOverflowScrollingNode>(node)) { 85 auto& overflowNode = downcast<ScrollingTreeOverflowScrollingNode>(*node); 86 scrollOffsetSinceLastCommit += overflowNode.lastCommittedScrollPosition() - overflowNode.currentScrollPosition(); 87 } 88 } 89 } 90 LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreePositionedNode " << scrollingNodeID() << " applyLayerPositions: overflow delta " << scrollOffsetSinceLastCommit); 70 91 71 LOG_WITH_STREAM(Scrolling, stream << "ScrollingTreePositionedNode " << scrollingNodeID() << " applyLayerPositions: total overflow delta " << layerOffset); 72 73 layerOffset += cumulativeDelta; 74 // Stationary nodes move in the opposite direction. 75 if (m_constraints.scrollPositioningBehavior() == ScrollPositioningBehavior::Stationary) 92 auto layerOffset = -scrollOffsetSinceLastCommit; 93 if (m_constraints.scrollPositioningBehavior() == ScrollPositioningBehavior::Stationary) { 94 // Stationary nodes move in the opposite direction. 76 95 layerOffset = -layerOffset; 96 } 77 97 78 98 FloatPoint layerPosition = m_constraints.layerPositionAtLastLayout() - layerOffset; 79 99 [m_layer _web_setLayerTopLeftPosition:layerPosition - m_constraints.alignmentOffset()]; 80 100 81 cumulativeDelta += layerPosition - m_constraints.layerPositionAtLastLayout(); 101 // FIXME: Should our scroller deltas propagate to descendants? 102 cumulativeDelta = layerPosition - m_constraints.layerPositionAtLastLayout(); 82 103 } 83 104 84 105 void ScrollingTreePositionedNode::relatedNodeScrollPositionDidChange(const ScrollingTreeScrollingNode& changedNode, const FloatRect& layoutViewport, FloatSize& cumulativeDelta) 85 106 { 86 UNUSED_PARAM(changedNode); 87 // FIXME: This will avoid doing work if we can determine that changedNode doesn't affect this positioned node. 107 if (!m_relatedOverflowScrollingNodes.contains(changedNode.scrollingNodeID())) 108 return; 109 88 110 applyLayerPositions(layoutViewport, cumulativeDelta); 89 111 } -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r242913 r242997 2870 2870 } 2871 2871 2872 // Is this layer's containingBlock an ancestor of scrollable overflow, and is the layer's compositing ancestor inside that overflow? 2873 static bool layerContainingBlockCrossesCoordinatedScrollingBoundary(const RenderLayer& layer, const RenderLayer& compositedAncestor) 2874 { 2875 ASSERT(layer.isComposited()); 2876 ASSERT(layer.renderer().style().position() == PositionType::Absolute); 2877 2878 bool sawCompositingAncestor = false; 2879 for (const auto* currLayer = layer.parent(); currLayer; currLayer = currLayer->parent()) { 2880 if (currLayer->renderer().canContainAbsolutelyPositionedObjects()) 2881 return false; 2882 2883 if (currLayer == &compositedAncestor) 2884 sawCompositingAncestor = true; 2885 2886 if (currLayer->hasCompositedScrollableOverflow()) 2887 return sawCompositingAncestor; 2888 } 2889 2890 return false; 2891 } 2892 2893 // Is there scrollable overflow between this layer and its composited ancestor? 2894 static bool layerParentedAcrossCoordinatedScrollingBoundary(const RenderLayer& layer, const RenderLayer& compositedAncestor) 2895 { 2896 ASSERT(layer.isComposited()); 2897 2898 for (const auto* currLayer = layer.parent(); currLayer != &compositedAncestor; currLayer = currLayer->parent()) { 2899 if (currLayer->hasCompositedScrollableOverflow()) 2900 return true; 2901 } 2902 2903 return false; 2904 } 2905 2872 2906 ScrollPositioningBehavior RenderLayerCompositor::computeCoordinatedPositioningForLayer(const RenderLayer& layer) const 2873 2907 { … … 2875 2909 return ScrollPositioningBehavior::None; 2876 2910 2877 // FIXME: This will look at the containing block and stacking context ancestor chains and determine 2878 // whether this layer needs to be repositioned when a composited overflow scroll scrolls. 2911 auto* scrollingCoordinator = this->scrollingCoordinator(); 2912 if (!scrollingCoordinator) 2913 return ScrollPositioningBehavior::None; 2914 2915 // There are two cases we have to deal with here: 2916 // 1. There's a composited overflow:scroll in the parent chain between the renderer and its containing block, and the layer's 2917 // composited (z-order) ancestor is inside the scroller or is the scroller. In this case, we have to compensate for scroll position 2918 // changes to make the positioned layer stay in the same place. This only applies to position:absolute (since we handle fixed elsewhere). 2919 auto* compositedAncestor = layer.ancestorCompositingLayer(); 2920 2921 auto& renderer = layer.renderer(); 2922 if (renderer.isOutOfFlowPositioned() && renderer.style().position() == PositionType::Absolute) { 2923 if (layerContainingBlockCrossesCoordinatedScrollingBoundary(layer, *compositedAncestor)) 2924 return ScrollPositioningBehavior::Stationary; 2925 2926 return ScrollPositioningBehavior::None; 2927 } 2928 2929 // 2. The layer's containing block is the overflow or inside the overflow:scroll, but its z-order ancestor is 2930 // outside the overflow:scroll. In that case, we have to move the layer via the scrolling tree to make 2931 // it move along with the overflow scrolling. 2932 if (layerParentedAcrossCoordinatedScrollingBoundary(layer, *compositedAncestor)) 2933 return ScrollPositioningBehavior::Moves; 2879 2934 2880 2935 return ScrollPositioningBehavior::None; 2936 } 2937 2938 static Vector<ScrollingNodeID> collectRelatedCoordinatedScrollingNodes(const RenderLayer& layer, ScrollPositioningBehavior positioningBehavior) 2939 { 2940 Vector<ScrollingNodeID> overflowNodeData; 2941 2942 switch (positioningBehavior) { 2943 case ScrollPositioningBehavior::Moves: { 2944 // Collect all the composited scrollers between this layer and its composited ancestor. 2945 auto* compositedAncestor = layer.ancestorCompositingLayer(); 2946 for (const auto* currLayer = layer.parent(); currLayer != compositedAncestor; currLayer = currLayer->parent()) { 2947 if (currLayer->hasCompositedScrollableOverflow()) { 2948 auto scrollingNodeID = currLayer->backing()->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling); 2949 if (scrollingNodeID) 2950 overflowNodeData.append(scrollingNodeID); 2951 else 2952 LOG(Scrolling, "Layer %p doesn't have scrolling node ID yet", &layer); 2953 } 2954 } 2955 break; 2956 } 2957 case ScrollPositioningBehavior::Stationary: { 2958 // Collect all the composited scrollers between this layer and its containing block. 2959 ASSERT(layer.renderer().style().position() == PositionType::Absolute); 2960 for (const auto* currLayer = layer.parent(); currLayer; currLayer = currLayer->parent()) { 2961 if (currLayer->renderer().canContainAbsolutelyPositionedObjects()) 2962 break; 2963 2964 if (currLayer->hasCompositedScrollableOverflow()) { 2965 auto scrollingNodeID = currLayer->backing()->scrollingNodeIDForRole(ScrollCoordinationRole::Scrolling); 2966 if (scrollingNodeID) 2967 overflowNodeData.append(scrollingNodeID); 2968 else 2969 LOG(Scrolling, "Layer %p doesn't have scrolling node ID yet", &layer); 2970 } 2971 } 2972 // Don't need to do anything because the layer is a descendant of the overflow in stacking. 2973 break; 2974 } 2975 case ScrollPositioningBehavior::None: 2976 ASSERT_NOT_REACHED(); 2977 break; 2978 } 2979 2980 return overflowNodeData; 2881 2981 } 2882 2982 … … 4079 4179 4080 4180 if (changes & ScrollingNodeChangeFlags::LayerGeometry && treeState.parentNodeID) { 4081 Vector<ScrollingNodeID> relatedNodeIDs; // FIXME: This will do a tree walk to figure out which composited overflows affect this positioned node. 4181 // Would be nice to avoid calling computeCoordinatedPositioningForLayer() again. 4182 auto positioningBehavior = computeCoordinatedPositioningForLayer(layer); 4183 auto relatedNodeIDs = collectRelatedCoordinatedScrollingNodes(layer, positioningBehavior); 4082 4184 scrollingCoordinator->setRelatedOverflowScrollingNodes(newNodeID, WTFMove(relatedNodeIDs)); 4083 4185 … … 4086 4188 constraints.setAlignmentOffset(graphicsLayer->pixelAlignmentOffset()); 4087 4189 constraints.setLayerPositionAtLastLayout(graphicsLayer->position()); 4088 // Would be nice to avoid calling computeCoordinatedPositioningForLayer() again. 4089 constraints.setScrollPositioningBehavior(computeCoordinatedPositioningForLayer(layer)); 4190 constraints.setScrollPositioningBehavior(positioningBehavior); 4090 4191 scrollingCoordinator->setPositionedNodeGeometry(newNodeID, constraints); 4091 4192 }
Note:
See TracChangeset
for help on using the changeset viewer.