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

Unified Diff: sky/sdk/lib/framework/layout2.dart

Issue 1146123003: Move simple_render_tree into tests as render_flex (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: now with expected.txt Created 5 years, 7 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/examples/raw/simple_render_tree.dart ('k') | sky/tests/raw/render_flex.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/layout2.dart
diff --git a/sky/sdk/lib/framework/layout2.dart b/sky/sdk/lib/framework/layout2.dart
index ee76408115da6b7fbc8ccdd1e91d4b68fba5ab7d..0dd44ca03de7ef63c6b4d03b92880e6699440ec9 100644
--- a/sky/sdk/lib/framework/layout2.dart
+++ b/sky/sdk/lib/framework/layout2.dart
@@ -825,19 +825,19 @@ class RenderBlock extends RenderDecoratedBox with ContainerRenderNodeMixin<Rende
void performLayout() {
assert(constraints is BoxConstraints);
- size.width = constraints.constrainWidth(constraints.maxWidth);
- assert(size.width < double.INFINITY);
+ double width = constraints.constrainWidth(constraints.maxWidth);
double y = 0.0;
- double innerWidth = size.width;
RenderBox child = firstChild;
while (child != null) {
- child.layout(new BoxConstraints(minWidth: innerWidth, maxWidth: innerWidth), parentUsesSize: true);
+ child.layout(new BoxConstraints(minWidth: width, maxWidth: width), parentUsesSize: true);
assert(child.parentData is BlockParentData);
child.parentData.position = new sky.Point(0.0, y);
y += child.size.height;
child = child.parentData.nextSibling;
}
- size.height = constraints.constrainHeight(y);
+ size = new sky.Size(width, constraints.constrainHeight(y));
+ assert(size.width < double.INFINITY);
+ assert(size.height < double.INFINITY);
}
void hitTestChildren(HitTestResult result, { sky.Point position }) {
« no previous file with comments | « sky/examples/raw/simple_render_tree.dart ('k') | sky/tests/raw/render_flex.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698