Bug 260255

Summary: REGRESSION (262875@main): animation of `rotate` property doesn't work if there's a `scale`
Product: WebKit Reporter: David Håsäther <hasather+webkitbugs>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: ahmad.saleem792, dino, graouts, graouts, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 17   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/42577
Attachments:
Description Flags
Animation bug
none
Bug with filter none

Description David Håsäther 2023-08-16 04:37:58 PDT
Created attachment 467288 [details]
Animation bug

See attached file.

The two animations should look the same. They do in all common browsers, including Safari 16, but no rotation is happening in Safari 17.
Comment 1 David Håsäther 2023-08-16 06:00:16 PDT
Created attachment 467289 [details]
Bug with filter

filter also disabled rotation, see new TC
Comment 2 Ahmad Saleem 2023-08-16 14:08:38 PDT
I am able to reproduce this bug on WebKit ToT (266957@main) as well and blurred does not flip like non-filtered text.
Comment 3 Radar WebKit Bug Importer 2023-08-16 18:14:33 PDT
<rdar://problem/113999490>
Comment 5 Antoine Quint 2023-10-16 06:48:56 PDT
The issue is that the animation here has two transform-related properties per keyframe: scale and rotate. In RenderLayerBacking::startAnimation() we call GraphicsLayerCA::addAnimation() twice as a result, once for scale and once for rotate, but in both cases we use the same animation name. Then in GraphicsLayerCA::createTransformAnimationsFromKeyframes() we will remove any animation with that same name which means only one of the two properties will end up being animated.

We need to find a way to keep the notion that these GraphicsLayerCA animations were generated from the same KeyframeEffect but also have a way to distinguish such animations when adding and removing them.
Comment 6 Antoine Quint 2023-10-17 01:44:52 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19157
Comment 7 Antoine Quint 2023-10-17 01:46:21 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/42577
Comment 8 EWS 2023-10-18 00:24:37 PDT
Committed 269453@main (add5da728e89): <https://commits.webkit.org/269453@main>

Reviewed commits have been landed. Closing PR #19157 and removing active labels.