Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 841997317f49a733a429d2ed52f589a247d762b2
      
https://github.com/WebKit/WebKit/commit/841997317f49a733a429d2ed52f589a247d762b2
  Author: Antoine Quint <[email protected]>
  Date:   2025-10-13 (Mon, 13 Oct 2025)

  Changed paths:
    A LayoutTests/webanimations/resources/reverse-animation-iframe.html
    A LayoutTests/webanimations/reverse-animation-within-iframe-expected.txt
    A LayoutTests/webanimations/reverse-animation-within-iframe.html
    M Source/WebCore/animation/DocumentTimeline.cpp
    M Source/WebCore/animation/DocumentTimeline.h
    M Source/WebCore/animation/WebAnimation.cpp
    M Source/WebCore/animation/WebAnimation.h

  Log Message:
  -----------
  REGRESSION(294049@main): starting an animation via el.animate().reverse only 
works every other time
https://bugs.webkit.org/show_bug.cgi?id=299823
rdar://162067522

Reviewed by Anne van Kesteren.

We changed the process to mark an animation as "ready" [0] in 294049@main in 
such a way that we rely
on an enqueued task to process pending animations as a group. The content filed 
for this bug had a
reversed animation started within an iframe, which may have different timing 
characteristics than
a more traditional setup since throttling may be involved. As a result, the 
assumption made by the
code change in 294049@main where animation resolution would happen _after_ 
pending animations had been
processed and set a pending start time under 
`AnimationTimelinesController::processPendingAnimations()`
would not necessarily hold true.

We make a simple change that ensures that animation resolution is scheduled, if 
that is not already the
case, when we set the pending start time of an animation.

We also add a new test which replicates the reported issue where a hosting 
document has a continuously-
running animation, which ensures animation resolution is scheduled on every 
rendering frame, and a child
document starts a reversed animation one and again after the first animation's 
completion. Since the iframe
will throttle timers, the enqueued task to process pending animations will run 
only after animation resolution
has been performed as scheduled by the parent document.

[0] https://drafts.csswg.org/web-animations-1/#ready

Test: webanimations/reverse-animation-within-iframe.html
* LayoutTests/webanimations/resources/reverse-animation-iframe.html: Added.
* LayoutTests/webanimations/reverse-animation-within-iframe-expected.txt: Added.
* LayoutTests/webanimations/reverse-animation-within-iframe.html: Added.
* Source/WebCore/animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::pendingStartTimeWasSetOnAnimation):
* Source/WebCore/animation/DocumentTimeline.h:
* Source/WebCore/animation/WebAnimation.cpp:
(WebCore::WebAnimation::setPendingStartTime):
* Source/WebCore/animation/WebAnimation.h:
(WebCore::WebAnimation::setPendingStartTime): Deleted.

Canonical link: https://commits.webkit.org/301414@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to