WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 210526
WebAnimations API doesn't properly apply keyframe easings to transforms
https://bugs.webkit.org/show_bug.cgi?id=210526
Summary
WebAnimations API doesn't properly apply keyframe easings to transforms
Alan Orozco
Reported
2020-04-14 17:45:28 PDT
Created
attachment 396484
[details]
Safari (incorrect): Left box is animated with `top`. Right box is animated using `transform`. Both have the same keyframe easings. Overview: Animation effect definitions may include easing properties in each keyframe, like so: element.animate( [ { top: "0px", easing: "step-start" }, { top: "100px", easing: "step-start" }, { top: "0px", } ], 1000 ); These should define the timing of interpolations between frames, but the property is ignored when the keyframes include transforms. Steps to reproduce: Define an animation effect using a) transforms and b) easings per-keyframe. An example is hosted here:
https://webkit-animation-easing.glitch.me/easing.html
element.animate( [ { transform: "translateY(0px)", easing: "step-start" }, { transform: "translateY(100px)", easing: "step-start" }, { transform: "translateY(0px)", } ], 1000 ); Actual Results: See in example URL that keyframe easings are not respected for the element whose `transform` is animated. Expected results: Animation effect should respect easings, like it does for the element whose `top` is animated. Platform: Safari Version 13.1 (15609.1.20.111.8) macOS 10.15.4 (19E266) Additional Information: Attached video showing actual result.
Attachments
Safari (incorrect): Left box is animated with `top`. Right box is animated using `transform`. Both have the same keyframe easings.
(65.11 KB, video/quicktime)
2020-04-14 17:45 PDT
,
Alan Orozco
no flags
Details
(ignore this attachment, it was added accidentally)
(39.95 KB, video/quicktime)
2020-04-14 17:46 PDT
,
Alan Orozco
no flags
Details
Chrome (correct): Left box is animated with `top`. Right box is animated using `transform`. Both have the same keyframe easings.
(34.31 KB, video/quicktime)
2020-04-14 18:57 PDT
,
Alan Orozco
no flags
Details
Test showing CSS and Web Animations for top and transform
(2.97 KB, text/html)
2020-04-15 08:20 PDT
,
Antoine Quint
no flags
Details
Patch
(5.08 KB, patch)
2020-04-20 04:16 PDT
,
Antoine Quint
koivisto
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alan Orozco
Comment 1
2020-04-14 17:46:04 PDT
Created
attachment 396485
[details]
(ignore this attachment, it was added accidentally)
Radar WebKit Bug Importer
Comment 2
2020-04-14 18:10:50 PDT
<
rdar://problem/61800424
>
Alan Orozco
Comment 3
2020-04-14 18:57:30 PDT
Created
attachment 396488
[details]
Chrome (correct): Left box is animated with `top`. Right box is animated using `transform`. Both have the same keyframe easings.
Antoine Quint
Comment 4
2020-04-15 08:01:24 PDT
We don't support the "steps" family of timing functions for accelerated animations. We should opt out of the accelerated path in that case.
Antoine Quint
Comment 5
2020-04-15 08:20:50 PDT
Created
attachment 396538
[details]
Test showing CSS and Web Animations for top and transform Attaching a new test case that shows how CSS Animations behave correctly but not a JS-originated animation.
Antoine Quint
Comment 6
2020-04-15 08:23:48 PDT
I think we're not setting the per-keyframe timing functions in KeyframeEffect::updateBlendingKeyframes().
Antoine Quint
Comment 7
2020-04-20 04:16:39 PDT
Created
attachment 396965
[details]
Patch
Antoine Quint
Comment 8
2020-04-20 04:57:03 PDT
Committed
r260360
: <
https://trac.webkit.org/changeset/260360
>
Antti Koivisto
Comment 9
2020-04-20 04:58:03 PDT
Comment on
attachment 396965
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=396965&action=review
> LayoutTests/webanimations/transform-animation-with-steps-timing-function-not-accelerated.html:23 > + animation.ready.then(() => { > + // We wait for two frames to ensure an accelerated animation would have been committed. > + requestAnimationFrame(() => { > + requestAnimationFrame(() => { > + assert_equals(internals.acceleratedAnimationsForElement(target).length, 0, "The animation's target has no accelerated animation."); > + t.done(); > + }); > + }); > + });
This would read better with await
Antoine Quint
Comment 10
2020-06-05 01:31:11 PDT
***
Bug 212686
has been marked as a duplicate of this bug. ***
Antoine Quint
Comment 11
2020-06-23 11:45:25 PDT
This caused
bug 213495
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug