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

Unified Diff: sky/sdk/lib/framework/rendering/box.dart

Issue 1161063005: Make FixedHeightScrollable understand heights (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months 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
« sky/sdk/lib/framework/fn2.dart ('K') | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/rendering/box.dart
diff --git a/sky/sdk/lib/framework/rendering/box.dart b/sky/sdk/lib/framework/rendering/box.dart
index 576c4b190e6c7ebe497954d50b80ec65b860ceb8..9c97a6cde328a474e5fcb2f7e1a27ecce88ae7eb 100644
--- a/sky/sdk/lib/framework/rendering/box.dart
+++ b/sky/sdk/lib/framework/rendering/box.dart
@@ -560,6 +560,28 @@ class RenderTransform extends RenderProxyBox {
}
}
+typedef void SizeChangedCallback(sky.Size newSize);
+
+class RenderSizeObserver extends RenderProxyBox {
+ RenderSizeObserver({
+ this.callback,
+ RenderBox child
+ }) : super(child) {
+ assert(callback != null);
+ }
+
+ SizeChangedCallback callback;
+
+ void performLayout() {
+ sky.Size oldSize = size;
+
+ super.performLayout();
+
+ if (oldSize != size)
+ callback(size);
+ }
+}
+
// RENDER VIEW LAYOUT MANAGER
« sky/sdk/lib/framework/fn2.dart ('K') | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698