[css-scroll-snap] Snap points should consider large area visibility requirement |
||||
Issue descriptionAccording to the spec, https://drafts.csswg.org/css-scroll-snap-1/ If the snap area is larger than the snapport in a particular axis, then any scroll position in which the snap area covers the snapport, and the distance between the geometrically previous and subsequent snap positions in that axis is larger than size of the snapport in that axis, is a valid snap position in that axis.
,
Jun 25 2018
,
Jun 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c11285b3274b0f59a4baf2236d978be695eb1f48 commit c11285b3274b0f59a4baf2236d978be695eb1f48 Author: Sandra Sun <sunyunjia@chromium.org> Date: Tue Jun 26 00:15:08 2018 Allows panning inside overflowing snap areas. According to the spec[1], if an overflowing snap area covers the snapport in one axis and the distance between the previous snap position and the next snap position is larger than the size of the snapport, the current scroll position is a valid snap position. This patch also rewrites the data structure of SnapAreaData and SnapContainerData so that they only keep the rect and calculate the snap points, visible region, overflow condition only when scroll occurs. [1] https://drafts.csswg.org/css-scroll-snap-1/#snap-overflow Bug: 826359 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Iec1ebe48abe8d2653128ac2af4e6137a14c05502 Reviewed-on: https://chromium-review.googlesource.com/1075558 Commit-Queue: Sandra Sun <sunyunjia@chromium.org> Reviewed-by: David Bokan <bokan@chromium.org> Reviewed-by: Majid Valipour <majidvp@chromium.org> Cr-Commit-Position: refs/heads/master@{#570255} [modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/cc/input/scroll_snap_data.cc [modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/cc/input/scroll_snap_data.h [modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/cc/input/scroll_snap_data_unittest.cc [modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/cc/trees/layer_tree_host_impl_unittest.cc [add] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/WebKit/LayoutTests/external/wpt/css/css-scroll-snap/overflowing-snap-areas.html [modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/WebKit/LayoutTests/external/wpt/css/css-scroll-snap/scrollTo-scrollBy-snaps.html [modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/blink/renderer/core/page/scrolling/snap_coordinator.cc [modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/blink/renderer/core/page/scrolling/snap_coordinator.h [modify] https://crrev.com/c11285b3274b0f59a4baf2236d978be695eb1f48/third_party/blink/renderer/core/page/scrolling/snap_coordinator_test.cc
,
Jun 26 2018
,
Jun 26 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by sunyunjia@chromium.org
, May 4 2018