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

Unified Diff: samples/ui_lib/layout/ViewLayout.dart

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: samples/ui_lib/layout/ViewLayout.dart
diff --git a/samples/ui_lib/layout/ViewLayout.dart b/samples/ui_lib/layout/ViewLayout.dart
index f9373026fb6a4ed9be2760395998aedacc724407..8dcdee0c32b8a575f82348f4d2c3a00d306d8a70 100644
--- a/samples/ui_lib/layout/ViewLayout.dart
+++ b/samples/ui_lib/layout/ViewLayout.dart
@@ -71,7 +71,8 @@ class ViewLayout {
* to determine how this view should be laid out.
*/
LayoutParams layoutParams;
- Future<ElementRect> _cachedViewRect;
+ int _offsetWidth;
+ int _offsetHeight;
/** The view that this layout belongs to. */
final Positionable view;
@@ -105,15 +106,16 @@ class ViewLayout {
CSSStyleDeclaration get _style => layoutParams.style.value;
void cacheExistingBrowserLayout() {
- _cachedViewRect = view.node.rect;
+ _offsetWidth = view.node.offsetWidth;
+ _offsetHeight = view.node.offsetHeight;
}
int get currentWidth {
- return _cachedViewRect.value.offset.width;
+ return _offsetWidth;
}
int get currentHeight {
- return _cachedViewRect.value.offset.height;
+ return _offsetHeight;
}
int get borderLeftWidth => _toPixels(_style.borderLeftWidth);

Powered by Google App Engine
This is Rietveld 408576698