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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 12212200: "Reverting 18531" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/benchmark_smoke/benchmark_base.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index cc6eec381ba8cfce48928125599ff9252559af24..da1155c2dfcc23b6793ab85398a3f09a7f2faad1 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -28185,23 +28185,19 @@ class Window extends EventTarget implements WindowBase {
/**
* Executes a [callback] after the immediate execution stack has completed.
*
- * This differs from using Timer.run(callback)
- * because Timer will run in about 4-15 milliseconds, depending on browser,
- * depending on load. [setImmediate], in contrast, makes browser-specific
- * changes in behavior to attempt to run immediately after the current
- * frame unwinds, causing the future to complete after all processing has
+ * This will cause the callback to be executed after all processing has
* completed for the current event, but before any subsequent events.
*/
- void setImmediate(TimeoutHandler callback) {
+ void setImmediate(TimeoutHandler callback) {
_addMicrotaskCallback(callback);
}
+
/**
* Lookup a port by its [name]. Return null if no port is
* registered under [name].
*/
- SendPortSync lookupPort(String name) {
- var port =
- json.parse(document.documentElement.attributes['dart-port:$name']);
+ lookupPort(String name) {
+ var port = json.parse(document.documentElement.attributes['dart-port:$name']);
return _deserialize(port);
}
@@ -28210,26 +28206,9 @@ class Window extends EventTarget implements WindowBase {
* port may be retrieved by any isolate (or JavaScript script)
* running in this window.
*/
- void registerPort(String name, var port) {
+ registerPort(String name, var port) {
var serialized = _serialize(port);
- document.documentElement.attributes['dart-port:$name'] =
- json.stringify(serialized);
- }
-
- /**
- * Returns a Future that completes just before the window is about to repaint
- * so the user can draw an animation frame
- *
- * If you need to later cancel this animation, use [requestAnimationFrame]
- * instead.
- *
- * Note: The code that runs when the future completes should call
- * [animationFrame] again for the animation to continue.
- */
- Future<num> get animationFrame {
- var completer = new Completer<int>();
- requestAnimationFrame(completer.complete);
- return completer.future;
+ document.documentElement.attributes['dart-port:$name'] = json.stringify(serialized);
}
/// Checks if _setImmediate is supported.
@@ -28570,11 +28549,11 @@ class Window extends EventTarget implements WindowBase {
@DomName('DOMWindow.clearInterval')
@DocsEditable
- void _clearInterval(int handle) native "DOMWindow_clearInterval_Callback";
+ void clearInterval(int handle) native "DOMWindow_clearInterval_Callback";
@DomName('DOMWindow.clearTimeout')
@DocsEditable
- void _clearTimeout(int handle) native "DOMWindow_clearTimeout_Callback";
+ void clearTimeout(int handle) native "DOMWindow_clearTimeout_Callback";
@DomName('DOMWindow.close')
@DocsEditable
@@ -28669,11 +28648,11 @@ class Window extends EventTarget implements WindowBase {
@DomName('DOMWindow.setInterval')
@DocsEditable
- int _setInterval(TimeoutHandler handler, int timeout) native "DOMWindow_setInterval_Callback";
+ int setInterval(TimeoutHandler handler, int timeout) native "DOMWindow_setInterval_Callback";
@DomName('DOMWindow.setTimeout')
@DocsEditable
- int _setTimeout(TimeoutHandler handler, int timeout) native "DOMWindow_setTimeout_Callback";
+ int setTimeout(TimeoutHandler handler, int timeout) native "DOMWindow_setTimeout_Callback";
@DomName('DOMWindow.showModalDialog')
@DocsEditable
@@ -33866,11 +33845,11 @@ get _timerFactoryClosure => (int milliSeconds, void callback(Timer timer), bool
var maker;
var canceller;
if (repeating) {
- maker = window._setInterval;
- canceller = window._clearInterval;
+ maker = window.setInterval;
+ canceller = window.clearInterval;
} else {
- maker = window._setTimeout;
- canceller = window._clearTimeout;
+ maker = window.setTimeout;
+ canceller = window.clearTimeout;
}
Timer timer;
final int id = maker(() { callback(timer); }, milliSeconds);
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/benchmark_smoke/benchmark_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698