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

Unified Diff: sky/sdk/lib/rendering/block.dart

Issue 1195113002: Improve stocks2 performance (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
« no previous file with comments | « sky/sdk/lib/painting/text_style.dart ('k') | sky/sdk/lib/rendering/box.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/block.dart
diff --git a/sky/sdk/lib/rendering/block.dart b/sky/sdk/lib/rendering/block.dart
index d66c1cd1492c64343218f89381a836d1e755e3c6..420c0d4687ab56c934fa5c8e54d9ed14c83584f4 100644
--- a/sky/sdk/lib/rendering/block.dart
+++ b/sky/sdk/lib/rendering/block.dart
@@ -80,11 +80,12 @@ class RenderBlock extends RenderBox with ContainerRenderObjectMixin<RenderBox, B
void performLayout() {
assert(constraints is BoxConstraints);
double width = constraints.constrainWidth(constraints.maxWidth);
+ bool usesChildSize = !constraints.hasTightHeight;
BoxConstraints innerConstraints = _getInnerConstraintsForWidth(width);
double y = 0.0;
RenderBox child = firstChild;
while (child != null) {
- child.layout(innerConstraints, parentUsesSize: true);
+ child.layout(innerConstraints, parentUsesSize: usesChildSize);
assert(child.parentData is BlockParentData);
child.parentData.position = new Point(0.0, y);
y += child.size.height;
« no previous file with comments | « sky/sdk/lib/painting/text_style.dart ('k') | sky/sdk/lib/rendering/box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698