Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9ca97ba47fc50780afddee75944b6e9fa7fee43e
https://github.com/WebKit/WebKit/commit/9ca97ba47fc50780afddee75944b6e9fa7fee43e
Author: Antoine Quint <[email protected]>
Date: 2026-03-14 (Sat, 14 Mar 2026)
Changed paths:
A
LayoutTests/webanimations/threaded-animations/accelerated-timeline-preservation-during-update-for-primary-and-backdrop-layer-effects-expected.txt
A
LayoutTests/webanimations/threaded-animations/accelerated-timeline-preservation-during-update-for-primary-and-backdrop-layer-effects.html
M Source/WebCore/platform/animation/AcceleratedEffect.cpp
Log Message:
-----------
[threaded-animations] remote timeline is not preserved in update for
animation targeting primary and backdrop layers
https://bugs.webkit.org/show_bug.cgi?id=309962
rdar://171248927
Reviewed by Cameron McCormack.
If we create an accelerated animation that animates properties affecting both
the primary and backdrop
layers, such as an animation animating both `opacity` (primary) and
`backdrop-filter` (backdrop), we end
up slicing the list of animation effects in two in
`AcceleratedEffectStack::setEffects()`. To do this, we
use the `AccelerateEffect::copyWithProperties()` method which makes a copy of
the effect and filters only
the properties relevant to the layer type.
But a bad error was made in 301942@main when we added support for different
timeline types and only copied
`m_timelineIdentifier` in the `AcceleratedEffect(const AcceleratedEffect&,
OptionSet<AcceleratedEffectProperty>&)`
constructor variant, and forgot to also copy `m_timeline`. This meant that the
`AcceleratedTimeline` created
for the effect was immediately destroyed following the initial animation commit
to the remote layer tree.
As such, if that animation needs an update, a new version of it will be created
in a remote layer tree commit
but the timeline update in that same commit will list that timeline for
deletion since it will no longer exist.
For additional details, see 308011@main.
We fix this by simply ensuring we preserve `m_timeline` when
`AccelerateEffect::copyWithProperties()` is called.
Test:
webanimations/threaded-animations/accelerated-timeline-preservation-during-update-for-primary-and-backdrop-layer-effects.html
*
LayoutTests/webanimations/threaded-animations/accelerated-timeline-preservation-during-update-for-primary-and-backdrop-layer-effects-expected.txt:
Added.
*
LayoutTests/webanimations/threaded-animations/accelerated-timeline-preservation-during-update-for-primary-and-backdrop-layer-effects.html:
Added.
* Source/WebCore/platform/animation/AcceleratedEffect.cpp:
(WebCore::AcceleratedEffect::AcceleratedEffect):
Canonical link: https://commits.webkit.org/309277@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications