Implement scroll-snap-stop: always
As specified in the spec, when the snap-area has scroll-snap-stop: always, we should not pass its snap position when scrolling with an intended direction. This patch implements this feature by adding another round of search for the IntendedEndAndDirectionStrategy. This second round searches for the snap position with scroll-snap-stop: always that's closest to the scroll's start position. It then compares with the result from the first round of search, which is the snap position closest to the scroll's target position. The comparison selects the area closest to the scroll's start position ensuring a an area with snap stop is never bypassed. Bug: 823998 Change-Id: Ic40f82263ced85f8a72c8f5a82d4fb76e403398f Reviewed-on: https://chromium-review.googlesource.com/c/1460875Reviewed-by:David Bokan <bokan@chromium.org> Reviewed-by:
Majid Valipour <majidvp@chromium.org> Commit-Queue: Sandra Sun <sunyunjia@chromium.org> Cr-Commit-Position: refs/heads/master@{#634421}
Showing
Please register or sign in to comment