Bug 46525 - When animations are paused, play-state can cause them to be unpaused.
Summary: When animations are paused, play-state can cause them to be unpaused.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Chris Marrin
URL:
Keywords: InRadar
Depends on: 46945
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-24 15:18 PDT by Simon Fraser (smfr)
Modified: 2010-11-02 13:48 PDT (History)
1 user (show)

See Also:


Attachments
Patch (7.02 KB, patch)
2010-11-02 11:00 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 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