Closed Bug 1529263 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 15399 - Implement scroll-snap-stop: always

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 15399 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15399
Details from upstream follow.

Sandra Sun <sunyunjia@chromium.org> wrote:

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/1460875
WPT-Export-Revision: aaa7d4fec464102c19c2c3426e83f431336fbf75

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 1 tests and 2 subtests
OK     : 1
FAIL   : 2

New tests that have failures or other problems:
/css/css-scroll-snap/scroll-snap-stop-always.html
    A scroll with intended direction and end position should not pass a snap area with scroll-snap-stop: always.: FAIL
    A scroll with intended end position should always choose the closest snap position regardless of the scroll-snap-stop value.: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/899099cb0784
[wpt PR 15399] - Implement scroll-snap-stop: always, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/ed42aeed054b
[wpt PR 15399] - Update wpt metadata, a=testonly
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e225248e3398
[wpt PR 15399] - Implement scroll-snap-stop: always, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/11b9b53dc207
[wpt PR 15399] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.