Bug 46540 - Resuming animations causes webkitAnimationStart events to be fired
Summary: Resuming animations causes webkitAnimationStart events to be fired
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Chris Marrin
Keywords: InRadar
Depends on: 46945
  Show dependency treegraph
Reported: 2010-09-24 17:07 PDT by Simon Fraser (smfr)
Modified: 2010-10-26 12:12 PDT (History)
1 user (show)

See Also:

Patch (7.75 KB, patch)
2010-10-26 11:42 PDT, Chris Marrin
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-09-24 17:07:57 PDT
When animations are resumed on AnimationController, webkitAnimationStarts are fired again.
Comment 1 Simon Fraser (smfr) 2010-09-24 17:08:35 PDT
Comment 2 Chris Marrin 2010-10-26 11:42:54 PDT
Created attachment 71920 [details]
Comment 3 Simon Fraser (smfr) 2010-10-26 11:48:10 PDT
Comment on attachment 71920 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=71920&action=review

r=me with some test tweaking.

> WebCore/page/animation/KeyframeAnimation.h:93
> +    bool m_startEventSent;

Maybe call this m_startEventDispatched?

> LayoutTests/animations/suspend-resume-animation-events.html:15
> +      -webkit-animation-duration: 1s;
> +      -webkit-animation-timing-function: linear;
> +      -webkit-animation-direction: alternate;
> +      -webkit-animation-iteration-count: 2;

It's a shame to add another animation test that takes significant time (slowing down the bots and everyone running tests). We should strive to make the test as brief as possible.

> LayoutTests/animations/suspend-resume-animation-events.html:64
> +    runAnimationTest(expectedValues, setTimers, undefined, true);

Please add inline comments (or use named variables) to explain what 'undefined' and 'true' mean.

> LayoutTests/animations/suspend-resume-animation-events.html:72
> +This test shows suspend and resume of a box moving to the right 500px and then back to 0px. If running inside 
> +DumpRenderTest the box should stop at 200px after 400ms. After another 600ms the move should resume and then 
> +continue to complete the move in another 1.6s.

This text is superfluous.
Comment 4 Chris Marrin 2010-10-26 12:12:51 PDT
Landed in http://trac.webkit.org/changeset/70553