Commit eba2d44f authored by Adam Barth's avatar Adam Barth

Merge pull request #2492 from abarth/intrinsics

Remove bogus intrinsic size assert
parents 4ff879b4 501b948e
......@@ -151,11 +151,6 @@ class RenderBlock extends RenderBlockBase {
double childExtent = isVertical ?
child.getMinIntrinsicHeight(innerConstraints) :
child.getMinIntrinsicWidth(innerConstraints);
assert(() {
if (isVertical)
return childExtent == child.getMaxIntrinsicHeight(innerConstraints);
return childExtent == child.getMaxIntrinsicWidth(innerConstraints);
});
extent += childExtent;
final BlockParentData childParentData = child.parentData;
child = childParentData.nextSibling;
......
......@@ -419,7 +419,7 @@ abstract class RenderBox extends RenderObject {
}
/// Returns the smallest width beyond which increasing the width never
/// decreases the height.
/// decreases the preferred height.
///
/// Override in subclasses that implement [performLayout].
double getMaxIntrinsicWidth(BoxConstraints constraints) {
......@@ -437,7 +437,7 @@ abstract class RenderBox extends RenderObject {
}
/// Returns the smallest height beyond which increasing the height never
/// decreases the width.
/// decreases the preferred width.
///
/// If the layout algorithm used is width-in-height-out, i.e. the height
/// depends on the width and not vice versa, then this will return the same
......
......@@ -166,7 +166,7 @@ abstract class GridDelegate {
}
/// Returns the smallest width beyond which increasing the width never
/// decreases the height.
/// decreases the preferred height.
double getMaxIntrinsicWidth(BoxConstraints constraints, int childCount) {
return constraints.constrainWidth(_getGridSize(constraints, childCount).width);
}
......@@ -178,7 +178,7 @@ abstract class GridDelegate {
}
/// Returns the smallest height beyond which increasing the height never
/// decreases the width.
/// decreases the preferred width.
double getMaxIntrinsicHeight(BoxConstraints constraints, int childCount) {
return constraints.constrainHeight(_getGridSize(constraints, childCount).height);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment