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

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

Issue 1181523002: Fix analyzer warnings (and probably also bugs) in flex.dart (Closed) Base URL: git@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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/rendering/flex.dart
diff --git a/sky/sdk/lib/framework/rendering/flex.dart b/sky/sdk/lib/framework/rendering/flex.dart
index 1ec8a8fff0333183b42f8a006d307952309fee89..4def9d2d094b03771cf28998d2003b74052f7593 100644
--- a/sky/sdk/lib/framework/rendering/flex.dart
+++ b/sky/sdk/lib/framework/rendering/flex.dart
@@ -118,11 +118,11 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
switch(_direction) {
case FlexDirection.horizontal:
childConstraints = new BoxConstraints(maxWidth: constraints.maxWidth);
- availableMainSpace = innerConstraints.maxWidth;
+ availableMainSpace = constraints.maxWidth;
break;
case FlexDirection.vertical:
childConstraints = new BoxConstraints(maxHeight: constraints.maxHeight);
- availableMainSpace = innerConstraints.maxHeight;
+ availableMainSpace = constraints.maxHeight;
break;
}
@@ -187,9 +187,9 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
// Ensure that we don't violate the given constraints with our result
switch(_direction) {
case FlexDirection.horizontal:
- return innerConstraints.constrainHeight(maxCrossSize);
+ return constraints.constrainHeight(maxCrossSize);
case FlexDirection.vertical:
- return innerConstraints.constrainWidth(maxCrossSize);
+ return constraints.constrainWidth(maxCrossSize);
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698