From 1820da3a530d7e6ca84cd99798affae32620cd17 Mon Sep 17 00:00:00 2001 From: "blois@google.com" Date: Tue, 7 Jan 2014 23:33:46 +0000 Subject: [PATCH] Fixing Window.animationFrame timing issue Was using async completer which changes the timing. Additional Dartium changes are from https://codereview.chromium.org//111613002 which did not re-gen the Dartium file. BUG=15848 R=efortuna@google.com Review URL: https://codereview.chromium.org//98183006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31590 260f80e4-7a28-3924-810f-c04153c831b5 --- sdk/lib/html/dart2js/html_dart2js.dart | 2 +- sdk/lib/html/dartium/html_dartium.dart | 8 ++++---- tools/dom/templates/html/impl/impl_Window.darttemplate | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart index 674088352bf..8f4d3632dd3 100644 --- a/sdk/lib/html/dart2js/html_dart2js.dart +++ b/sdk/lib/html/dart2js/html_dart2js.dart @@ -27408,7 +27408,7 @@ class Window extends EventTarget implements WindowEventHandlers, WindowBase, Glo * [animationFrame] again for the animation to continue. */ Future get animationFrame { - var completer = new Completer(); + var completer = new Completer.sync(); requestAnimationFrame((time) { completer.complete(time); }); diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart index 765bce0d707..8742ae2fc7d 100644 --- a/sdk/lib/html/dartium/html_dartium.dart +++ b/sdk/lib/html/dartium/html_dartium.dart @@ -28972,13 +28972,13 @@ class Url extends NativeFieldWrapperClass2 implements UrlUtils { if ((blob_OR_source_OR_stream is Blob || blob_OR_source_OR_stream == null)) { return _createObjectURL_1(blob_OR_source_OR_stream); } - if ((blob_OR_source_OR_stream is MediaSource || blob_OR_source_OR_stream == null)) { + if ((blob_OR_source_OR_stream is MediaStream || blob_OR_source_OR_stream == null)) { return _createObjectURL_2(blob_OR_source_OR_stream); } - if ((blob_OR_source_OR_stream is _WebKitMediaSource || blob_OR_source_OR_stream == null)) { + if ((blob_OR_source_OR_stream is MediaSource || blob_OR_source_OR_stream == null)) { return _createObjectURL_3(blob_OR_source_OR_stream); } - if ((blob_OR_source_OR_stream is MediaStream || blob_OR_source_OR_stream == null)) { + if ((blob_OR_source_OR_stream is _WebKitMediaSource || blob_OR_source_OR_stream == null)) { return _createObjectURL_4(blob_OR_source_OR_stream); } throw new ArgumentError("Incorrect number or type of arguments"); @@ -30049,7 +30049,7 @@ class Window extends EventTarget implements WindowEventHandlers, WindowBase, Glo * [animationFrame] again for the animation to continue. */ Future get animationFrame { - var completer = new Completer(); + var completer = new Completer.sync(); requestAnimationFrame((time) { completer.complete(time); }); diff --git a/tools/dom/templates/html/impl/impl_Window.darttemplate b/tools/dom/templates/html/impl/impl_Window.darttemplate index d7dadf4408c..b84bb5f3fa4 100644 --- a/tools/dom/templates/html/impl/impl_Window.darttemplate +++ b/tools/dom/templates/html/impl/impl_Window.darttemplate @@ -27,7 +27,7 @@ $endif * [animationFrame] again for the animation to continue. */ Future get animationFrame { - var completer = new Completer(); + var completer = new Completer.sync(); requestAnimationFrame((time) { completer.complete(time); });