[webkit-changes] [WebKit/WebKit] c40939: [threaded-animation-resolution] webanimations/tran...
Antoine Quint
noreply at github.com
Thu Feb 22 07:33:22 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c409399155163c223f7bb1bca5d54e71a8724b99
https://github.com/WebKit/WebKit/commit/c409399155163c223f7bb1bca5d54e71a8724b99
Author: Antoine Quint <graouts at webkit.org>
Date: 2024-02-22 (Thu, 22 Feb 2024)
Changed paths:
M Source/WebCore/animation/KeyframeEffectStack.cpp
M Source/WebCore/animation/KeyframeEffectStack.h
M Source/WebCore/rendering/RenderBoxModelObject.cpp
M Source/WebCore/rendering/RenderLayerBacking.cpp
M Source/WebCore/rendering/RenderLayerCompositor.cpp
M Source/WebCore/style/Styleable.cpp
M Source/WebCore/style/Styleable.h
Log Message:
-----------
[threaded-animation-resolution] webanimations/transform-accelerated-animation-finishes-before-removal.html is a failure
https://bugs.webkit.org/show_bug.cgi?id=269278
rdar://122856408
Reviewed by Dean Jackson.
We need to ensure keyframe effects that are accelerated using threaded animation resolution cause the target element
to remain on a layer until the effect has completed. In the case of threaded animation resolution, because accelerated
effects run in the UIProcess, we cannot simply rely on whether the keyframe effect stack has a running effect indicating
it is accelerated, because it will no longer be "running" as soon as timing in the WebProcess resolves to such a state.
What we want is to ensure the target element remains on a layer until after that state has been propagated to the UIProcess.
To do so, we now set a list of all accelerated effects on the `KeyframeEffectStack` when we compute the latest accelerated
effect stack in RenderLayerBacking::updateAcceleratedEffectsAndBaseValues(). Then the keyframe effect stack can be queried
for the presence of at least one accelerated effect using `KeyframeEffectStack::hasAcceleratedEffects()`. We call this new
function in two spots:
1. `RenderLayerCompositor::requiresCompositingForAnimation()`
2. `Styleable::hasRunningAcceleratedAnimations()`
The latter was formerly called `Styleable::runningAnimationsAreAllAccelerated()` which, while named accurately, was not
doing what was required, which was to identify whether at least one animation was being run with acceleration. This method
is called under `RenderBox::requiresLayer()` and `RenderInline::requiresLayer()`.
This addresses the test regression with threaded animation resolution enabled.
* Source/WebCore/animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::hasAcceleratedEffects const):
* Source/WebCore/animation/KeyframeEffectStack.h:
(WebCore::KeyframeEffectStack::setAcceleratedEffects):
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::hasRunningAcceleratedAnimations const):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAcceleratedEffectsAndBaseValues):
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::hasRunningAcceleratedAnimations const):
(WebCore::Styleable::runningAnimationsAreAllAccelerated const): Deleted.
* Source/WebCore/style/Styleable.h:
Canonical link: https://commits.webkit.org/275178@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list