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

Unified Diff: lib/html/templates/html/impl/impl_Element.darttemplate

Issue 11367040: Removing Element.rect. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: lib/html/templates/html/impl/impl_Element.darttemplate
diff --git a/lib/html/templates/html/impl/impl_Element.darttemplate b/lib/html/templates/html/impl/impl_Element.darttemplate
index e7610dd97dfe677d9fcd1aa186c3bae53e7756d9..7bf82008fa48260698d8fcd9a658e1cac9d42dae 100644
--- a/lib/html/templates/html/impl/impl_Element.darttemplate
+++ b/lib/html/templates/html/impl/impl_Element.darttemplate
@@ -616,51 +616,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 $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
@@ -709,12 +664,6 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
}
}
- 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('');

Powered by Google App Engine
This is Rietveld 408576698