Changeset 243211 in webkit
- Timestamp:
- Mar 20, 2019 9:44:49 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r243209 r243211 1 2019-03-20 Simon Fraser <simon.fraser@apple.com> 2 3 Some elements lag behind async overflow scrolling on palace-games.com 4 https://bugs.webkit.org/show_bug.cgi?id=195934 5 6 Reviewed by Zalan Bujtas. 7 8 Add a test with more combinations of overflow, containing block and compositing ancestor. 9 10 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt: Added. 11 * scrollingcoordinator/scrolling-tree/positioned-nodes-complex-expected.txt: Added. 12 * scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html: Added. 13 1 14 2019-03-20 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r243209 r243211 1 2019-03-20 Simon Fraser <simon.fraser@apple.com> 2 3 Some elements lag behind async overflow scrolling on palace-games.com 4 https://bugs.webkit.org/show_bug.cgi?id=195934 5 6 Reviewed by Zalan Bujtas. 7 8 The logic added in r242997 was wrong for an absolutely-positioned layer whose containig block was 9 inside an overflow:scroll, but whose compositing ancestor was outside. This is a case where 10 we need to make a Positioning node for the absolute layer, because it needs to move along 11 with the scrolled content. 12 13 There are six permutations of overflow, containing block and compositing ancestor that we care about. 14 Showing renderer (aka DOM) order, they are (where <- indicates child <- parent): 15 16 layer <- cb <- ca <- os -- no positioned node required 17 layer <- cb <- os <- ca -- compositing parent skips overflow, need a "Moved" Positioned node. 18 layer <- ov <- cb <- ca -- no positioned node required 19 layer <- ov <- ca <- cb -- no positioned node required 20 layer <- ca <- cb <- ov -- no positioned node required 21 layer <- ca <- ov <- cb -- containing block skips overflow, need a "Stationary" Positioned node. 22 23 [cb = containing block, ca = compositing ancestor, ov = overflow scroll] 24 25 Test: scrollingcoordinator/scrolling-tree/positioned-nodes-complex.html 26 27 * rendering/RenderLayer.cpp: 28 (WebCore::outputPaintOrderTreeRecursive): 29 * rendering/RenderLayerCompositor.cpp: 30 (WebCore::layerParentedAcrossCoordinatedScrollingBoundary): 31 (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const): 32 1 33 2019-03-20 Simon Fraser <simon.fraser@apple.com> 2 34 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r243145 r243211 6747 6747 auto positionedNodeID = backing.scrollingNodeIDForRole(WebCore::ScrollCoordinationRole::Positioning); 6748 6748 6749 if (scrollingNodeID || frameHostingNodeID || viewportConstrainedNodeID ) {6749 if (scrollingNodeID || frameHostingNodeID || viewportConstrainedNodeID || positionedNodeID) { 6750 6750 stream << " {"; 6751 6751 bool first = true; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r243209 r243211 2923 2923 } 2924 2924 2925 // Is there scrollable overflow between this layer and its composited ancestor ?2926 static bool layerParentedAcrossCoordinatedScrollingBoundary(const RenderLayer& layer, const RenderLayer& compositedAncestor )2925 // Is there scrollable overflow between this layer and its composited ancestor, and the containing block is the scroller or inside the scroller. 2926 static bool layerParentedAcrossCoordinatedScrollingBoundary(const RenderLayer& layer, const RenderLayer& compositedAncestor, bool checkContainingBlock, bool& containingBlockIsInsideOverflow) 2927 2927 { 2928 2928 ASSERT(layer.isComposited()); 2929 2929 2930 2930 for (const auto* currLayer = layer.parent(); currLayer != &compositedAncestor; currLayer = currLayer->parent()) { 2931 if (checkContainingBlock && currLayer->renderer().canContainAbsolutelyPositionedObjects()) 2932 containingBlockIsInsideOverflow = true; 2933 2931 2934 if (currLayer->hasCompositedScrollableOverflow()) 2932 2935 return true; … … 2952 2955 2953 2956 auto& renderer = layer.renderer(); 2954 if (renderer.isOutOfFlowPositioned() && renderer.style().position() == PositionType::Absolute) { 2957 bool containingBlockCanSkipOverflow = renderer.isOutOfFlowPositioned() && renderer.style().position() == PositionType::Absolute; 2958 if (containingBlockCanSkipOverflow) { 2955 2959 if (layerContainingBlockCrossesCoordinatedScrollingBoundary(layer, *compositedAncestor)) 2956 2960 return ScrollPositioningBehavior::Stationary; 2957 2958 return ScrollPositioningBehavior::None;2959 2961 } 2960 2962 … … 2962 2964 // outside the overflow:scroll. In that case, we have to move the layer via the scrolling tree to make 2963 2965 // it move along with the overflow scrolling. 2964 if (layerParentedAcrossCoordinatedScrollingBoundary(layer, *compositedAncestor)) 2966 bool containingBlockIsInsideOverflow = !containingBlockCanSkipOverflow; 2967 if (layerParentedAcrossCoordinatedScrollingBoundary(layer, *compositedAncestor, containingBlockCanSkipOverflow, containingBlockIsInsideOverflow) && containingBlockIsInsideOverflow) 2965 2968 return ScrollPositioningBehavior::Moves; 2966 2969
Note: See TracChangeset
for help on using the changeset viewer.