Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d7fdc6d1513b3dcdf42711967bbf53689c0e29c2
      
https://github.com/WebKit/WebKit/commit/d7fdc6d1513b3dcdf42711967bbf53689c0e29c2
  Author: Antoine Quint <[email protected]>
  Date:   2025-11-29 (Sat, 29 Nov 2025)

  Changed paths:
    M Source/WebCore/animation/KeyframeEffect.cpp

  Log Message:
  -----------
  [threaded-animations] WPT test 
`scroll-animations/scroll-timelines/setting-timeline.tentative.html` crashes 
with "Threaded Scroll-driven Animations" enabled
https://bugs.webkit.org/show_bug.cgi?id=303253
rdar://165550231

Reviewed by Tim Nguyen.

The line of code in the test that causes this crash is when we're switching 
from a scroll timeline to a document
timeline, causing a query of the animation current time under the 
`KeyframeEffect::StackMembershipMutationScope`
destructor and we end up with a start time that is yet to be updated to a 
monotonic time value from a progress-based
value.

This code path should not be hit at all since switching to a document timeline, 
which do not support acceleration
at the moment, should immediately mark the animation's associated keyframe 
effect as not supporting acceleration.

Indeed, we had a quick check in 
`KeyframeEffect::canHaveAcceleratedRepresentation()` that would return `true` 
if we
had an existing accelerated representation for this effect, which is not a 
valid assumption since the effect could
have been accelerated when it was associated with a timeline supporting 
acceleration, such as a scroll-driven timeline,
but should no longer be accelerated by virtue of switching to a document 
timeline.

Note that there is no test change in this patch since the flag is not yet 
enabled on bots. This
was caught in preparation of that running animation tests locally using
`--experimental-feature ThreadedScrollDrivenAnimationsEnabled=true`.

* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::canHaveAcceleratedRepresentation const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to