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

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

Issue 1209233002: Let's hide double.INFINITY a bit more, by providing cleaner APIs for the cases where we're currentl… (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/lib/rendering/box.dart ('k') | sky/sdk/lib/widgets/basic.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/rendering/stack.dart
diff --git a/sky/sdk/lib/rendering/stack.dart b/sky/sdk/lib/rendering/stack.dart
index be73d6f1aa4e4dd071f53d1f2c63b2601fcd18c7..84fa71bafcb0ea798c7fa8be78a4bc6f76b7c69e 100644
--- a/sky/sdk/lib/rendering/stack.dart
+++ b/sky/sdk/lib/rendering/stack.dart
@@ -70,7 +70,7 @@ class RenderStack extends RenderBox with ContainerRenderObjectMixin<RenderBox, S
child = child.parentData.nextSibling;
}
if (!hasNonPositionedChildren)
- return constraints.constrainWidth(double.INFINITY);
+ return constraints.constrainWidth();
assert(width == constraints.constrainWidth(width));
return width;
}
@@ -101,7 +101,7 @@ class RenderStack extends RenderBox with ContainerRenderObjectMixin<RenderBox, S
child = child.parentData.nextSibling;
}
if (!hasNonPositionedChildren)
- return constraints.constrainHeight(double.INFINITY);
+ return constraints.constrainHeight();
assert(height == constraints.constrainHeight(height));
return height;
}
@@ -140,8 +140,7 @@ class RenderStack extends RenderBox with ContainerRenderObjectMixin<RenderBox, S
else
size = constraints.constrain(Size.infinite);
- assert(size.width < double.INFINITY);
- assert(size.height < double.INFINITY);
+ assert(!size.isInfinite);
assert(size.width == constraints.constrainWidth(width));
assert(size.height == constraints.constrainHeight(height));
« no previous file with comments | « sky/sdk/lib/rendering/box.dart ('k') | sky/sdk/lib/widgets/basic.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698