| Index: lib/html/dart2js/html_dart2js.dart
|
| diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart
|
| index bfa451ad8402e6c8e23e3accaaa638dc1b76f443..efedcffac8a10a26553c950a713aafd175b4b9ff 100644
|
| --- a/lib/html/dart2js/html_dart2js.dart
|
| +++ b/lib/html/dart2js/html_dart2js.dart
|
| @@ -10354,16 +10354,6 @@ Future<CSSStyleDeclaration> _emptyStyleFuture() {
|
| 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);
|
| - final ClientRect scroll = const _SimpleClientRect(0, 0, 0, 0);
|
| - final ClientRect bounding = const _SimpleClientRect(0, 0, 0, 0);
|
| - final List<ClientRect> clientRects = const <ClientRect>[];
|
| -
|
| - const EmptyElementRect();
|
| -}
|
| -
|
| class _FrozenCSSClassSet extends _CssClassSet {
|
| _FrozenCSSClassSet() : super(null);
|
|
|
| @@ -10456,11 +10446,6 @@ class _DocumentFragmentImpl extends _NodeImpl implements DocumentFragment native
|
| this.insertAdjacentHTML('beforeend', text);
|
| }
|
|
|
| - Future<ElementRect> get rect {
|
| - return _createMeasurementFuture(() => const EmptyElementRect(),
|
| - new Completer<ElementRect>());
|
| - }
|
| -
|
| // If we can come up with a semi-reasonable default value for an Element
|
| // getter, we'll use it. In general, these return the same values as an
|
| // element that has no parent.
|
| @@ -10990,20 +10975,6 @@ abstract class AttributeMap implements Map<String, String> {
|
| void operator []=(String key, value);
|
| }
|
|
|
| -/**
|
| - * All your element measurement needs in one place
|
| - */
|
| -abstract class ElementRect {
|
| - // Relative to offsetParent
|
| - ClientRect get client;
|
| - ClientRect get offset;
|
| - ClientRect get scroll;
|
| - // In global coords
|
| - ClientRect get bounding;
|
| - // In global coords
|
| - List<ClientRect> get clientRects;
|
| -}
|
| -
|
| abstract class NodeSelector {
|
| Element query(String selectors);
|
| List<Element> queryAll(String selectors);
|
| @@ -11060,13 +11031,6 @@ abstract class Element implements Node, NodeSelector {
|
| */
|
| void addHTML(String html);
|
|
|
| - /**
|
| - * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth,
|
| - * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft,
|
| - * scrollHeight, scrollWidth, scrollTop, scrollLeft
|
| - */
|
| - Future<ElementRect> get rect;
|
| -
|
| /** @domName Window.getComputedStyle */
|
| Future<CSSStyleDeclaration> get computedStyle;
|
|
|
| @@ -11998,51 +11962,6 @@ class _SimpleClientRect implements ClientRect {
|
| String toString() => "($left, $top, $width, $height)";
|
| }
|
|
|
| -// TODO(jacobr): we cannot currently be lazy about calculating the client
|
| -// rects as we must perform all measurement queries at a safe point to avoid
|
| -// triggering unneeded layouts.
|
| -/**
|
| - * All your element measurement needs in one place
|
| - * @domName none
|
| - */
|
| -class _ElementRectImpl implements ElementRect {
|
| - final ClientRect client;
|
| - final ClientRect offset;
|
| - final ClientRect scroll;
|
| -
|
| - // TODO(jacobr): should we move these outside of ElementRect to avoid the
|
| - // overhead of computing them every time even though they are rarely used.
|
| - final _ClientRectImpl _boundingClientRect;
|
| - final _ClientRectListImpl _clientRects;
|
| -
|
| - _ElementRectImpl(_ElementImpl element) :
|
| - client = new _SimpleClientRect(element.clientLeft,
|
| - element.clientTop,
|
| - element.clientWidth,
|
| - element.clientHeight),
|
| - offset = new _SimpleClientRect(element.offsetLeft,
|
| - element.offsetTop,
|
| - element.offsetWidth,
|
| - element.offsetHeight),
|
| - scroll = new _SimpleClientRect(element.scrollLeft,
|
| - element.scrollTop,
|
| - element.scrollWidth,
|
| - element.scrollHeight),
|
| - _boundingClientRect = element.getBoundingClientRect(),
|
| - _clientRects = element.getClientRects();
|
| -
|
| - _ClientRectImpl get bounding => _boundingClientRect;
|
| -
|
| - // TODO(jacobr): cleanup.
|
| - List<ClientRect> get clientRects {
|
| - final out = new List(_clientRects.length);
|
| - for (num i = 0; i < _clientRects.length; i++) {
|
| - out[i] = _clientRects.item(i);
|
| - }
|
| - return out;
|
| - }
|
| -}
|
| -
|
| class _ElementImpl extends _NodeImpl implements Element native "*Element" {
|
|
|
| /**
|
| @@ -12091,12 +12010,6 @@ class _ElementImpl extends _NodeImpl implements Element native "*Element" {
|
| }
|
| }
|
|
|
| - Future<ElementRect> get rect {
|
| - return _createMeasurementFuture(
|
| - () => new _ElementRectImpl(this),
|
| - new Completer<ElementRect>());
|
| - }
|
| -
|
| Future<CSSStyleDeclaration> get computedStyle {
|
| // TODO(jacobr): last param should be null, see b/5045788
|
| return getComputedStyle('');
|
|
|