Skip to content

LibWeb: More animation fixes#9236

Open
Calme1709 wants to merge 8 commits intoLadybirdBrowser:masterfrom
Calme1709:anim-fixes
Open

LibWeb: More animation fixes#9236
Calme1709 wants to merge 8 commits intoLadybirdBrowser:masterfrom
Calme1709:anim-fixes

Conversation

@Calme1709
Copy link
Copy Markdown
Contributor

Various fixes to animations found while working on implementing named scroll timelines. See individual commits for details.

Calme1709 added 8 commits May 4, 2026 23:11
This reveals a couple of failing WPT tests which we previously passed by
bypassing the cached computed styles.
Various setters on KeyframeEffect didn't invalidate animated style and
thus wouldn't be represented in computed style until something else
caused an invalidation.
Previously we would only apply animations which were associated with a
timeline.
The spec says we should always use the owning element even if the
effect's target element has changed
The spec doesn't say what time to use here but in other places where we
schedule animation events it says to use "the result of applying the
procedure to convert timeline time to origin-relative time to the
current time of the timeline with which animation is associated", so we
do that here as well.

This time is stable per animation frame per timeline so we now correctly
fall back to composite ordering of animation/transition events where we
previously wouldn't (since the scheduled time was so precise that it was
always unique), which causes the imported test to no longer be flakey.
Previously we incorrectly dispatched a "animationstart" event instead of
a "transitioncancel" one
@Calme1709 Calme1709 requested a review from AtkinsSJ as a code owner May 4, 2026 11:24
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.

1 participant