Index: sky/framework/components/fixed_height_scrollable.dart |
diff --git a/sky/framework/components/fixed_height_scrollable.dart b/sky/framework/components/fixed_height_scrollable.dart |
index 7343b553037cb75738edd1ba3aa9c60aae38cef0..782f30b6f6ee900b8f9878e7b4b26ca9f2fb52c4 100644 |
--- a/sky/framework/components/fixed_height_scrollable.dart |
+++ b/sky/framework/components/fixed_height_scrollable.dart |
@@ -4,6 +4,7 @@ |
import '../animation/scroll_behavior.dart'; |
import '../fn.dart'; |
+import '../tracing.dart'; |
import 'dart:math' as math; |
import 'dart:sky' as sky; |
import 'dart:async'; |
@@ -30,22 +31,24 @@ abstract class FixedHeightScrollable extends Scrollable { |
}) : super(key: key, scrollBehavior: scrollBehavior); |
void _measureHeights() { |
- if (_itemHeight != null) |
- return; |
- var root = getRoot(); |
- if (root == null) |
- return; |
- var item = root.firstChild.firstChild; |
- if (item == null) |
- return; |
- sky.ClientRect scrollRect = root.getBoundingClientRect(); |
- sky.ClientRect itemRect = item.getBoundingClientRect(); |
- assert(scrollRect.height > 0); |
- assert(itemRect.height > 0); |
+ trace('FixedHeightScrollable::_measureHeights', () { |
+ if (_itemHeight != null) |
+ return; |
+ var root = getRoot(); |
+ if (root == null) |
+ return; |
+ var item = root.firstChild.firstChild; |
+ if (item == null) |
+ return; |
+ sky.ClientRect scrollRect = root.getBoundingClientRect(); |
+ sky.ClientRect itemRect = item.getBoundingClientRect(); |
+ assert(scrollRect.height > 0); |
+ assert(itemRect.height > 0); |
- setState(() { |
- _height = scrollRect.height; |
- _itemHeight = itemRect.height; |
+ setState(() { |
+ _height = scrollRect.height; |
+ _itemHeight = itemRect.height; |
+ }); |
}); |
} |