RESOLVED FIXED 145465
Consider throttling DOM timers in iframes outside the viewport
https://bugs.webkit.org/show_bug.cgi?id=145465
Summary Consider throttling DOM timers in iframes outside the viewport
Chris Dumez
Reported 2015-05-29 13:16:01 PDT
Consider throttling DOM timers in iframe outside the viewport for performance and power reasons. Radar: <rdar://problem/20768957>
Attachments
Patch (15.53 KB, patch)
2015-05-29 13:36 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2015-05-29 13:36:59 PDT
Geoffrey Garen
Comment 2 2015-05-29 14:40:38 PDT
Comment on attachment 253910 [details] Patch What if the iframe has <audio> or is using the WebAudio API?
Chris Dumez
Comment 3 2015-05-29 15:13:13 PDT
(In reply to comment #2) > Comment on attachment 253910 [details] > Patch > > What if the iframe has <audio> or is using the WebAudio API? First of all, audio would only be a problem here is audio is somehow driven by timers. I don't know if there is content doing this but it seems unlikely to me because there is no guarantee your timer will fire *when* you ask it to. It all depends on the load of the system / browser. Also note that we already throttle timers in background pages and I use the same mechanism here for out-of-viewport iframes. So timer-driven audio would likely already be broken in the case of background pages. If this turns out to be an issue, we could restrict the throttling to cross-origin iframes for example.
WebKit Commit Bot
Comment 4 2015-05-29 16:02:56 PDT
Comment on attachment 253910 [details] Patch Clearing flags on attachment: 253910 Committed r185012: <http://trac.webkit.org/changeset/185012>
WebKit Commit Bot
Comment 5 2015-05-29 16:03:04 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.