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

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

Issue 1205953002: Version 0 of TabLabel, Tab, and TabBar components (Closed) Base URL: https://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/BUILD.gn ('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 90373caf3f99c7baf8dccbcef5d7f01cad1a46ea..3ab31711dfecd20e391903a295207dca87d4cdf8 100644
--- a/sky/sdk/lib/rendering/block.dart
+++ b/sky/sdk/lib/rendering/block.dart
@@ -28,11 +28,11 @@ class RenderBlock extends RenderBox with ContainerRenderObjectMixin<RenderBox, B
double getMinIntrinsicWidth(BoxConstraints constraints) {
double width = 0.0;
- BoxConstraints innerConstraints = new BoxConstraints(
- minWidth: constraints.minWidth, maxWidth: constraints.maxWidth);
+ BoxConstraints innerConstraints = constraints.widthConstraints();
RenderBox child = firstChild;
while (child != null) {
width = math.max(width, child.getMinIntrinsicWidth(innerConstraints));
+ assert(child.parentData is BlockParentData);
child = child.parentData.nextSibling;
}
return width;
@@ -40,11 +40,11 @@ class RenderBlock extends RenderBox with ContainerRenderObjectMixin<RenderBox, B
double getMaxIntrinsicWidth(BoxConstraints constraints) {
double width = 0.0;
- BoxConstraints innerConstraints = new BoxConstraints(
- minWidth: constraints.minWidth, maxWidth: constraints.maxWidth);
+ BoxConstraints innerConstraints = constraints.widthConstraints();
RenderBox child = firstChild;
while (child != null) {
width = math.max(width, child.getMaxIntrinsicWidth(innerConstraints));
+ assert(child.parentData is BlockParentData);
child = child.parentData.nextSibling;
}
return width;
@@ -63,6 +63,7 @@ class RenderBlock extends RenderBox with ContainerRenderObjectMixin<RenderBox, B
double childHeight = child.getMinIntrinsicHeight(innerConstraints);
assert(childHeight == child.getMaxIntrinsicHeight(innerConstraints));
height += childHeight;
+ assert(child.parentData is BlockParentData);
child = child.parentData.nextSibling;
}
return height;
« no previous file with comments | « sky/sdk/BUILD.gn ('k') | sky/sdk/lib/rendering/box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698