| Index: client/html/src/DocumentWrappingImplementation.dart
|
| diff --git a/client/html/src/DocumentWrappingImplementation.dart b/client/html/src/DocumentWrappingImplementation.dart
|
| index 8db883f8b49694e1091e7478cf6acf8e77b39f92..0ff1802cde909bef23db141c8f3c05c1b8c35a18 100644
|
| --- a/client/html/src/DocumentWrappingImplementation.dart
|
| +++ b/client/html/src/DocumentWrappingImplementation.dart
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012 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,10 +82,9 @@ class DocumentWrappingImplementation extends ElementWrappingImplementation imple
|
| String get webkitVisibilityState() => _documentPtr.webkitVisibilityState;
|
|
|
| /** @domName caretRangeFromPoint */
|
| - Future<Range> caretRangeFromPoint([int x = null, int y = null]) {
|
| - return _createMeasurementFuture(
|
| - () => LevelDom.wrapRange(_documentPtr.caretRangeFromPoint(x, y)),
|
| - new Completer<Range>());
|
| + Range caretRangeFromPoint([int x = null, int y = null]) {
|
| + assert(_inMeasurementFrame);
|
| + return LevelDom.wrapRange(_documentPtr.caretRangeFromPoint(x, y));
|
| }
|
|
|
| /** @domName createEvent */
|
| @@ -94,14 +93,14 @@ class DocumentWrappingImplementation extends ElementWrappingImplementation imple
|
| }
|
|
|
| /** @domName elementFromPoint */
|
| - Future<Element> elementFromPoint([int x = null, int y = null]) {
|
| - return _createMeasurementFuture(
|
| - () => LevelDom.wrapElement(_documentPtr.elementFromPoint(x, y)),
|
| - new Completer<Element>());
|
| + Element elementFromPoint([int x = null, int y = null]) {
|
| + assert(_inMeasurementFrame);
|
| + return LevelDom.wrapElement(_documentPtr.elementFromPoint(x, y));
|
| }
|
|
|
| /** @domName execCommand */
|
| bool execCommand([String command = null, bool userInterface = null, String value = null]) {
|
| + assert(!_inMeasurementFrame);
|
| return _documentPtr.execCommand(command, userInterface, value);
|
| }
|
|
|
| @@ -140,7 +139,10 @@ class DocumentWrappingImplementation extends ElementWrappingImplementation imple
|
| String get manifest() => _ptr.manifest;
|
|
|
| /** @domName HTMLHtmlElement.manifest */
|
| - void set manifest(String value) { _ptr.manifest = value; }
|
| + void set manifest(String value) {
|
| + assert(!_inMeasurementFrame);
|
| + _ptr.manifest = value;
|
| + }
|
|
|
| DocumentEvents get on() {
|
| if (_on === null) {
|
|
|