Chromium Code Reviews| Index: lib/dom/frog/dom_frog.dart |
| diff --git a/lib/dom/frog/dom_frog.dart b/lib/dom/frog/dom_frog.dart |
| index 5be3f4c1695d81e1f871924db819733a4d7ab32f..2e909161f8ed1b08fa7fb04473b1da3b491ccdf6 100644 |
| --- a/lib/dom/frog/dom_frog.dart |
| +++ b/lib/dom/frog/dom_frog.dart |
| @@ -1237,6 +1237,27 @@ class _DOMURLJs extends _DOMTypeJs implements DOMURL native "*DOMURL" { |
| class _DOMWindowJs extends _EventTargetJs implements DOMWindow native "@*DOMWindow" { |
| + Window get _top() native "return this.top;"; |
| + |
| + // Override top to return secure wrapper. |
| + Window get top() => _DOMWindowCrossFrameImpl._createSafe(_top); |
| + |
| + int requestAnimationFrame(RequestAnimationFrameCallback callback) native ''' |
| + if (!window.requestAnimationFrame) { |
| + window.requestAnimationFrame = |
| + window.webkitRequestAnimationFrame || |
| + window.mozRequestAnimationFrame || |
| + window.msRequestAnimationFrame || |
| + window.oRequestAnimationFrame || |
| + function (callback) { window.setTimeout(callback, 1000/60); }; |
|
dgrove
2012/04/21 04:47:49
did you consider something more like http://paulir
sra1
2012/04/24 18:57:09
tl;dr: yes.
This 'is' the first version at that p
|
| + } |
| + return window.requestAnimationFrame(callback); |
| +'''; |
| + |
| + // Protect member 'requestAnimationFrame'. |
| + _requestAnimationFrame() native 'requestAnimationFrame'; |
| + |
| + |
| static final int PERSISTENT = 1; |
| static final int TEMPORARY = 0; |
| @@ -1423,11 +1444,6 @@ class _DOMWindowJs extends _EventTargetJs implements DOMWindow native "@*DOMWind |
| void webkitResolveLocalFileSystemURL(String url, [EntryCallback successCallback = null, ErrorCallback errorCallback = null]) native; |
| - |
| - Window get _top() native "return this.top;"; |
| - |
| - // Override top to return secure wrapper. |
| - Window get top() => _DOMWindowCrossFrameImpl._createSafe(_top); |
| } |
| class _DataTransferItemJs extends _DOMTypeJs implements DataTransferItem native "*DataTransferItem" { |