Summary: | Get rid of animation start, end and iteration timers | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Marrin <cmarrin> | ||||
Component: | CSS | Assignee: | Chris Marrin <cmarrin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | simon.fraser | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Chris Marrin
2008-12-08 11:05:13 PST
Created attachment 25848 [details] Patch to fix bug Fixed https://bugs.webkit.org/show_bug.cgi?id=22738 This gets rid of the per-animation timers which were used when an animation started, ended and looped. Their job is now done by the main AnimationController's timer. It is now set to fire as needed. For instance, if there is a delay, it will fire after the delay time and then every 30ms to run the animation. The start, loop and end events are generated as needed during the firing of this timer. I had to add one more bit of code. When animation timers used to fire the animation events. This would always happen from the RunLoop, so any style changes that happened in the event handler would get picked up on the next updateRendering() call. But now the start event is generated during the styleIsAvailable() call, which is in the middle of the updateRendering() cycle. And calling an event handler in the middle of updateRendering() is not allowed and causes style changes to get missed. We already have a mechanism in AnimationController to defer updateRendering() calls. So I added logic to defer all event handling to there. Now, I put any request for event handling into a list and ask for a deferred updateRendering() call. When that deferred timer fires, I go through that list, send all the events and then call updateRendering(). Comment on attachment 25848 [details]
Patch to fix bug
r=me
Sending WebCore/ChangeLog Sending WebCore/page/animation/AnimationBase.cpp Sending WebCore/page/animation/AnimationBase.h Sending WebCore/page/animation/AnimationController.cpp Sending WebCore/page/animation/AnimationController.h Sending WebCore/page/animation/CompositeAnimation.cpp Sending WebCore/page/animation/CompositeAnimation.h Sending WebCore/page/animation/ImplicitAnimation.cpp Sending WebCore/page/animation/ImplicitAnimation.h Sending WebCore/page/animation/KeyframeAnimation.cpp Sending WebCore/page/animation/KeyframeAnimation.h Transmitting file data ........... Committed revision 39211. |