Commit 3fc7265a authored by Adam Barth's avatar Adam Barth Committed by GitHub

Switch from Size.isInfinite to Size.isFinite (#8868)

Fixes #4301
parent f1c2d784
...@@ -150,7 +150,7 @@ class RenderBlock extends RenderBox ...@@ -150,7 +150,7 @@ class RenderBlock extends RenderBox
break; break;
} }
assert(!size.isInfinite); assert(size.isFinite);
} }
@override @override
......
...@@ -1533,7 +1533,7 @@ abstract class RenderBox extends RenderObject { ...@@ -1533,7 +1533,7 @@ abstract class RenderBox extends RenderObject {
); );
} }
// verify that the size is not infinite // verify that the size is not infinite
if (_size.isInfinite) { if (!_size.isFinite) {
final StringBuffer information = new StringBuffer(); final StringBuffer information = new StringBuffer();
if (!constraints.hasBoundedWidth) { if (!constraints.hasBoundedWidth) {
RenderBox node = this; RenderBox node = this;
...@@ -1658,7 +1658,7 @@ abstract class RenderBox extends RenderObject { ...@@ -1658,7 +1658,7 @@ abstract class RenderBox extends RenderObject {
void performResize() { void performResize() {
// default behavior for subclasses that have sizedByParent = true // default behavior for subclasses that have sizedByParent = true
size = constraints.smallest; size = constraints.smallest;
assert(!size.isInfinite); assert(size.isFinite);
} }
@override @override
......
...@@ -370,7 +370,7 @@ class RenderStack extends RenderBox ...@@ -370,7 +370,7 @@ class RenderStack extends RenderBox
size = constraints.biggest; size = constraints.biggest;
} }
assert(!size.isInfinite); assert(size.isFinite);
child = firstChild; child = firstChild;
while (child != null) { while (child != null) {
......
...@@ -108,7 +108,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox> ...@@ -108,7 +108,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
_orientation = configuration.orientation; _orientation = configuration.orientation;
} }
_size = configuration.size; _size = configuration.size;
assert(!_size.isInfinite); assert(_size.isFinite);
if (child != null) if (child != null)
child.layout(new BoxConstraints.tight(_size)); child.layout(new BoxConstraints.tight(_size));
......
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