Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Issue 10161014: Browser compat for window.requestAnimationFrame (Closed)

Created:
8 years, 8 months ago by sra1
Modified:
8 years, 8 months ago
Reviewers:
vsm, dgrove, Jacob
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Browser compat for window.requestAnimationFrame Committed: https://code.google.com/p/dart/source/detail?r=6822

Patch Set 1 : #

Total comments: 5

Patch Set 2 : #

Patch Set 3 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -6 lines) Patch
M client/tests/client/client.status View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M client/tests/client/client-leg.status View 1 chunk +2 lines, -0 lines 0 comments Download
A client/tests/client/dom/RequestAnimationFrameTest.dart View 1 chunk +28 lines, -0 lines 0 comments Download
A client/tests/client/html/RequestAnimationFrameTest.dart View 1 chunk +28 lines, -0 lines 0 comments Download
M lib/dom/frog/dom_frog.dart View 1 2 chunks +23 lines, -5 lines 0 comments Download
M lib/dom/templates/dom/frog/impl_DOMWindow.darttemplate View 1 1 chunk +19 lines, -1 line 0 comments Download
M lib/dom/templates/html/dartium/impl_Window.darttemplate View 1 chunk +3 lines, -0 lines 0 comments Download
M lib/dom/templates/html/frog/impl_Window.darttemplate View 1 1 chunk +18 lines, -0 lines 0 comments Download
M lib/dom/templates/html/interface/interface_Window.darttemplate View 1 chunk +4 lines, -0 lines 0 comments Download
M lib/html/dartium/html_dartium.dart View 2 chunks +7 lines, -0 lines 0 comments Download
M lib/html/frog/html_frog.dart View 2 chunks +22 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
sra1
8 years, 8 months ago (2012-04-21 03:49:22 UTC) #1
vsm
lgtm https://chromiumcodereview.appspot.com/10161014/diff/2001/client/tests/client/client.status File client/tests/client/client.status (right): https://chromiumcodereview.appspot.com/10161014/diff/2001/client/tests/client/client.status#newcode29 client/tests/client/client.status:29: html/RequestAnimationFrameTest: Skip # drt hangs I think we ...
8 years, 8 months ago (2012-04-21 04:27:42 UTC) #2
dgrove
https://chromiumcodereview.appspot.com/10161014/diff/2001/lib/dom/frog/dom_frog.dart File lib/dom/frog/dom_frog.dart (right): https://chromiumcodereview.appspot.com/10161014/diff/2001/lib/dom/frog/dom_frog.dart#newcode1252 lib/dom/frog/dom_frog.dart:1252: function (callback) { window.setTimeout(callback, 1000/60); }; did you consider ...
8 years, 8 months ago (2012-04-21 04:47:49 UTC) #3
sra1
8 years, 8 months ago (2012-04-24 18:57:09 UTC) #4
https://chromiumcodereview.appspot.com/10161014/diff/2001/lib/dom/frog/dom_fr...
File lib/dom/frog/dom_frog.dart (right):

https://chromiumcodereview.appspot.com/10161014/diff/2001/lib/dom/frog/dom_fr...
lib/dom/frog/dom_frog.dart:1252: function (callback) {
window.setTimeout(callback, 1000/60); };
On 2012/04/21 04:47:49, dgrove wrote:
> did you consider something more like
> http://paulirish.com/2011/requestanimationframe-for-smart-animating/

tl;dr: yes.

This 'is' the first version at that page.
There is a long discussion of the 'clever' version at
https://gist.github.com/1579671
One commenter claimed the clever version was worse on iOS.
Another pointed out the behaviour is messed up if rAF is called twice.
We would have to measure and divine the correct behaviour if setTimeout is
actually being used.

https://chromiumcodereview.appspot.com/10161014/diff/2001/lib/dom/templates/h...
File lib/dom/templates/html/frog/impl_Window.darttemplate (right):

https://chromiumcodereview.appspot.com/10161014/diff/2001/lib/dom/templates/h...
lib/dom/templates/html/frog/impl_Window.darttemplate:21: function (callback) {
window.setTimeout(callback, 1000/60); };
On 2012/04/21 04:27:43, vsm wrote:
> why 1000/60?  a comment?

Done.

Powered by Google App Engine
This is Rietveld 408576698