haikuwebkit/LayoutTests/css3/scroll-snap/nested-elements-expected.txt

7 lines
264 B
Plaintext
Raw Permalink Normal View History

Scroll snap: don't create implicit snap points at scrollmin/scrollmax https://bugs.webkit.org/show_bug.cgi?id=216882 <rdar://problem/69443288> Patch by Martin Robinson <mrobinson@igalia.com> on 2020-10-22 Reviewed by Simon Fraser. LayoutTests/imported/w3c: Update expectations for these tests. * web-platform-tests/css/css-scroll-snap/nested-scrollIntoView-snaps-expected.txt: * web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-only-snap-area-expected.txt: * web-platform-tests/css/css-scroll-snap/snap-after-relayout/changing-scroll-snap-align-expected.txt: * web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets-expected.txt: * web-platform-tests/css/css-scroll-snap/snap-area-capturing-remove-scroll-container-expected.txt: Source/WebCore: * page/scrolling/AxisScrollSnapOffsets.cpp: (WebCore::updateSnapOffsetsForScrollableArea): No longer call adjustmentForTextAutosizing and only conditionally adjust the scroll area by the scroll offset, becauase mapping to container coordinates only applies container scroll offsets in the case that the container is not a ScrollView. (WebCore::adjustAxisSnapOffsetsForScrollExtent): Deleted. LayoutTests: * TestExpectations: Mark some tests as passing. * css3/scroll-snap/nested-elements-expected.txt: Update results to eliminate implicit stops. * css3/scroll-snap/scroll-snap-children-with-padding-expected.txt: Ditto. * css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin-expected.txt: Ditto. * css3/scroll-snap/scroll-snap-children-with-transforms-expected.txt: Ditto. * css3/scroll-snap/scroll-snap-elements-container-larger-than-children-expected.txt: Ditto. * css3/scroll-snap/scroll-snap-elements-container-larger-than-children-rtl-expected.txt: Ditto. * css3/scroll-snap/scroll-snap-offsets-expected.txt: Ditto. * css3/scroll-snap/scroll-snap-offsets-rtl-expected.txt: Ditto. * css3/scroll-snap/scroll-snap-positions-expected.txt: Ditto. * css3/scroll-snap/scroll-snap-with-scroll-padding-expected.txt: Ditto. Canonical link: https://commits.webkit.org/230784@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-22 07:32:40 +00:00
Scroll-snap offsets for 'container': vertical = { 100, 215, 330, 445, 560, 675, 790, 905, 1020, 1135, 1250, 1365, 1480, 1595, 1710, 1825, 1940, 2055, 2170 }
CSS Scroll Snap - support snapping to nested elements https://bugs.webkit.org/show_bug.cgi?id=145843 <rdar://problem/21339581> Reviewed by Darin Adler. Source/WebCore: Tested by css3/scroll-snap/nested-elements.html The Scroll Snap Point implementation was not properly handling nested elements. This could be resolved by recursively calling 'appendChildSnapOffsets', but this seemed like an inefficient approach, especially considering how often this method is called during various scaling and other operations. Instead, do the following: (1) Add a new HashSet to RenderView that holds a collection of RenderElements that have scroll-snap-coordinates. (2) During RenderElement::styleWillChange, register all elements that have the scroll-snap-coordinates style with the RenderView. (3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the subset of these entries relevant to the current scrolling container, and build up the set of scroll-snap-coordinates needed for the current scrolling container. * page/scrolling/AxisScrollSnapOffsets.cpp: (WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet for the RenderView to find all elements that are children of the current scrolling container. Add the scroll-snap-coordinates for these RenderElements to the current set of snap points. * rendering/RenderElement.cpp: (WebCore::findEnclosingScrollableContainer): New helper function. (WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate defined, remember it for later so we can use it with the relevant scrolling container after layout completes. (WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the RenderView. (WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant scrolling container for the current object. * rendering/RenderElement.h: * rendering/RenderView.cpp: (WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added. (WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added. * rendering/RenderView.h: LayoutTests: * css3/scroll-snap/nested-elements-expected.txt: Added. * css3/scroll-snap/nested-elements.html: Added. * css3/scroll-snap/scroll-snap-offsets-expected.txt: Updated to account for 50%/50% scroll-snap-coordinates. Canonical link: https://commits.webkit.org/164066@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-06-16 20:44:18 +00:00
PASS Scroll-snap offsets for 'invalidContainer': UNDEFINED
PASS successfullyParsed is true
TEST COMPLETE