Index: client/html/src/DocumentFragmentWrappingImplementation.dart |
diff --git a/client/html/src/DocumentFragmentWrappingImplementation.dart b/client/html/src/DocumentFragmentWrappingImplementation.dart |
index cea025fe819405bd6af155e81e841b5807c6f05d..843e918a230ceeebfa13c6c147eb35bac0e3a721 100644 |
--- a/client/html/src/DocumentFragmentWrappingImplementation.dart |
+++ b/client/html/src/DocumentFragmentWrappingImplementation.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. |
@@ -131,11 +131,6 @@ class EmptyStyleDeclaration extends CSSStyleDeclarationWrappingImplementation { |
} |
} |
-Future<CSSStyleDeclaration> _emptyStyleFuture() { |
- return _createMeasurementFuture(() => new EmptyStyleDeclaration(), |
- new Completer<CSSStyleDeclaration>()); |
-} |
- |
class EmptyElementRect implements ElementRect { |
final ClientRect client = const SimpleClientRect(0, 0, 0, 0); |
final ClientRect offset = const SimpleClientRect(0, 0, 0, 0); |
@@ -233,9 +228,10 @@ class DocumentFragmentWrappingImplementation extends NodeWrappingImplementation |
return _on; |
} |
- Future<ElementRect> get rect() { |
- return _createMeasurementFuture(() => const EmptyElementRect(), |
- new Completer<ElementRect>()); |
+ ElementRect get rect() { |
+ // A document fragment can never be attached to a Document so it always |
+ // safe to measure. |
+ return const EmptyElementRect(); |
} |
Element query(String selectors) => |
@@ -268,10 +264,9 @@ class DocumentFragmentWrappingImplementation extends NodeWrappingImplementation |
Set<String> get classes() => new Set<String>(); |
Map<String, String> get dataAttributes() => const {}; |
CSSStyleDeclaration get style() => new EmptyStyleDeclaration(); |
- Future<CSSStyleDeclaration> get computedStyle() => |
- _emptyStyleFuture(); |
- Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement) => |
- _emptyStyleFuture(); |
+ CSSStyleDeclaration get computedStyle() => new EmptyStyleDeclaration(); |
+ CSSStyleDeclaration getComputedStyle(String pseudoElement) => |
+ new EmptyStyleDeclaration(); |
bool matchesSelector([String selectors]) => false; |
// Imperative Element methods are made into no-ops, as they are on parentless |