Bug 46525

Summary: When animations are paused, play-state can cause them to be unpaused.
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Chris Marrin <cmarrin>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
Bug Depends on: 46945    
Bug Blocks:    
Attachments:
Description Flags
Patch simon.fraser: review+

Description Simon Fraser (smfr) 2010-09-24 15:18:06 PDT
Load LayoutTests/animations/play-state.html, and just after the animation starts, pause animations. Note how the animations automatically resume when play-state changes.
Comment 1 Simon Fraser (smfr) 2010-09-24 15:18:37 PDT
<rdar://problem/8476959>
Comment 2 Chris Marrin 2010-11-02 11:00:51 PDT
Created attachment 72698 [details]
Patch
Comment 3 Simon Fraser (smfr) 2010-11-02 11:12:06 PDT
Comment on attachment 72698 [details]
Patch

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

> WebCore/ChangeLog:10
> +        "running" and not suspended. Likewise pauses animation when either
> +        flag is in the right state,

There's an incomplete sentence here.

> WebCore/page/animation/AnimationBase.cpp:1214
> +    bool wantToBePaused = playState == AnimPlayStatePaused || m_compAnim->suspended();

'wantToBePaused' confuses me. "shouldBePaused", or just "pause" perhaps?

> LayoutTests/animations/play-state-suspend.html:83
> +    runAnimationTest(expectedValues, setTimers, null, true);

Please annotate the parameters, or use variables to make the purposes of  'null' and 'true' clear.
Comment 4 Chris Marrin 2010-11-02 13:48:29 PDT
Made changes suggested by Simon and landed in http://trac.webkit.org/changeset/71161