415 Commits

Author SHA1 Message Date
Hixie
67769cb93b ImageFit.fitWidth/fitHeight and minor docs fixes 2016-03-25 12:31:27 -07:00
krisgiesing
cef24293b7 Merge pull request #2839 from krisgiesing/offscreen_layout
Allow independent rendering pipelines
2016-03-24 16:26:36 -07:00
Kris Giesing
bb5a82a726 Allow independent rendering pipelines
Fixes #2723
2016-03-24 14:59:21 -07:00
Adam Barth
9f5febc8cd Update ChildView after Mojo roll
The Mozart API has changed.
2016-03-23 11:05:31 -07:00
Ian Hickson
924480fcda Merge pull request #2843 from Hixie/nan-constraints
Handle NaNs in constraints, just in case.
2016-03-22 23:24:25 -07:00
Ian Hickson
9356c19dce Handle NaNs in constraints, just in case. 2016-03-22 22:53:40 -07:00
Ian Hickson
942840748a CustomPaint documentation
...followed all the way back to ImageCache, ImageInfo, ImageProvider,
and friends.
2016-03-22 21:36:44 -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
Ian Hickson
bef6ff3b06 Provide more documentation for MojoShell
As usual, as I was doing this I ran into some stuff that seemed hard
to document as-is and so I changed it. In this case, in the "http"
library. The new code is more or less equivalent, I think, but the
resulting documentation makes it more obvious that it's wrong...
2016-03-20 23:47:19 -07:00
Ian Hickson
e39a7c4144 Track metrics for RepaintBoundary.
Fixes https://github.com/flutter/flutter/issues/475
2016-03-19 09:36:33 -07:00
Hixie
7e3bef1163 Replace WidgetError and RenderingError with FlutterError 2016-03-18 15:40:38 -07:00
Adam Barth
addc87dcf1 Look for the keyboard in the view services
The engine now provides the keyboard and raw keyboard services via the view
services. This patch updates the framework to look there for the keyboard.
Also, this patch migrates callers to the new MojoServices name for these entry
points.
2016-03-18 14:05:51 -07:00
Hixie
9d1b1df6f3 Fix position of the overlay
Now that the overlay actually respects the position we give it, put it
somewhere where the keyboard won't overlap it.
2016-03-17 17:26:34 -07:00
Ian Hickson
bf42da35b2 Merge pull request #2753 from Hixie/binding-docs
Add some docs for people looking at bindings
2016-03-17 17:25:45 -07:00
Ian Hickson
a7490422de Merge pull request #2760 from Hixie/stack-docs
Improve Stack documentation.
2016-03-17 17:25:39 -07:00
P.Y. Laligand
fce6ecf699 Merge pull request #2770 from pylaligand/typos
Fixed some typos.
2016-03-17 17:07:49 -07:00
Adam Barth
c9d3217c3b Use Canvas#drawParagraph
We'll eventually remove Paragraph#paint.

Fixes #2694
2016-03-17 13:45:35 -07:00
Hixie
1d699b2146 Improve Stack documentation. 2016-03-17 13:28:58 -07:00
Hixie
de8ba53076 Add some docs for people looking at bindings 2016-03-17 09:52:52 -07:00
P.Y. Laligand
6f8c103e27 Fixed some typos. 2016-03-17 09:39:16 -07:00
Hixie
a4ee70c075 Flesh out rendering library top-level docs 2016-03-16 14:46:14 -07:00
Hixie
797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Adam Barth
afacec9a10 Improve error handling for ChildView outside MojoShell
Now we should some placeholder error text in-band in checked mode.

Fixes #2611
2016-03-14 13:11:19 -07:00
Adam Barth
d5b2e2a01c [rename fixit] Flex alignments
* justifyContent -> mainAxisAlignment
* alignItems -> crossAxisAlignment
* FlexJustifyContent -> MainAxisAlignment
* FlexAlignItems -> CrossAxisAlignment

Fixes #231
2016-03-12 18:33:47 -08:00
Adam Barth
726eff4953 [rename fixit] *OneChild* -> *SingleChild*
Fixes #1482
2016-03-12 12:33:39 -08:00
Adam Barth
e71bd77e4f [rename fixit] EdgeDims -> EdgeInsets
Fixes #1382
2016-03-12 12:33:38 -08:00
Adam Barth
b5923f9282 [rename fixit] Painter -> RenderObjectPainter
Fixes #774
2016-03-12 11:37:39 -08:00
Adam Barth
d78b78c494 [rename fixit] scrollAnchor -> anchor 2016-03-12 11:35:37 -08:00
Adam Barth
e9b8f4450b [rename fixit] scrollDirection -> mainAxis
Fixes #581
2016-03-12 11:35:24 -08:00
Adam Barth
19f615fc2f [rename fixit] MultiChildLayoutDelegate#isChild -> hasChild
Fixes #459
2016-03-12 11:13:10 -08:00
Hixie
6795efacab Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-12 00:37:31 -08:00
Ian Hickson
43b0104114 Revert "Merge pull request #2639 from Hixie/always_specify_types"
This reverts commit f41b3411da35929b09009e47cb52474389e42874, reversing
changes made to e33d8d96212f3e337a6660f1eb1118bffc945bf5.

This was a bad check-in due to my mangling uploading a new version of the branch from a different machine.

This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
2016-03-12 00:34:37 -08:00
Hixie
d162d98c79 Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-11 18:27:32 -08:00
Adam Barth
15f6480b0b Merge pull request #2628 from abarth/aspect_ratio
AspectRatio should attempt to fit its height
2016-03-11 15:58:02 -08:00
Adam Barth
6a54e12240 AspectRatio should attempt to fit its height
If there's not enough height for the given aspect ratio, we now try to see if
using the height to infer the width will fit the given constraints. The
algorithm we use is similar to the one we use for RenderImage.

Fixes #2620
2016-03-11 15:25:06 -08:00
Adam Barth
aee2ad5a28 Update engine 2016-03-11 15:03:42 -08:00
Adam Barth
e59b25b21f Add RotatedBox which applies a rotation before layout
Transform applies its transform before painting, but sometimes you want
the widget to layout after its transform has been applied. We can't
handle general tranforms in this way because we can't couple width and
height constriants, but we can handle certain rotations.

Fixes #1214
2016-03-11 12:23:41 -08:00
Ian Hickson
1b9cd52081 Enable ALL THE LINTS
Well, all the easy ones, anyway.

For some reason `// ignore:` isn't working for me so I've disabled
lints that need that. Also disabled those that require a ton of work
(which I'm doing, but not in this PR, to keep it reviewable).

This adds:
- avoid_init_to_null
- library_names
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- sort_constructors_first
- sort_unnamed_constructors_first
- unnecessary_getters_setters
2016-03-10 23:15:31 -08:00
Ian Hickson
7cf2dbdf37 Fix crash when dumping the app if it uses RichText
Specifically:

* Handle null styles in TextSpan without crashing in toString().

* Handle null children in TextSpan child lists without crashing in
  toString().

* Handle entirely empty TextSpans in toString() explicitly.

* Assert that TextSpans don't contain nulls in various places. This is
  done more often than one might think necessary, because it turns out
  that TextSpan takes a (mutable) List for one of its arguments, so
  who knows what it will contain at any given time. By asserting all
  over the place, hopefully we'll catch it near the change if they do
  change it.

* Add a RichText example to Stocks to exercise RichText and TextSpans.

See also: https://github.com/flutter/flutter/issues/2514, https://github.com/flutter/flutter/issues/2519
2016-03-10 20:48:50 -08:00
Hixie
a16f07d945 Drop the argument to SceneBuilder's constructor 2016-03-08 14:17:01 -08:00
Adam Barth
22dc5590c9 Merge pull request #2488 from abarth/custom_sized_by_parent
RenderCustomMultiChildLayoutBox shouldn't be sizedByParent
2016-03-08 12:49:11 -08:00
Adam Barth
cdc2aefc69 ImageFit.cover doesn't respect alignment
We need to apply the alignment to the source rect because the ouput rect fills
the destination rect.

Fixes #1514
2016-03-08 12:39:46 -08:00
Adam Barth
3fb0df878d RenderCustomMultiChildLayoutBox shouldn't be sizedByParent
The getSize function from MultiChildLayoutDelegate might depend on information
other than the incomming constraints.

Fixes #2077
2016-03-08 12:10:00 -08:00
Adam Barth
501b948e05 Remove bogus intrinsic size assert
This patch tweaks the definition of max intrinsic size to give implementations
more wiggle room to compute there intrinsic sizes more efficiently.
Specifically, implementations can now ignore the incomming constraint in the
cross axis if they prefer.

This patch removes an assert that is no longer valid w.r.t. the new definition
of intrinsic sizing.

Fixes #2099
2016-03-08 11:14:00 -08:00
Hixie
3d802075e2 Assert binding ready before getting a11y listener
This adds an assert to verify that we have already got a binding when we
get a semantics listener. Otherwise we crash. (I mean, we still crash,
but now in checked mode we crash on an assert instead. Progress?)
2016-03-07 16:37:45 -08:00
Hixie
79c3905eb6 Cleanup around viewports 2016-03-07 10:26:38 -08:00
Ian Hickson
8a2865ced3 Merge pull request #2249 from Hixie/size-obs-11
SizeObserver crusade: Remove SizeObserver
2016-03-07 10:11:06 -08:00
Ian Hickson
826b13bde3 Include more details in the Red Box of Doom 2016-03-06 23:00:03 -08:00
Ian Hickson
6bef1736c1 Remove the second argument to MultiChildLayoutDelegate.performLayout()
Fixes https://github.com/flutter/flutter/issues/2403

I have an e-mail ready to send to flutter-dev about this.
2016-03-06 12:28:28 -08:00