Bug 32387

Summary: Accelerated transitions broken when mixed with paused animations
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, dino, ml, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Testcase
none
Patch mitz: review+

Description Simon Fraser (smfr) 2009-12-10 11:51:22 PST
Created attachment 44630 [details]
Testcase

The attached testcase shows a problem where paused animations interfere with hardware transitions.

When you load the testcase, the outer box should animate left, animate right, then animate left again. The bug is that the last animation fails; it jumps left at the end.
Comment 1 Simon Fraser (smfr) 2009-12-10 14:13:27 PST
Created attachment 44638 [details]
Patch
Comment 2 WebKit Review Bot 2009-12-10 14:17:48 PST
style-queue ran check-webkit-style on attachment 44638 [details] without any errors.
Comment 3 Simon Fraser (smfr) 2009-12-10 14:41:00 PST
<rdar://problem/7443031>
Comment 4 mitz 2009-12-11 11:48:15 PST
Comment on attachment 44638 [details]
Patch

>                      m_startTime = param;
> -
> +                
>                  // Decide whether to go into looping or ending state

Extra whitespace added there.

> -void KeyframeAnimation::endAnimation(bool reset)
> +void KeyframeAnimation::pauseAnimation(double timeOffset)
>  {
> -    if (m_object) {
> +    if (!m_object)
> +        return;
> +
> +    fprintf(stderr, "pausing animation, offset %f\n", timeOffset);

Please remove the fprintf.

> +    struct AnimationProcessingInfo {
> +        AnimationProcessingInfo(AnimationProcessingAction action = Remove, double timeOffset = 0)
> +            : action(action)
> +            , timeOffset(timeOffset) { }

The braces should go each on its own separate line:
           {
           }

Perhaps the struct should be called AnimationProcessingAction and the enum renamed to something else? Perhaps not.
Comment 5 Simon Fraser (smfr) 2009-12-11 12:58:52 PST
http://trac.webkit.org/changeset/52017