Bug 152504 - Pausing not showing current frame, when multiple animations are defined for same CSS selector - Safari only
Summary: Pausing not showing current frame, when multiple animations are defined for s...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari 9
Hardware: Mac OS X 10.10
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-12-22 08:52 PST by Givanildo Dantas Alves
Modified: 2023-05-10 10:36 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Givanildo Dantas Alves 2015-12-22 08:52:39 PST
Define two or more animation names for the same CSS selector, making sure the delay for each animation is higher than the duration of the previous animations

When the series of animations start, a pause always displays the last frame of the last animation, rather than the current frame of the current animation


A running example that surfaces the issue, having a series of three animations to change the background color

https://jsfiddle.net/mrgiba/qtco0dcr/


According to the CSS Animation specification (http://www.w3schools.com/css/css3_animations.asp), an animation that didn't start should not have any effect in the screen:

"An animation does not affect the computed value before the application of the animation, before the animation delay has expired, and after the end of the animation."
Comment 1 Simon Fraser (smfr) 2015-12-23 12:21:42 PST
(In reply to comment #0)
> Define two or more animation names for the same CSS selector, making sure
> the delay for each animation is higher than the duration of the previous
> animations
> 
> When the series of animations start, a pause always displays the last frame
> of the last animation, rather than the current frame of the current animation
> 
> 
> A running example that surfaces the issue, having a series of three
> animations to change the background color
> 
> https://jsfiddle.net/mrgiba/qtco0dcr/

I can reproduce, thanks the test case.

> According to the CSS Animation specification
> (http://www.w3schools.com/css/css3_animations.asp), an animation that didn't

w3schools.com :|
Comment 2 Givanildo Dantas Alves 2015-12-23 12:26:55 PST
Wrong link to CSS animations spec...

The correct one is http://www.w3.org/TR/css3-animations/

My appologies
Comment 3 Alexey Proskuryakov 2016-09-08 14:00:47 PDT
<rdar://problem/28213692>
Comment 4 Simon Fraser (smfr) 2016-10-01 21:32:25 PDT
Trivially, this is just about pausing an animation that hasn't started yet (pause before the delay time).
Comment 5 Simon Fraser (smfr) 2016-10-01 21:57:06 PDT
In AnimationBase::getElapsedTime() we have to handle the case where m_startTime == 0 but m_pauseTime is non-zero.
Comment 6 Antoine Quint 2023-05-10 10:36:23 PDT
This now behaves as expected.