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

Side by Side Diff: tools/dom/templates/html/impl/impl_Window.darttemplate

Issue 2117103004: Don't call _ensureRequestAnimationFrame in Dartium. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 typedef void RemoveFrameRequestMapping(int id); 7 typedef void RemoveFrameRequestMapping(int id);
8 8
9 /** 9 /**
10 * The task object representing animation-frame requests. 10 * The task object representing animation-frame requests.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 /** 239 /**
240 * Cancels an animation frame request. 240 * Cancels an animation frame request.
241 * 241 *
242 * ## Other resources 242 * ## Other resources
243 * 243 *
244 * * [Window.cancelAnimationFrame](https://developer.mozilla.org/en-US/docs/We b/API/Window.cancelAnimationFrame) 244 * * [Window.cancelAnimationFrame](https://developer.mozilla.org/en-US/docs/We b/API/Window.cancelAnimationFrame)
245 * from MDN. 245 * from MDN.
246 */ 246 */
247 @DomName('Window.cancelAnimationFrame') 247 @DomName('Window.cancelAnimationFrame')
248 void cancelAnimationFrame(int id) { 248 void cancelAnimationFrame(int id) {
249 $if DART2JS
249 _ensureRequestAnimationFrame(); 250 _ensureRequestAnimationFrame();
251 $endif
250 var task = AnimationFrameTask._tasks.remove(id); 252 var task = AnimationFrameTask._tasks.remove(id);
251 if (task == null) { 253 if (task == null) {
252 // Assume that the animation frame request wasn't intercepted by a zone. 254 // Assume that the animation frame request wasn't intercepted by a zone.
253 _cancelAnimationFrame(id); 255 _cancelAnimationFrame(id);
254 return; 256 return;
255 } 257 }
256 task.cancel(this); 258 task.cancel(this);
257 } 259 }
258 260
259 $if DART2JS 261 $if DART2JS
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 {bool useCapture: false}) { 481 {bool useCapture: false}) {
480 $if DART2JS 482 $if DART2JS
481 // Specify the generic type for _ElementEventStreamImpl only in dart2js to 483 // Specify the generic type for _ElementEventStreamImpl only in dart2js to
482 // avoid checked mode errors in dartium. 484 // avoid checked mode errors in dartium.
483 return new _ElementListEventStreamImpl<BeforeUnloadEvent>(e, _eventType, use Capture); 485 return new _ElementListEventStreamImpl<BeforeUnloadEvent>(e, _eventType, use Capture);
484 $else 486 $else
485 return new _ElementListEventStreamImpl(e, _eventType, useCapture); 487 return new _ElementListEventStreamImpl(e, _eventType, useCapture);
486 $endif 488 $endif
487 } 489 }
488 } 490 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698