-
Notifications
You must be signed in to change notification settings - Fork 707
[scroll-animations] should an infinite duration yield an exception for effects associated with a progress-based animation? #11804
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
Comments
…t-updateTiming.html has failures https://bugs.webkit.org/show_bug.cgi?id=284542 rdar://141356805 Reviewed by NOBODY (OOPS!). The Web Animations Level 1 specification indicates the following for the `duration` property of the `OptionalEffectTiming` interface [0]: > The iteration duration, which is a real number greater than or equal to zero > (including positive infinity) representing the time taken to complete a single > iteration of the animation effect. Looking through the Web Animations Level 2 and Scroll-driven Animations Level 1 specifications, there is no text anywhere that indicates that an infinite duration for a progress-based animation would yield an exception. As such, the test expecting `Infinity` for `duration` to throw is in error. So we're modifying the relevant test to expect this to be a valid value instead. Assuming there may have been an intent to restrict the `duration` for progress-based animations, the following issue [1] was filed on the Scroll-driven Animations specification. [0] https://drafts.csswg.org/web-animations-1/#dom-effecttiming-duration [1] w3c/csswg-drafts#11804 * LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/effect-updateTiming-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/effect-updateTiming.html:
Cc @flackr, @andruud, @kevers-google and @bramus. |
Right, playing an infinite duration animation in reverse throws an exception because it would result in an impossible to compute state: https://drafts.csswg.org/web-animations-1/#playing-an-animation-section. In a similar manner, playing an infinite duration animation with a non-monotonic timeline invokes a conversion that attempts to use the end time of the animation: https://drafts.csswg.org/web-animations-2/#time-based-animation-to-a-proportional-animation. It's a good idea to call it out explicitly. |
…t-updateTiming.html has failures https://bugs.webkit.org/show_bug.cgi?id=284542 rdar://141356805 Reviewed by Dean Jackson. The Web Animations Level 1 specification indicates the following for the `duration` property of the `OptionalEffectTiming` interface [0]: > The iteration duration, which is a real number greater than or equal to zero > (including positive infinity) representing the time taken to complete a single > iteration of the animation effect. Looking through the Web Animations Level 2 and Scroll-driven Animations Level 1 specifications, there is no text anywhere that indicates that an infinite duration for a progress-based animation would yield an exception. As such, the test expecting `Infinity` for `duration` to throw is in error. So we're modifying the relevant test to expect this to be a valid value instead. Assuming there may have been an intent to restrict the `duration` for progress-based animations, the following issue [1] was filed on the Scroll-driven Animations specification. [0] https://drafts.csswg.org/web-animations-1/#dom-effecttiming-duration [1] w3c/csswg-drafts#11804 * LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/effect-updateTiming-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/effect-updateTiming.html: Canonical link: https://commits.webkit.org/291435@main
The WPT test scroll-animations/scroll-timelines/effect-updateTiming.html checks that setting
Infinity
for theduration
of a keyframe effect associated with a progress-based animation throws:Web Animations Level 1 specifies duration thus:
Reading through Web Animations Level 2 and Scroll-driven Animations Level 1 I cannot find any additional normative text that would indicate that
Infinity
is not a valid value for the duration of a progress-based animation.Chrome throws in that scenario, so I expect it was the intention of Chromium engineers to specify this behavior.
The text was updated successfully, but these errors were encountered: