Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b9dbeb655123e9dc8a5202e71f797c60f37b50be
https://github.com/WebKit/WebKit/commit/b9dbeb655123e9dc8a5202e71f797c60f37b50be
Author: Antoine Quint <[email protected]>
Date: 2026-07-01 (Wed, 01 Jul 2026)
Changed paths:
A
LayoutTests/webanimations/animation-associated-with-external-document-timeline-expected.txt
A
LayoutTests/webanimations/animation-associated-with-external-document-timeline.html
M Source/WebCore/animation/DocumentTimeline.cpp
M Source/WebCore/animation/DocumentTimeline.h
Log Message:
-----------
[threaded-animations] animation associated with external document timeline
crashes under `DocumentTimeline::createAcceleratedRepresentation()`
https://bugs.webkit.org/show_bug.cgi?id=318226
rdar://180912517
Reviewed by Simon Fraser.
If an animation that targets a property that can be accelerated is associated
with a document timeline,
we always allow acceleration by virtue of
`DocumentTimeline::canBeAccelerated()` returning `true`. However,
that `DocumentTimeline` may be associated with a document that is not
associated with a `LocalDOMWindow`,
which is required to perform time computations in
`DocumentTimeline::createAcceleratedRepresentation()`.
So we now check that we have a valid `window()` in
`DocumentTimeline::canBeAccelerated()`.
This fix was automatically suggested by an LLM during bug analysis, I validated
its approach.
Test: webanimations/animation-associated-with-external-document-timeline.html
*
LayoutTests/webanimations/animation-associated-with-external-document-timeline-expected.txt:
Added.
*
LayoutTests/webanimations/animation-associated-with-external-document-timeline.html:
Added.
* Source/WebCore/animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::canBeAccelerated const):
* Source/WebCore/animation/DocumentTimeline.h:
Canonical link: https://commits.webkit.org/316250@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications