Bug 67959 - Switching to previously-active tab disrupts CSS animations
Summary: Switching to previously-active tab disrupts CSS animations
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: Mac (Intel) OS X 10.6
: P2 Minor
Assignee: Nobody
URL: http://www.sinorwin.com/
Keywords: NeedsReduction
Depends on:
Blocks:
 
Reported: 2011-09-12 15:31 PDT by Daniel Morgan
Modified: 2012-03-06 12:30 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Morgan 2011-09-12 15:31:28 PDT
In Safari 5.1 (6534.50), switch to a different tab during an HTML animation (Canvas). When that tab is returned to, the animation behaves differently.
Comment 1 Alexey Proskuryakov 2011-09-12 23:15:40 PDT
I see that the animation is played at a much faster rate for a while after switching back to the tab with this site. In Firefox, the animation isn't stopped in background, and doesn't speed up after activating a tab.

Not sure if this is necessarily a WebKit bug.
Comment 2 Matthew Delaney 2011-09-12 23:32:16 PDT
By the platform choice of 10.6, did you mean to say that this bug only reproduces on 10.6?

Which canvas animations are you referring to? Also, since canvas animations are always driven by the firing of dom timers, the only thing I could imagine WebKit doing improperly that would cause this behavior would be giving timers sooner than requested. Furthermore, firing timers sooner would only cause this issue if the animation code of the site relied on getting the timers at the requested intervals - which is something that's not guaranteed. Thus, my guess is that the animation code of the site is the reason for the "faster rate". Though, if we're also consistently firing off timers faster than requested, then that sounds like a legitimate issue to investigate.
Comment 3 Simon Fraser (smfr) 2011-09-13 08:47:33 PDT
I don't see any canvas animations on http://www.sinorwin.com/
I do see CSS animations.
Comment 4 Dean Jackson 2011-09-13 15:38:42 PDT
> document.querySelector("canvas");
null
Comment 5 Dean Jackson 2011-09-13 15:45:28 PDT
I haven't investigated completely, but I suspect the bug could be that the HYPE heartbeat doesn't know that the animations paused for a while. It does a difference from an animationStartTime which might be out of date.

It would be nice to get a reduction here. I can't see a bug in WebKit at the moment.