Changeset 245682 in webkit
- Timestamp:
- May 23, 2019, 8:48:52 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
- 2 copied
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt (copied) (copied from trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt ) (3 diffs)
-
LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt (modified) (1 diff)
-
LayoutTests/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt (copied) (copied from trunk/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt ) (3 diffs)
-
LayoutTests/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow.html (added)
-
LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerCompositor.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245680 r245682 1 2019-05-23 Simon Fraser <simon.fraser@apple.com> 2 3 Create scrolling tree nodes for descendants of position:absolute inside stacking-context overflow 4 https://bugs.webkit.org/show_bug.cgi?id=198154 5 6 Reviewed by Antti Koivisto. 7 8 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt: Copied from LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt. 9 * platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: 10 * scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt: Copied from LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt. 11 * scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow.html: Added. 12 * scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: 13 1 14 2019-05-23 Myles C. Maxfield <mmaxfield@apple.com> 2 15 -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt
r245681 r245682 1 abs2 abs3 1 4 2 (Frame scrolling node … … 18 16 (Overflow scrolling node 19 17 (scrollable area size 300 300) 20 (contents size 300 530)18 (contents size 300 1000) 21 19 (parent relative scrollable rect at (30,22) size 300x300) 22 20 (scrollable area parameters … … 35 33 (Positioned node 36 34 (layout constraints 37 (layer-position-at-last-layout (4 7,55))35 (layer-position-at-last-layout (40,48)) 38 36 (positioning-behavior stationary)) 39 37 (related overflow nodes 1) -
trunk/LayoutTests/platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt
r245170 r245682 26 26 (vertical scrollbar mode 0) 27 27 (has enabled vertical scrollbar 1)) 28 (children 228 (children 3 29 29 (Positioned node 30 30 (layout constraints 31 31 (layer-position-at-last-layout (20,28)) 32 (positioning-behavior stationary)) 33 (related overflow nodes 1) 34 ) 35 (Positioned node 36 (layout constraints 37 (layer-position-at-last-layout (32,60)) 32 38 (positioning-behavior stationary)) 33 39 (related overflow nodes 1) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow-expected.txt
r245681 r245682 1 abs2 abs3 1 4 2 (Frame scrolling node … … 18 16 (Overflow scrolling node 19 17 (scrollable area size 285 285) 20 (contents size 285 530)18 (contents size 285 1000) 21 19 (parent relative scrollable rect at (30,22) size 285x285) 22 20 (scrollable area parameters … … 35 33 (Positioned node 36 34 (layout constraints 37 (layer-position-at-last-layout (4 7,55))35 (layer-position-at-last-layout (40,48)) 38 36 (positioning-behavior stationary)) 39 37 (related overflow nodes 1) -
trunk/LayoutTests/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt
r245170 r245682 26 26 (vertical scrollbar mode 0) 27 27 (has enabled vertical scrollbar 1)) 28 (children 228 (children 3 29 29 (Positioned node 30 30 (layout constraints 31 31 (layer-position-at-last-layout (20,28)) 32 (positioning-behavior stationary)) 33 (related overflow nodes 1) 34 ) 35 (Positioned node 36 (layout constraints 37 (layer-position-at-last-layout (32,58)) 32 38 (positioning-behavior stationary)) 33 39 (related overflow nodes 1) -
trunk/Source/WebCore/ChangeLog
r245681 r245682 1 2019-05-23 Simon Fraser <simon.fraser@apple.com> 2 3 Create scrolling tree nodes for descendants of position:absolute inside stacking-context overflow 4 https://bugs.webkit.org/show_bug.cgi?id=198154 5 6 Reviewed by Antti Koivisto. 7 8 There exists code that creates scrolling tree nodes for position:absolute when the containing block 9 chain skips an enclosing scroller, but the compositing ancestor tree includes the scroller. However 10 this code explicitly checked that the layer was position:absolute. 11 12 This needed to be generalized for any layer whose containing block ancestor chain includes 13 a position:absolute that skips the scroller, for example a transformed inside a position:absolute, 14 so remove an explicit isAbsolutelyPositioned() check and some similar assertions. 15 16 Test: scrollingcoordinator/scrolling-tree/composited-in-absolute-in-stacking-context-overflow.html 17 18 * rendering/RenderLayerCompositor.cpp: 19 (WebCore::collectStationaryLayerRelatedOverflowNodes): 20 (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const): 21 (WebCore::collectRelatedCoordinatedScrollingNodes): 22 1 23 2019-05-23 Adrian Perez de Castro <aperez@igalia.com> 2 24 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r245656 r245682 3111 3111 }; 3112 3112 3113 ASSERT(layer.renderer().isAbsolutelyPositioned());3114 3115 3113 // Collect all the composited scrollers which affect the position of this layer relative to its compositing ancestor (which might be inside the scroller or the scroller itself). 3116 3114 bool seenPaintOrderAncestor = false; … … 3148 3146 } 3149 3147 3150 bool compositedAncestorIs InsideScroller= false;3151 auto* scrollingAncestor = enclosingCompositedScrollingLayer(layer, *compositedAncestor, compositedAncestorIs InsideScroller);3148 bool compositedAncestorIsScrolling = false; 3149 auto* scrollingAncestor = enclosingCompositedScrollingLayer(layer, *compositedAncestor, compositedAncestorIsScrolling); 3152 3150 if (!scrollingAncestor) { 3153 3151 ASSERT_NOT_REACHED(); // layer.hasCompositedScrollingAncestor() should guarantee we have one. … … 3158 3156 // 1. There's a composited overflow:scroll in the parent chain between the renderer and its containing block, and the layer's 3159 3157 // composited (z-order) ancestor is inside the scroller or is the scroller. In this case, we have to compensate for scroll position 3160 // changes to make the positioned layer stay in the same place. This only applies to position:absolute (since we handle fixed elsewhere). 3161 if (layer.renderer().isAbsolutelyPositioned()) { 3162 if (compositedAncestorIsInsideScroller && isNonScrolledLayerInsideScrolledCompositedAncestor(layer, *compositedAncestor, *scrollingAncestor)) 3163 return ScrollPositioningBehavior::Stationary; 3164 } 3158 // changes to make the positioned layer stay in the same place. This only applies to position:absolute or descendants of position:absolute. 3159 if (compositedAncestorIsScrolling && isNonScrolledLayerInsideScrolledCompositedAncestor(layer, *compositedAncestor, *scrollingAncestor)) 3160 return ScrollPositioningBehavior::Stationary; 3165 3161 3166 3162 // 2. The layer's containing block is the overflow or inside the overflow:scroll, but its z-order ancestor is 3167 3163 // outside the overflow:scroll. In that case, we have to move the layer via the scrolling tree to make 3168 3164 // it move along with the overflow scrolling. 3169 if (!compositedAncestorIs InsideScroller&& isScrolledByOverflowScrollLayer(layer, *scrollingAncestor))3165 if (!compositedAncestorIsScrolling && isScrolledByOverflowScrollLayer(layer, *scrollingAncestor)) 3170 3166 return ScrollPositioningBehavior::Moves; 3171 3167 … … 3193 3189 } 3194 3190 case ScrollPositioningBehavior::Stationary: { 3195 ASSERT(layer.renderer().isAbsolutelyPositioned());3196 3191 auto* compositedAncestor = layer.ancestorCompositingLayer(); 3197 3192 if (!compositedAncestor)
Note:
See TracChangeset
for help on using the changeset viewer.