Bug 119171 - Allow new transitions to run even when controller is suspended
Summary: Allow new transitions to run even when controller is suspended
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:
Depends on:
Blocks:
 
Reported: 2013-07-26 17:14 PDT by Dean Jackson
Modified: 2013-07-26 17:56 PDT (History)
4 users (show)

See Also:


Attachments
Patch (14.08 KB, patch)
2013-07-26 17:25 PDT, Dean Jackson
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 Dean Jackson 2013-07-26 17:14:19 PDT
We fixed a bug where newly created CSS animations and transitions would run, even when the WebView had explicitly suspended animations. It turns out that some content in some clients actually relied on this behaviour :(

Add a flag to toggle back to the old buggy operation.
Comment 1 Dean Jackson 2013-07-26 17:14:36 PDT
<rdar://problem/14511404>
Comment 2 Dean Jackson 2013-07-26 17:25:23 PDT
Created attachment 207566 [details]
Patch
Comment 3 Simon Fraser (smfr) 2013-07-26 17:30:07 PDT
Comment on attachment 207566 [details]
Patch

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

> Source/WebCore/ChangeLog:21
> +        (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialize new flag to false.
> +        (WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): Expose getter.
> +        (WebCore::AnimationControllerPrivate::setAllowNewAnimationsWhileSuspended): Expose setter.
> +        (WebCore::AnimationController::allowNewAnimationsWhileSuspended): "Public" getter.
> +        (WebCore::AnimationController::setAllowNewAnimationsWhileSuspended): "Public" setter.

Are these up-to-date with the code changes?

> Source/WebCore/page/animation/AnimationController.h:81
> +    bool allowNewAnimationsWhileSuspended() const;
> +    void setAllowNewAnimationsWhileSuspended(bool);

allow -> allows

> Source/WebCore/page/animation/AnimationControllerPrivate.h:114
> +    bool allowNewAnimationsWhileSuspended() const { return m_allowNewAnimationsWhileSuspended; }
> +    void setAllowNewAnimationsWhileSuspended(bool);

allow -> allows

> Source/WebCore/page/animation/AnimationControllerPrivate.h:148
> +    bool m_allowNewAnimationsWhileSuspended;

allows. might want to add a comment to explain why this is here.

> Source/WebKit/mac/WebView/WebViewPrivate.h:568
> +- (BOOL)allowNewCSSAnimationsWhileSuspended;
> +- (void)setAllowNewCSSAnimationsWhileSuspended:(BOOL)allowed;

allows
Comment 4 Dean Jackson 2013-07-26 17:41:38 PDT
(In reply to comment #3)
> (From update of attachment 207566 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=207566&action=review
> 
> > Source/WebCore/ChangeLog:21
> > +        (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialize new flag to false.
> > +        (WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): Expose getter.
> > +        (WebCore::AnimationControllerPrivate::setAllowNewAnimationsWhileSuspended): Expose setter.
> > +        (WebCore::AnimationController::allowNewAnimationsWhileSuspended): "Public" getter.
> > +        (WebCore::AnimationController::setAllowNewAnimationsWhileSuspended): "Public" setter.
> 
> Are these up-to-date with the code changes?

Yes, other than a little error :)

Made other changes as requested.
Comment 5 Dean Jackson 2013-07-26 17:56:45 PDT
Committed r153396: <http://trac.webkit.org/changeset/153396>