Bug 1529263 [wpt PR 15399] - Implement scroll-snap-stop: always, a=testonly
commit918e534d17a96e15d2ed72c7f6efd341237df9d9
authorSandra Sun <sunyunjia@chromium.org>
Wed, 6 Mar 2019 12:34:30 +0000 (6 12:34 +0000)
committerJames Graham <james@hoppipolla.co.uk>
Sat, 16 Mar 2019 12:13:20 +0000 (16 12:13 +0000)
treec03fb09f195ff9e805b702f181862bbd51db1d2c
parent8de0f4f44b89d2421ce2f3b6df51db8d274f7a13
Bug 1529263 [wpt PR 15399] - Implement scroll-snap-stop: always, a=testonly

Automatic update from web-platform-tests
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/1460875
Reviewed-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}

--

wpt-commits: 181f8381fe9373e027f4b5ba5d1439843ad2c2e6
wpt-pr: 15399
testing/web-platform/tests/css/css-scroll-snap/scroll-snap-stop-always.html [new file with mode: 0644]