| Index: lib/html/frog/html_frog.dart
|
| diff --git a/lib/html/frog/html_frog.dart b/lib/html/frog/html_frog.dart
|
| index c63973efa2f88307cebe2c78beb577ffe9522cbd..b6c15e0ebfedaed23560919f3590e72cbb6647f6 100644
|
| --- a/lib/html/frog/html_frog.dart
|
| +++ b/lib/html/frog/html_frog.dart
|
| @@ -16375,38 +16375,23 @@ class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow
|
| }
|
|
|
| /** @domName DOMWindow.requestAnimationFrame */
|
| - int requestAnimationFrame(RequestAnimationFrameCallback callback) {
|
| - _ensureRequestAnimationFrame();
|
| - return _requestAnimationFrame(callback);
|
| - }
|
| -
|
| - void cancelAnimationFrame(id) {
|
| - _ensureRequestAnimationFrame();
|
| - _cancelAnimationFrame(id);
|
| - }
|
| -
|
| - int _requestAnimationFrame(RequestAnimationFrameCallback callback)
|
| - native 'requestAnimationFrame';
|
| -
|
| - void _cancelAnimationFrame(int id)
|
| - native 'cancelAnimationFrame';
|
| -
|
| - _ensureRequestAnimationFrame() native '''
|
| - if (this.requestAnimationFrame && this.cancelAnimationFrame) return;
|
| - vendors = ['ms', 'moz', 'webkit', 'o', ''];
|
| - for (var i = 0; i < vendors.length && !this.requestAnimationFrame; ++i) {
|
| - this.requestAnimationFrame = this[vendors[i] + 'RequestAnimationFrame'];
|
| - this.cancelAnimationFrame =
|
| - this[vendors[i]+'CancelAnimationFrame'] ||
|
| - this[vendors[i]+'CancelRequestAnimationFrame'];
|
| - }
|
| - if (this.requestAnimationFrame && this.cancelAnimationFrame) return;
|
| - this.requestAnimationFrame = function(callback) {
|
| - window.setTimeout(callback, 16 /* 16ms ~= 60fps */);
|
| - };
|
| - this.cancelAnimationFrame = function(id) { clearTimeout(id); }
|
| + int requestAnimationFrame(RequestAnimationFrameCallback callback) native '''
|
| + if (!window.requestAnimationFrame) {
|
| + window.requestAnimationFrame =
|
| + window.webkitRequestAnimationFrame ||
|
| + window.mozRequestAnimationFrame ||
|
| + window.msRequestAnimationFrame ||
|
| + window.oRequestAnimationFrame ||
|
| + function (callback) {
|
| + window.setTimeout(callback, 16 /* 16ms ~= 60fps */);
|
| + };
|
| + }
|
| + return window.requestAnimationFrame(callback);
|
| ''';
|
|
|
| + // Protect member 'requestAnimationFrame'.
|
| + _requestAnimationFrame() native 'requestAnimationFrame';
|
| +
|
|
|
| _WindowEventsImpl get on() =>
|
| new _WindowEventsImpl(this);
|
| @@ -34626,8 +34611,6 @@ interface Window extends EventTarget {
|
| /** @domName DOMWindow.webkitRequestAnimationFrame */
|
| int requestAnimationFrame(RequestAnimationFrameCallback callback);
|
|
|
| - void cancelAnimationFrame(int id);
|
| -
|
|
|
| /**
|
| * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent
|
|
|