Bug 26850 - CSS Animations need hooks for controls: pause/play, scrubbing
Summary: CSS Animations need hooks for controls: pause/play, scrubbing
Status: RESOLVED DUPLICATE of bug 54151
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Enhancement
Assignee: Nobody
URL: http://dev.w3.org/csswg/css3-animations/
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-30 11:36 PDT by Andy Matuschak
Modified: 2011-08-25 18:08 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Matuschak 2009-06-30 11:36:21 PDT
The new CSS animation functionality's great, but they're a little limited. I request:

1. The ability to pause and play animations. The animation-play-state property is deprecated (and unimplemented on the desktop), and it suggests that clients could get the computed state, remove the animation, and then set the style.

I implemented this, but it resulted in the animation appearing to flick backwards a few frames when paused, since it had proceeded somewhat in another thread after I'd computed the style but before I'd removed the animation. So this is not a workable alternative. And for what it's worth, that's a pretty ugly workaround.

2. Hooks for scrubbing. Specifically, to implement a decent scrubber, the client must be able to jump the animation to a particular point and query how far it has progressed.
Comment 1 Andy Matuschak 2009-06-30 16:09:23 PDT
A little more detail, as discussed in #webkit:

- If animation-play-state is to be left after all, it just needs to be implemented on the desktop, then the first part is resolved.

- The scrubbing hooks need a little care to account for the fact that a given element may have many animations applied to it. For a given (element, animation-name) tuple, I want to be able to get and set progress percentage or time. Time is a little interesting: while it makes intuitive sense (at least as relates to the percentage) for time to be relative to the animation's beginning, it might make sense to provide a variant which works in *global time*, which would count the animation-delay property time. That way, a scrubber moving from 0 to 10 seconds could pass the same value for all animations and get the expected results, without having to consider each animation's delay.
Comment 2 Dean Jackson 2011-08-25 18:08:00 PDT
I didn't see this bug when I started on 54151. It's got more info so using that as the original even though this is older.

*** This bug has been marked as a duplicate of bug 54151 ***