merge_pr_42891
版本发布时间: 2023-11-10 23:05:33
web-platform-tests/wpt最新发布版本:merge_pr_48029(2024-09-07 13:25:31)
[css-scroll-snap-2] Implement snapchanged for user scrolls
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a different set of elements than it was previously snapped to. This pull request[3] will copy the details from the explainer to the spec.
This patch implements snapchanged for user scrolls.
kSnappedToTolerance is increased to 1.0 because there appear to be some differences between the way that fractional snap offsets are handled in cc versus in blink. E.g. when snapping to a target, blink may round a fractional offset down to the nearest integer while cc may round it up as in this codepen[4] where a keyboard scroll snap ends at 134px while a wheel scroll ends at 135px when snapping to the lower box.
Bug:1439807
[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging [2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/ [3]https://github.com/w3c/csswg-drafts/pull/9056 [4]https://codepen.io/awogbemila/pen/JjxEzNm
Change-Id: Id9fd24df3df27d3cea202f2efb2ad09b6e6a0fec Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4994876 Reviewed-by: Steve Kobes skobes@chromium.org Commit-Queue: David Awogbemila awogbemila@chromium.org Cr-Commit-Position: refs/heads/main@{#1222911}
1、 MANIFEST-6287285e2da1af4fa45c66a4d7f510bff60acc6c.json.bz2 2.37MB
2、 MANIFEST-6287285e2da1af4fa45c66a4d7f510bff60acc6c.json.gz 2.9MB
3、 MANIFEST-6287285e2da1af4fa45c66a4d7f510bff60acc6c.json.zst 2.39MB