Skip to content

[css-scroll-snap-2] Add snapChanged and snapChanging details #9056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

DavMila
Copy link
Contributor

@DavMila DavMila commented Jul 11, 2023

snapChanged and snapChanging details are JavaScript events which are fired when a scroller's snap target changes.

This adds some interfaces to support the definition of these events:

  • SnapEvent interface defines a shared event type for snapChanged and snapChanging.
  • SnapTargetList interface defines an object that stores one array of snap targets per x/y axis.
  • SnapTargetArray interface defines an object that stores a single array of snap targets.

snapChanged and snapChanging details are JavaScript events which are
fired when a scroller's snap target changes.
DavMila referenced this pull request Jul 11, 2023
snapChanged and snapChanging details are JavaScript events which are
fired when a scroller's snap target changes.
Copy link
Contributor

@argyleink argyleink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! a refined version of the previous work lookin good 👍🏻

aarongable pushed a commit to chromium/chromium that referenced this pull request Sep 6, 2023
snapChanged and snapChanging are new JavaScript events defined by
the css-scroll-snap-2 spec[1]. These events are explained here[2] and
will be have more details in the spec[1] when this change[3] is merged
into the working group's repo.

SnapEvent, added by this patch, defines the interface for these new
events.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: Ic009ca9706de46128c7b0d68528c60a980067b2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4599639
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1193240}
aarongable pushed a commit to chromium/chromium that referenced this pull request Sep 8, 2023
snapChanged is a new JavaScript event defined by
the css-scroll-snap-2 spec[1]. This event is explained here[2] and
will be more fleshed out in the spec[1] when this PR[3] is merged.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I68015f6a96f5f0a835d5731fcc85441bfbf84368
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4599849
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1194164}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 13, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 13, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 13, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 15, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 15, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 22, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 22, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 23, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 25, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 29, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 1, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 4, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1439807

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 11, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 12, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 12, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 17, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 18, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 22, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 23, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 24, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 24, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 24, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 25, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 27, 2023
snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 16, 2023
…d for programmatic scrolls, a=testonly

Automatic update from web-platform-tests
[css-scroll-snap-2] Implement snapchanged for programmatic scrolls

snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621862
Reviewed-by: Weizhong Xia <weizhonggoogle.com>
Reviewed-by: Robert Flack <flackrchromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1219164}

--

wpt-commits: fe6c0e79ae54795068e316a3ca4aea9359baf17d
wpt-pr: 41959

UltraBlame original commit: 147d1bfc2e3c593d14ad50aa837b91c95341b740
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 16, 2023
…d for programmatic scrolls, a=testonly

Automatic update from web-platform-tests
[css-scroll-snap-2] Implement snapchanged for programmatic scrolls

snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621862
Reviewed-by: Weizhong Xia <weizhonggoogle.com>
Reviewed-by: Robert Flack <flackrchromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1219164}

--

wpt-commits: fe6c0e79ae54795068e316a3ca4aea9359baf17d
wpt-pr: 41959

UltraBlame original commit: 147d1bfc2e3c593d14ad50aa837b91c95341b740
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 16, 2023
…d for programmatic scrolls, a=testonly

Automatic update from web-platform-tests
[css-scroll-snap-2] Implement snapchanged for programmatic scrolls

snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621862
Reviewed-by: Weizhong Xia <weizhonggoogle.com>
Reviewed-by: Robert Flack <flackrchromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1219164}

--

wpt-commits: fe6c0e79ae54795068e316a3ca4aea9359baf17d
wpt-pr: 41959

UltraBlame original commit: 147d1bfc2e3c593d14ad50aa837b91c95341b740
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 20, 2023
…d for programmatic scrolls, a=testonly

Automatic update from web-platform-tests
[css-scroll-snap-2] Implement snapchanged for programmatic scrolls

snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621862
Reviewed-by: Weizhong Xia <weizhong@google.com>
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1219164}

--

wpt-commits: fe6c0e79ae54795068e316a3ca4aea9359baf17d
wpt-pr: 41959
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Nov 20, 2023
…d for programmatic scrolls, a=testonly

Automatic update from web-platform-tests
[css-scroll-snap-2] Implement snapchanged for programmatic scrolls

snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621862
Reviewed-by: Weizhong Xia <weizhong@google.com>
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1219164}

--

wpt-commits: fe6c0e79ae54795068e316a3ca4aea9359baf17d
wpt-pr: 41959
@fantasai
Copy link
Collaborator

Not seeing "SnapChanged" in the CSSWG's ML archive... was there a CSSWG resolution for it somewhere? https://www.w3.org/Search/Mail/Public/search?type-index=www-style&index-type=t&keywords=SnapChanged&search=Search

@argyleink
Copy link
Contributor

Not seeing "SnapChanged" in the CSSWG's ML archive... was there a CSSWG resolution for it somewhere? https://www.w3.org/Search/Mail/Public/search?type-index=www-style&index-type=t&keywords=SnapChanged&search=Search

here!

gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 21, 2023
…d for programmatic scrolls, a=testonly

Automatic update from web-platform-tests
[css-scroll-snap-2] Implement snapchanged for programmatic scrolls

snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621862
Reviewed-by: Weizhong Xia <weizhonggoogle.com>
Reviewed-by: Robert Flack <flackrchromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1219164}

--

wpt-commits: fe6c0e79ae54795068e316a3ca4aea9359baf17d
wpt-pr: 41959

UltraBlame original commit: 19a2a65c56c4a7e663a91296ed8b3bd78a29b440
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 21, 2023
…d for programmatic scrolls, a=testonly

Automatic update from web-platform-tests
[css-scroll-snap-2] Implement snapchanged for programmatic scrolls

snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621862
Reviewed-by: Weizhong Xia <weizhonggoogle.com>
Reviewed-by: Robert Flack <flackrchromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1219164}

--

wpt-commits: fe6c0e79ae54795068e316a3ca4aea9359baf17d
wpt-pr: 41959

UltraBlame original commit: 19a2a65c56c4a7e663a91296ed8b3bd78a29b440
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 21, 2023
…d for programmatic scrolls, a=testonly

Automatic update from web-platform-tests
[css-scroll-snap-2] Implement snapchanged for programmatic scrolls

snapchanged[1] (explainer[2]) should fire when a scroller snaps to a
different element than it was previously snapped to.
This pull request[3] will copy the details from the explainer to the
spec.

Bug:1456339

[1]https://drafts.csswg.org/css-scroll-snap-2/#snapchanged-and-snapchanging
[2]https://github.com/argyleink/ScrollSnapExplainers/tree/main/
[3]w3c/csswg-drafts#9056

Change-Id: I8e798920a2a1ffc19af9ea3f274a94db976cc87d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621862
Reviewed-by: Weizhong Xia <weizhonggoogle.com>
Reviewed-by: Robert Flack <flackrchromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1219164}

--

wpt-commits: fe6c0e79ae54795068e316a3ca4aea9359baf17d
wpt-pr: 41959

UltraBlame original commit: 19a2a65c56c4a7e663a91296ed8b3bd78a29b440
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 22, 2023
…d for user scrolls, a=testonly

Automatic update from web-platform-tests
[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]w3c/csswg-drafts#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}

--

wpt-commits: 6287285e2da1af4fa45c66a4d7f510bff60acc6c
wpt-pr: 42891
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 22, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Revert "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This reverts commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8.

Reason for revert:
Causing breakage in Webkit leak builder
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Original change's description:
> [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]w3c/csswg-drafts#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}

Bug: 1439807
Change-Id: I0c0c3dcb5aa18790d8dce2c3965696ae2d305361
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5021928
Owners-Override: Fred Shih <ffred@chromium.org>
Auto-Submit: Fred Shih <ffred@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1223240}

--

wpt-commits: 101005c254f529ba5b1b20bbd849d40dc5cafe5d
wpt-pr: 43092
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 22, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Reland "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This is a reland of commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8

A leak detection builder[1] was failing, seemingly because the test
finished without waiting for a promise.

The "Bug:" association in the commit description is also corrected.

Original change's description:
> [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]w3c/csswg-drafts#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]https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Bug: 1500972,1456339
Change-Id: I8c1dd52d5ae55a1eb756d95faf9990bd2de6e5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5022556
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1223681}

--

wpt-commits: 1c79efa4efe301b0ec15bf95dc4d3654b5cd7494
wpt-pr: 43105
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 22, 2023
…d for user scrolls, a=testonly

Automatic update from web-platform-tests
[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]w3c/csswg-drafts#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}

--

wpt-commits: 6287285e2da1af4fa45c66a4d7f510bff60acc6c
wpt-pr: 42891
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 22, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Revert "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This reverts commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8.

Reason for revert:
Causing breakage in Webkit leak builder
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Original change's description:
> [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]w3c/csswg-drafts#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}

Bug: 1439807
Change-Id: I0c0c3dcb5aa18790d8dce2c3965696ae2d305361
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5021928
Owners-Override: Fred Shih <ffred@chromium.org>
Auto-Submit: Fred Shih <ffred@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1223240}

--

wpt-commits: 101005c254f529ba5b1b20bbd849d40dc5cafe5d
wpt-pr: 43092
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 22, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Reland "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This is a reland of commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8

A leak detection builder[1] was failing, seemingly because the test
finished without waiting for a promise.

The "Bug:" association in the commit description is also corrected.

Original change's description:
> [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]w3c/csswg-drafts#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]https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Bug: 1500972,1456339
Change-Id: I8c1dd52d5ae55a1eb756d95faf9990bd2de6e5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5022556
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1223681}

--

wpt-commits: 1c79efa4efe301b0ec15bf95dc4d3654b5cd7494
wpt-pr: 43105
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 24, 2023
…d for user scrolls, a=testonly

Automatic update from web-platform-tests
[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]w3c/csswg-drafts#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}

--

wpt-commits: 6287285e2da1af4fa45c66a4d7f510bff60acc6c
wpt-pr: 42891
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 24, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Revert "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This reverts commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8.

Reason for revert:
Causing breakage in Webkit leak builder
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Original change's description:
> [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]w3c/csswg-drafts#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}

Bug: 1439807
Change-Id: I0c0c3dcb5aa18790d8dce2c3965696ae2d305361
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5021928
Owners-Override: Fred Shih <ffred@chromium.org>
Auto-Submit: Fred Shih <ffred@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1223240}

--

wpt-commits: 101005c254f529ba5b1b20bbd849d40dc5cafe5d
wpt-pr: 43092
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 24, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Reland "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This is a reland of commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8

A leak detection builder[1] was failing, seemingly because the test
finished without waiting for a promise.

The "Bug:" association in the commit description is also corrected.

Original change's description:
> [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]w3c/csswg-drafts#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]https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Bug: 1500972,1456339
Change-Id: I8c1dd52d5ae55a1eb756d95faf9990bd2de6e5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5022556
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1223681}

--

wpt-commits: 1c79efa4efe301b0ec15bf95dc4d3654b5cd7494
wpt-pr: 43105
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 24, 2023
…d for user scrolls, a=testonly

Automatic update from web-platform-tests
[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]w3c/csswg-drafts#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}

--

wpt-commits: 6287285e2da1af4fa45c66a4d7f510bff60acc6c
wpt-pr: 42891
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 24, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Revert "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This reverts commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8.

Reason for revert:
Causing breakage in Webkit leak builder
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Original change's description:
> [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]w3c/csswg-drafts#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}

Bug: 1439807
Change-Id: I0c0c3dcb5aa18790d8dce2c3965696ae2d305361
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5021928
Owners-Override: Fred Shih <ffred@chromium.org>
Auto-Submit: Fred Shih <ffred@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1223240}

--

wpt-commits: 101005c254f529ba5b1b20bbd849d40dc5cafe5d
wpt-pr: 43092
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 24, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Reland "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This is a reland of commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8

A leak detection builder[1] was failing, seemingly because the test
finished without waiting for a promise.

The "Bug:" association in the commit description is also corrected.

Original change's description:
> [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]w3c/csswg-drafts#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]https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Bug: 1500972,1456339
Change-Id: I8c1dd52d5ae55a1eb756d95faf9990bd2de6e5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5022556
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1223681}

--

wpt-commits: 1c79efa4efe301b0ec15bf95dc4d3654b5cd7494
wpt-pr: 43105
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 30, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Revert "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This reverts commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8.

Reason for revert:
Causing breakage in Webkit leak builder
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Original change's description:
> [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]w3c/csswg-drafts#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 <skobeschromium.org>
> Commit-Queue: David Awogbemila <awogbemilachromium.org>
> Cr-Commit-Position: refs/heads/main{#1222911}

Bug: 1439807
Change-Id: I0c0c3dcb5aa18790d8dce2c3965696ae2d305361
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5021928
Owners-Override: Fred Shih <ffredchromium.org>
Auto-Submit: Fred Shih <ffredchromium.org>
Commit-Queue: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main{#1223240}

--

wpt-commits: 101005c254f529ba5b1b20bbd849d40dc5cafe5d
wpt-pr: 43092

UltraBlame original commit: 2948eb07182a85d39a381834c72ffc7c84bec2bc
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 30, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Reland "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This is a reland of commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8

A leak detection builder[1] was failing, seemingly because the test
finished without waiting for a promise.

The "Bug:" association in the commit description is also corrected.

Original change's description:
> [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]w3c/csswg-drafts#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 <skobeschromium.org>
> Commit-Queue: David Awogbemila <awogbemilachromium.org>
> Cr-Commit-Position: refs/heads/main{#1222911}

[1]https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Bug: 1500972,1456339
Change-Id: I8c1dd52d5ae55a1eb756d95faf9990bd2de6e5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5022556
Reviewed-by: Steve Kobes <skobeschromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1223681}

--

wpt-commits: 1c79efa4efe301b0ec15bf95dc4d3654b5cd7494
wpt-pr: 43105

UltraBlame original commit: 075d313a1a9456c915bca44291bbb2c9c149896a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 30, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Revert "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This reverts commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8.

Reason for revert:
Causing breakage in Webkit leak builder
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Original change's description:
> [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]w3c/csswg-drafts#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 <skobeschromium.org>
> Commit-Queue: David Awogbemila <awogbemilachromium.org>
> Cr-Commit-Position: refs/heads/main{#1222911}

Bug: 1439807
Change-Id: I0c0c3dcb5aa18790d8dce2c3965696ae2d305361
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5021928
Owners-Override: Fred Shih <ffredchromium.org>
Auto-Submit: Fred Shih <ffredchromium.org>
Commit-Queue: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main{#1223240}

--

wpt-commits: 101005c254f529ba5b1b20bbd849d40dc5cafe5d
wpt-pr: 43092

UltraBlame original commit: 2948eb07182a85d39a381834c72ffc7c84bec2bc
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 30, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Reland "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This is a reland of commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8

A leak detection builder[1] was failing, seemingly because the test
finished without waiting for a promise.

The "Bug:" association in the commit description is also corrected.

Original change's description:
> [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]w3c/csswg-drafts#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 <skobeschromium.org>
> Commit-Queue: David Awogbemila <awogbemilachromium.org>
> Cr-Commit-Position: refs/heads/main{#1222911}

[1]https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Bug: 1500972,1456339
Change-Id: I8c1dd52d5ae55a1eb756d95faf9990bd2de6e5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5022556
Reviewed-by: Steve Kobes <skobeschromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1223681}

--

wpt-commits: 1c79efa4efe301b0ec15bf95dc4d3654b5cd7494
wpt-pr: 43105

UltraBlame original commit: 075d313a1a9456c915bca44291bbb2c9c149896a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 30, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Revert "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This reverts commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8.

Reason for revert:
Causing breakage in Webkit leak builder
https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Original change's description:
> [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]w3c/csswg-drafts#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 <skobeschromium.org>
> Commit-Queue: David Awogbemila <awogbemilachromium.org>
> Cr-Commit-Position: refs/heads/main{#1222911}

Bug: 1439807
Change-Id: I0c0c3dcb5aa18790d8dce2c3965696ae2d305361
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5021928
Owners-Override: Fred Shih <ffredchromium.org>
Auto-Submit: Fred Shih <ffredchromium.org>
Commit-Queue: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main{#1223240}

--

wpt-commits: 101005c254f529ba5b1b20bbd849d40dc5cafe5d
wpt-pr: 43092

UltraBlame original commit: 2948eb07182a85d39a381834c72ffc7c84bec2bc
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 30, 2023
…apchanged for user scrolls", a=testonly

Automatic update from web-platform-tests
Reland "[css-scroll-snap-2] Implement snapchanged for user scrolls"

This is a reland of commit 5fe9b8c1093df2e89604d785b5acfc8f7323c6c8

A leak detection builder[1] was failing, seemingly because the test
finished without waiting for a promise.

The "Bug:" association in the commit description is also corrected.

Original change's description:
> [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]w3c/csswg-drafts#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 <skobeschromium.org>
> Commit-Queue: David Awogbemila <awogbemilachromium.org>
> Cr-Commit-Position: refs/heads/main{#1222911}

[1]https://ci.chromium.org/ui/p/chromium/builders/ci/WebKit%20Linux%20Leak

Bug: 1500972,1456339
Change-Id: I8c1dd52d5ae55a1eb756d95faf9990bd2de6e5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5022556
Reviewed-by: Steve Kobes <skobeschromium.org>
Commit-Queue: David Awogbemila <awogbemilachromium.org>
Cr-Commit-Position: refs/heads/main{#1223681}

--

wpt-commits: 1c79efa4efe301b0ec15bf95dc4d3654b5cd7494
wpt-pr: 43105

UltraBlame original commit: 075d313a1a9456c915bca44291bbb2c9c149896a
@svgeesus svgeesus merged commit 7b0e3bc into w3c:main Jan 24, 2024
@DavMila DavMila deleted the snap-events branch March 25, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants