Bug 116900 - Animations do not restart after exiting page cache
Summary: Animations do not restart after exiting page cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-05-28 16:36 PDT by Dean Jackson
Modified: 2013-05-28 20:22 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.69 KB, patch)
2013-05-28 20:05 PDT, Dean Jackson
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2013-05-28 16:36:04 PDT
We suspend animations going into the page cache and do not resume them coming out.

<rdar://problem/14006844>
Comment 1 Dean Jackson 2013-05-28 20:05:44 PDT
Created attachment 203115 [details]
Patch
Comment 2 Tim Horton 2013-05-28 20:10:01 PDT
Comment on attachment 203115 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        was an error in r149576 which was checking a global suspended
> +        on the AnimationController and not trying to resume anything

a global suspended *what*.

> Source/WebCore/page/animation/AnimationController.cpp:-315
> -    if (!isSuspended())
> -        return;

How sure are we that there are no cases where this will accidentally get called twice/is there any potential downside to that?
Comment 3 Dean Jackson 2013-05-28 20:11:47 PDT
(In reply to comment #2)
> (From update of attachment 203115 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=203115&action=review
> 
> > Source/WebCore/ChangeLog:11
> > +        was an error in r149576 which was checking a global suspended
> > +        on the AnimationController and not trying to resume anything
> 
> a global suspended *what*.

:)

> 
> > Source/WebCore/page/animation/AnimationController.cpp:-315
> > -    if (!isSuspended())
> > -        return;
> 
> How sure are we that there are no cases where this will accidentally get called twice/is there any potential downside to that?

There is no downside. In fact, the code was originally like this for years, before I added the flag. I just got a bit overzealous when trying to return early.
Comment 4 Dean Jackson 2013-05-28 20:14:32 PDT
Committed r150862: <http://trac.webkit.org/changeset/150862>
Comment 5 Simon Fraser (smfr) 2013-05-28 20:22:29 PDT
<rdar://problem/14006844>