Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 26589117d86d3ca8f966b8d3efa3da5fb549c3f9
https://github.com/WebKit/WebKit/commit/26589117d86d3ca8f966b8d3efa3da5fb549c3f9
Author: Ahmad Saleem <[email protected]>
Date: 2026-08-18 (Tue, 18 Aug 2026)
Changed paths:
A
LayoutTests/animations/transform-percent-in-single-keyframe-with-height-expected.html
A
LayoutTests/animations/transform-percent-in-single-keyframe-with-height.html
A
LayoutTests/animations/transform-percent-in-single-keyframe-with-width-expected.html
A
LayoutTests/animations/transform-percent-in-single-keyframe-with-width.html
A
LayoutTests/webanimations/size-dependent-transform-not-accelerated-expected.txt
A LayoutTests/webanimations/size-dependent-transform-not-accelerated.html
M Source/WebCore/animation/BlendingKeyframes.cpp
Log Message:
-----------
[web-animations] An animation of width or height is incorrectly accelerated
when only some keyframes have a size-dependent transform
https://bugs.webkit.org/show_bug.cgi?id=321975
rdar://185153675
Reviewed by Antoine Quint.
BlendingKeyframes::analyzeKeyframe() runs once per keyframe and accumulates
metadata about
the animation as a whole, but the size-dependent transform flags were assigned
rather than
or-ed in, so they described only the last keyframe analyzed. A later
size-independent
keyframe, a height-dependent keyframe following a width-dependent one, or the
CSSPropertyTranslate block following the CSSPropertyTransform block within a
single
keyframe would each wipe a dependency.
The flags feed computedNeedsForcedLayout(), computeHasSizeDependentTransform()
and the
RunningAccelerated::Prevented check in applyPendingAcceleratedActions(), so
losing one
lets the animation be committed to the compositor with no forced layout, where
RenderLayerBacking::startAnimation() bakes translateX(50%) against the stale,
pre-animation width and never updates it.
Accumulate with |=, matching every other lambda in analyzeKeyframe().
Tests: animations/transform-percent-in-single-keyframe-with-height.html
animations/transform-percent-in-single-keyframe-with-width.html
webanimations/size-dependent-transform-not-accelerated.html
*
LayoutTests/animations/transform-percent-in-single-keyframe-with-height-expected.html:
Added.
* LayoutTests/animations/transform-percent-in-single-keyframe-with-height.html:
Added.
*
LayoutTests/animations/transform-percent-in-single-keyframe-with-width-expected.html:
Added.
* LayoutTests/animations/transform-percent-in-single-keyframe-with-width.html:
Added.
*
LayoutTests/webanimations/size-dependent-transform-not-accelerated-expected.txt:
Added.
* LayoutTests/webanimations/size-dependent-transform-not-accelerated.html:
Added.
* Source/WebCore/animation/BlendingKeyframes.cpp:
(WebCore::BlendingKeyframes::analyzeKeyframe):
Canonical link: https://commits.webkit.org/319363@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications