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

Unified Diff: sky/sdk/lib/framework/rendering/box.dart

Issue 1177343002: Update paths in sky_home.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix touch demo and sector layout demos 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
Index: sky/sdk/lib/framework/rendering/box.dart
diff --git a/sky/sdk/lib/framework/rendering/box.dart b/sky/sdk/lib/framework/rendering/box.dart
index 993916962b25a2cf4a376f04e2836b8877d7c223..abc6c65e399108590b5862507c5365213fde5863 100644
--- a/sky/sdk/lib/framework/rendering/box.dart
+++ b/sky/sdk/lib/framework/rendering/box.dart
@@ -134,19 +134,12 @@ class BoxConstraints {
final double minHeight;
final double maxHeight;
- static double _clamp({double min: 0.0, double value: 0.0, double max: double.INFINITY}) {
- assert(min != null);
- assert(value != null);
- assert(max != null);
- return math.max(min, math.min(max, value));
- }
-
double constrainWidth(double width) {
- return _clamp(min: minWidth, max: maxWidth, value: width);
+ return clamp(min: minWidth, max: maxWidth, value: width);
}
double constrainHeight(double height) {
- return _clamp(min: minHeight, max: maxHeight, value: height);
+ return clamp(min: minHeight, max: maxHeight, value: height);
}
Size constrain(Size size) {
@@ -190,19 +183,19 @@ abstract class RenderBox extends RenderObject {
child.parentData = new BoxParentData();
}
- // getMinIntrinsicWidth() should return the minimum width that this box could
+ // getMinIntrinsicWidth() should return the minimum width that this box could
// be without failing to render its contents within itself.
double getMinIntrinsicWidth(BoxConstraints constraints) {
return constraints.constrainWidth(0.0);
}
- // getMaxIntrinsicWidth() should return the smallest width beyond which
+ // getMaxIntrinsicWidth() should return the smallest width beyond which
// increasing the width never decreases the height.
double getMaxIntrinsicWidth(BoxConstraints constraints) {
return constraints.constrainWidth(0.0);
}
- // getMinIntrinsicHeight() should return the minimum height that this box could
+ // getMinIntrinsicHeight() should return the minimum height that this box could
// be without failing to render its contents within itself.
double getMinIntrinsicHeight(BoxConstraints constraints) {
return constraints.constrainHeight(0.0);

Powered by Google App Engine
This is Rietveld 408576698