Bug 32387 - Accelerated transitions broken when mixed with paused animations
Summary: Accelerated transitions broken when mixed with paused animations
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2009-12-10 11:51 PST by Simon Fraser (smfr)
Modified: 2009-12-11 12:58 PST (History)
4 users (show)

See Also:


Attachments
Testcase (1.71 KB, text/html)
2009-12-10 11:51 PST, Simon Fraser (smfr)
no flags Details
Patch (37.52 KB, patch)
2009-12-10 14:13 PST, Simon Fraser (smfr)
mitz: 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) 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