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

Unified Diff: client/html/src/DocumentWrappingImplementation.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 | « client/html/src/DocumentFragmentWrappingImplementation.dart ('k') | client/html/src/Element.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/src/DocumentWrappingImplementation.dart
diff --git a/client/html/src/DocumentWrappingImplementation.dart b/client/html/src/DocumentWrappingImplementation.dart
index 0ff1802cde909bef23db141c8f3c05c1b8c35a18..8db883f8b49694e1091e7478cf6acf8e77b39f92 100644
--- a/client/html/src/DocumentWrappingImplementation.dart
+++ b/client/html/src/DocumentWrappingImplementation.dart
@@ -1,4 +1,4 @@
-// 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.
@@ -82,9 +82,10 @@ class DocumentWrappingImplementation extends ElementWrappingImplementation imple
String get webkitVisibilityState() => _documentPtr.webkitVisibilityState;
/** @domName caretRangeFromPoint */
- Range caretRangeFromPoint([int x = null, int y = null]) {
- assert(_inMeasurementFrame);
- return LevelDom.wrapRange(_documentPtr.caretRangeFromPoint(x, y));
+ Future<Range> caretRangeFromPoint([int x = null, int y = null]) {
+ return _createMeasurementFuture(
+ () => LevelDom.wrapRange(_documentPtr.caretRangeFromPoint(x, y)),
+ new Completer<Range>());
}
/** @domName createEvent */
@@ -93,14 +94,14 @@ class DocumentWrappingImplementation extends ElementWrappingImplementation imple
}
/** @domName elementFromPoint */
- Element elementFromPoint([int x = null, int y = null]) {
- assert(_inMeasurementFrame);
- return LevelDom.wrapElement(_documentPtr.elementFromPoint(x, y));
+ Future<Element> elementFromPoint([int x = null, int y = null]) {
+ return _createMeasurementFuture(
+ () => LevelDom.wrapElement(_documentPtr.elementFromPoint(x, y)),
+ new Completer<Element>());
}
/** @domName execCommand */
bool execCommand([String command = null, bool userInterface = null, String value = null]) {
- assert(!_inMeasurementFrame);
return _documentPtr.execCommand(command, userInterface, value);
}
@@ -139,10 +140,7 @@ class DocumentWrappingImplementation extends ElementWrappingImplementation imple
String get manifest() => _ptr.manifest;
/** @domName HTMLHtmlElement.manifest */
- void set manifest(String value) {
- assert(!_inMeasurementFrame);
- _ptr.manifest = value;
- }
+ void set manifest(String value) { _ptr.manifest = value; }
DocumentEvents get on() {
if (_on === null) {
« no previous file with comments | « client/html/src/DocumentFragmentWrappingImplementation.dart ('k') | client/html/src/Element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698