Index: client/html/src/Window.dart |
diff --git a/client/html/src/Window.dart b/client/html/src/Window.dart |
index e027c3bad29d521911b695699a830ab776ef5f5b..d2eae7616b3a27140524ff822bca8c50a4b33dbe 100644 |
--- a/client/html/src/Window.dart |
+++ b/client/html/src/Window.dart |
@@ -1,10 +1,7 @@ |
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-typedef void LayoutCallback(); |
-typedef LayoutCallback MeasurementCallback(); |
- |
interface WindowEvents extends Events { |
EventListenerList get abort(); |
EventListenerList get beforeUnload(); |
@@ -304,28 +301,19 @@ interface Window extends EventTarget { |
void webkitCancelRequestAnimationFrame(int id); |
+ // TODO(jacobr): make these return Future<Point>. |
Point webkitConvertPointFromNodeToPage([Node node, Point p]); |
+ |
Point webkitConvertPointFromPageToNode([Node node, Point p]); |
int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback, [Element element]); |
/** |
- * Executes [callback] after the event loop unwinds but before the page is |
- * rendered. Inside the callback, synchronous element measurement is |
- * allowed and dom manipulation that could trigger a layout is disallowed. |
- * The [callback] may return a closure that is run in the normal |
- * context where dom manipulation is allowed but sync measurement is |
- * disallowed. |
- */ |
- void requestMeasurementFrame(MeasurementCallback callback); |
- |
- /** |
- * True iff within a call to [:requestMeasurementFrame:] |
- * When inside a measurement frame, any DOM manipulation that could trigger |
- * a layout is prohibited to avoid accidentally triggering large numbers of |
- * layouts. |
+ * Executes a [callback] after the next batch of browser layout measurements |
+ * has completed or would have completed if any browser layout measurements |
+ * had been scheduled. |
*/ |
- bool get inMeasurementFrame(); |
+ void requestLayoutFrame(TimeoutHandler callback); |
// Window open(String url, String target, WindowSpec features); |