5 Commits

Author SHA1 Message Date
Ian Hickson
ecf1cce82c Provide details when reporting invalid constraints (#3281)
This also shrinks the width of the error messages a bit because now that
we use 'package:' URLs the stacks are a bit narrower.
2016-04-12 15:42:00 -07:00
Ian Hickson
47f5c6f2e0 Add even more careful checks around BoxConstraints (#3243)
I ran into a case where I was setting minHeight=∞ and then calling
layout() with that constraint, which is all kinds of bad. To try to
catch this earlier, this patch now provides a way to catch constraints
that are requiring infinite values.

We don't _always_ check this because there are valid uses for
BoxConstraints.biggest, e.g. as an additionalConstraint.
2016-04-11 11:10:11 -07:00
Ian Hickson
9356c19dce Handle NaNs in constraints, just in case. 2016-03-22 22:53:40 -07:00
Hixie
34cc0c4728 Rationalise the overflow render boxes
New RenderAligningShiftedBox abstract class for render boxes with
"alignment", which as of now is:

 - RenderPositionedBox
 - RenderConstrainedOverflowBox (ex RenderOverflowBox)
 - RenderSizedOverflowBox
 - RenderFractionallySizedOverflowBox (ex RenderFractionallySizedBox)

(The respective widgets are Align, OverflowBox, SizedOverflowBox, and
FractionallySizedBox. They haven't been renamed.)

Also I added some toString details.
2016-03-22 14:06:49 -07:00
Hixie
71976b306b Fix RenderFractionallySizedBox's constraints logic
Fixes https://github.com/flutter/flutter/issues/2735
2016-03-22 10:29:43 -07:00