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

Unified Diff: client/html/release/html.dart

Issue 9145004: Revert "Example showing alternate async measurement solution" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/html/release/htmlimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/release/html.dart
diff --git a/client/html/release/html.dart b/client/html/release/html.dart
index 55763d5c704a1b5eac6e89b0ad910fac69edd551..7cde3370964ea4f173c2e83ae43aa09982283766 100644
--- a/client/html/release/html.dart
+++ b/client/html/release/html.dart
@@ -11294,7 +11294,7 @@ interface DeviceOrientationEvent extends Event default DeviceOrientationEventWra
num get gamma();
}
-// 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.
@@ -11355,11 +11355,9 @@ interface Document extends Element /*, common.NodeSelector */ {
String get webkitVisibilityState();
- /** Only call when [window.inMeasurementFrame] is true. */
- Range caretRangeFromPoint([int x, int y]);
+ Future<Range> caretRangeFromPoint([int x, int y]);
- /** Only call when [window.inMeasurementFrame] is true. */
- Element elementFromPoint([int x, int y]);
+ Future<Element> elementFromPoint([int x, int y]);
bool execCommand([String command, bool userInterface, String value]);
@@ -11382,6 +11380,8 @@ interface Document extends Element /*, common.NodeSelector */ {
void set manifest(String value);
DocumentEvents get on();
+
+ Future<ElementRect> get rect();
}
// 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
@@ -11432,7 +11432,7 @@ interface DOMApplicationCache extends EventTarget {
DOMApplicationCacheEvents get on();
}
-// 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.
@@ -11442,6 +11442,10 @@ interface ElementList extends List<Element> {
// TODO(jacobr): add insertAt
}
+class DeferredElementRect {
+ // TODO(jacobr)
+}
+
interface ElementEvents extends Events {
EventListenerList get abort();
EventListenerList get beforeCopy();
@@ -11615,14 +11619,11 @@ interface Element extends Node /*, common.NodeSelector, common.ElementTraversal
bool matchesSelector([String selectors]);
- /** Only access members when [window.inMeasurementFrame] is true. */
- ElementRect get rect();
+ Future<ElementRect> get rect();
- /** Only call when [window.inMeasurementFrame] is true. */
- CSSStyleDeclaration get computedStyle();
+ Future<CSSStyleDeclaration> get computedStyle();
- /** Only call when [window.inMeasurementFrame] is true. */
- CSSStyleDeclaration getComputedStyle(String pseudoElement);
+ Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement);
ElementEvents get on();
@@ -12485,7 +12486,7 @@ interface MutationEvent extends Event default MutationEventWrappingImplementatio
Node get relatedNode();
}
-// 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.
@@ -12521,8 +12522,6 @@ interface Node extends EventTarget {
Node insertBefore(Node newChild, Node refChild);
Node clone(bool deep);
-
- bool get _inDocument();
}
// 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
@@ -13067,13 +13066,10 @@ interface WheelEvent extends UIEvent default WheelEventWrappingImplementation {
int get y();
}
-// 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();
@@ -13373,28 +13369,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);
« no previous file with comments | « no previous file | client/html/release/htmlimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698