Skip to content

[scroll-animations] Inset parameter of ViewTimelineOptions should be optional #11644

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

Open
nmoucht opened this issue Feb 4, 2025 · 1 comment
Labels

Comments

@nmoucht
Copy link

nmoucht commented Feb 4, 2025

Based on the test view-timelines/view-timeline-snapport.html, it is expected that ViewTimelines without a user specified timeline inset should avoid using the scroll-padding property as the inset. However, inset is defined as below in ViewTimelineOptions:

(DOMString or sequence<(CSSNumericValue or CSSKeywordValue)>) inset = "auto";

This definition doesn't make it possible to differentiate the user explicitly setting inset as auto vs the default value. My suggestion is to define it as an optional like below, so we can differentiate between these two cases:

(DOMString? or sequence<(CSSNumericValue or CSSKeywordValue)>) inset;

@nmoucht
Copy link
Author

nmoucht commented Feb 4, 2025

Cc @flackr, @kevers-google, @andruud

@graouts graouts added the scroll-animations-1 Current Work label Feb 4, 2025
nmoucht added a commit to nmoucht/WebKit that referenced this issue Feb 4, 2025
…set is explicitly set to auto

https://bugs.webkit.org/show_bug.cgi?id=286842
rdar://143990760

Reviewed by NOBODY (OOPS!).

Scroll padding should be used if view-timeline-inset is explicitly set to auto. Most of the tests in
css/view-timeline-inset-animation.html still fail due to scrollTop/scrollLeft getting clamped for
some unknown reason. Needs investigation. view-timelines/view-timeline-snapport.html is failing after
this patch due to w3c/csswg-drafts#11644.

* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-inset-animation-expected.txt:
* Source/WebCore/animation/ViewTimeline.cpp:
(WebCore::ViewTimeline::cacheCurrentTime):
webkit-commit-queue pushed a commit to nmoucht/WebKit that referenced this issue Feb 4, 2025
…set is explicitly set to auto

https://bugs.webkit.org/show_bug.cgi?id=286842
rdar://143990760

Reviewed by Antoine Quint.

Scroll padding should be used if view-timeline-inset is explicitly set to auto. Most of the tests in
css/view-timeline-inset-animation.html still fail due to scrollTop/scrollLeft getting clamped for
some unknown reason. Needs investigation. view-timelines/view-timeline-snapport.html is failing after
this patch due to w3c/csswg-drafts#11644.

* LayoutTests/imported/w3c/web-platform-tests/scroll-animations/css/view-timeline-inset-animation-expected.txt:
* Source/WebCore/animation/ViewTimeline.cpp:
(WebCore::ViewTimeline::cacheCurrentTime):

Canonical link: https://commits.webkit.org/289803@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants