Bug 1700962 [wpt PR 28240] - Relax constraints on scroll snapping for snap-type both...
commit0b21f78cbf5153f1f0c6dbaaf6b0fe4086fbad34
authorKevin Ellis <kevers@chromium.org>
Fri, 2 Apr 2021 22:01:55 +0000 (2 22:01 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 8 Apr 2021 10:47:48 +0000 (8 10:47 +0000)
treeae7f3e7bc798941f050fa30ff6cfe6827bc6d04d
parent622b583415c6bf4408bbfbb6d214774ced152fc8
Bug 1700962 [wpt PR 28240] - Relax constraints on scroll snapping for snap-type both., a=testonly

Automatic update from web-platform-tests
Relax constraints on scroll snapping for snap-type both.

Our scroll snapping logic confined the snap position to be within
the visible snapport if snapping in both the x and y direction; however,
snaps are allowed to be outside the "snapport's search corridor" as long
as they are not too far outside (left to the user agent to determine
what constitutes "too far").  The relaxed rules are not applied if
snapping in one direction only, or if scroll-snap-stop is set to
'always'.

In addressing the issue, two other tests required tweaking since they
had no allowance for a 2D snap outside the visible snapport either
implicitly (nested-scrollIntoView-snaps.html) or explicitly
(scroll_snap_data_unittest.cc).

Bug: 626703
Change-Id: I3646ccc271d88e06f3e6655009e32ff2a9e08931
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2785142
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Kevin Ellis <kevers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#868394}

--

wpt-commits: b2265405e53c82dadf2fa56128108d9971fb7b43
wpt-pr: 28240
testing/web-platform/tests/css/css-scroll-snap/nested-scrollIntoView-snaps.html