script: Implement AnimationTimeline and DocumentTimeline from Web Animations#43711
Merged
mrobinson merged 1 commit intoservo:mainfrom Mar 27, 2026
Merged
script: Implement AnimationTimeline and DocumentTimeline from Web Animations#43711mrobinson merged 1 commit intoservo:mainfrom
AnimationTimeline and DocumentTimeline from Web Animations#43711mrobinson merged 1 commit intoservo:mainfrom
Conversation
Member
simonwuelker
left a comment
There was a problem hiding this comment.
Nice.
Two main points:
- I'd prefer if we used the
Durationinstead off64everywhere, then we don't need to document the unit of time. - Should this API be exposed behind a preference? You can add it to the experimental web platform features to enable it during WPT
67276ba to
eeff7cb
Compare
eeff7cb to
a707846
Compare
Member
Author
|
@simonwuelker Thanks for the review. I think I have addressed all of your comments. PTAL. |
a707846 to
f75f7eb
Compare
simonwuelker
approved these changes
Mar 27, 2026
| global.as_window().advance_animation_clock(ms); | ||
| global | ||
| .as_window() | ||
| .advance_animation_clock(Duration::seconds(ms as i64)); |
Member
There was a problem hiding this comment.
ms seems to indicate that the unit is milliseconds, so I suppose we should use Duration::milliseconds?
… Animations This is the first step toward implementing the Web Animations specification. It adds support for the `AnimationTimeline` and `DocumentTimeline` specification concepts. Note that there was already an `AnimationTimeline`, but it did not implement the specification. Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
f75f7eb to
8d70ec9
Compare
Member
Author
Sorry. I just realized I didn't answer this question. My hope is that when implementing Web Animations we can avoid having a feature flag as they are part of the Baseline Widely Available web platform features. I am going to attempt to add features here in a way that doesn't break pages, but gradually adds functionality. There may be moments during the implementation when animations misbehave, but hopefully not more than they already do. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first step toward implementing the Web Animations
specification. It adds support for the
AnimationTimelineandDocumentTimelinespecification concepts. Note that there was alreadyan
AnimationTimeline, but it did not implement the specification.Testing: Various WPT start to pass or no longer error / timeout.