Bug 241020 - Web Animation, effect easing with 2 keyframes does not yield same result as keyframe easing with 2 keyframes
Summary: Web Animation, effect easing with 2 keyframes does not yield same result as k...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-27 08:13 PDT by Liam DeBeasi
Modified: 2022-06-01 01:18 PDT (History)
4 users (show)

See Also:


Attachments
Code reproduction (1.38 KB, text/html)
2022-05-27 08:13 PDT, Liam DeBeasi
no flags Details
Comparison video (3.51 MB, video/quicktime)
2022-05-31 06:19 PDT, Liam DeBeasi
no flags Details
Raw comparison video (495.42 KB, video/mp4)
2022-05-31 06:21 PDT, Liam DeBeasi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Liam DeBeasi 2022-05-27 08:13:23 PDT
Created attachment 459813 [details]
Code reproduction

Using an effect easing with 2 keyframes does not yield the same visual result as using a keyframe easing on the same set of keyframes.

Steps to reproduce:

1. Open the attached code reproduction on Safari (iOS or macOS).
2. Tap "Effect Easing". Observe that the square jumps up in the final frames of the animation.
3. Tap "Keyframe Easing". Observe that the square does not jump up in the final frames of the animation.

Expected Behavior:

I expect the effect easing to produce the same smooth result as the keyframe easing.

Actual Behavior:

The effect easing produces a behavior where the square jumps up in the final frames of the animation.

Other Information:

- I realize effect easing and keyframe easing are different, but in this scenario it seems like they should produce visually equivalent results.
- I cannot reproduce this behavior on Chrome or Firefox.
Comment 1 Radar WebKit Bug Importer 2022-05-30 00:50:32 PDT
<rdar://problem/94105470>
Comment 2 Antoine Quint 2022-05-30 00:55:21 PDT
Hi Liam. Both animations look identical to me in Safari Technology Preview 146 and Safari 15.5 in the macOS 12.5 seed. What Safari version did you reproduce this with?
Comment 3 Liam DeBeasi 2022-05-31 06:19:25 PDT
Created attachment 459886 [details]
Comparison video

I reproduced this on iOS Safari 15.6 and macOS 12.4.

I attached a side by side comparison. On the left is the (bad) effect easing, and on the right is the (good) keyframe easing.

A few things to notice:

1. When clicking the buttons to start the animation, the effect easing still shows the square on the first frame, whereas the keyframe easing has the square offscreen. (At time t = 3 seconds).
2. This causes the effect easing to be "behind" the keyframe easing. (At t = 8 seconds)
3. At t = 27 seconds, observe that effects are at the same position in their playback. In the video, I press the right arrow key to proceed to the next frame. Observe that the effect easing square jumps up by multiple pixels and is at the end of its playback. Observe that the keyframe easing moves up by fewer pixels than the effect easing did. When I press the right arrow key again, the effect easing does not move at all, but the keyframe easing does.
Comment 4 Liam DeBeasi 2022-05-31 06:21:23 PDT
Created attachment 459887 [details]
Raw comparison video

I am also attaching the comparison video I used if you would prefer to step through this video instead. It shows side by side playback of the effect and keyframe easing animations.
Comment 5 Antoine Quint 2022-06-01 01:18:27 PDT
There appears to be a single frame difference.