627 Commits

Author SHA1 Message Date
Adam Barth
712eb969ea CustomSingleChildLayout should be able to resize (#7528)
It's not correct to set sizedByParent for
RenderCustomSingleChildLayoutBox because the delegate's size function
might depend on information other than the incoming constraints.
2017-01-18 16:33:42 -08:00
Adam Barth
40e305dc2d Fix analyzer warnings (#7523)
I see these errors in Atom on my Mac. I'm not sure why they're not being
picked up by the bots.
2017-01-18 13:18:09 -08:00
Matt Perry
75f39789c7 Add support for specifying maxLines for Text. (#7493)
Overflow handling works with clipping, adding an ellipsis on the last
line, or fading the last line.

Fixes https://github.com/flutter/flutter/issues/7271
2017-01-18 12:34:34 -05:00
Jason Simmons
3b702448fd Do not paint a RenderFittedBox with an empty size (#7489)
If the size is empty, then _updatePaintData will produce an invalid transform
that yields a NaN canvas bounds rectangle

Fixes https://github.com/flutter/flutter/issues/7431
2017-01-13 15:12:30 -08:00
Adam Barth
f5bd8976de Expose some text metrics on RenderParagraph (#7456)
The underlying TextPainter is not exposed, so this patch exposes some
useful metrics that clients might want to read.
2017-01-12 23:13:31 -08:00
Ian Hickson
d3faada983 Trivial improvement of AbstractNode docs. (#7399)
This confused me briefly the other day.
2017-01-09 16:33:40 -08:00
Ian Hickson
e82b18d47b The core RenderSliver protocol. (#7370)
This implements a new RenderViewport2 class to replace the existing
RenderViewport class.
2017-01-09 14:49:14 -08:00
Adam Barth
5b1e7c0a37 Rename TransferMode to BlendMode (#7357)
Skia calls this BlendMode now and that's a better name.

Fixes #7200
2017-01-06 00:07:47 -08:00
Ian Hickson
b0e8520ae6 Make LayoutCallback generic and other minor changes (#7367)
LayoutCallback passes constraints to the callback, but the constraints
object has a different type for different subclasses. This lets you
call invokeLayoutCallback() with a specific type to verify that
everything is working as expected.

Other changes:

Slightly improve the error reporting in RenderObject.

Allow toStringShallow on RenderObject to have its separator configured.
2017-01-05 22:12:08 -08:00
Ian Hickson
11d1d54c8a Changes to the drag gesture detectors and the velocity tracker (#7363)
- more dartdocs for the drag typedefs

- more toStrings to aid debugging

- require the position for DragUpdateDetails since we were omitting it
  in some places

- add the primaryVelocity to DragEndDetails so that consumers don't
  have to themselves track the axis in question

- fix the velocity tracker so that it doesn't walk the null data.
  Previously, near time t=0 (which pretty much only matters in tests,
  but it does matter there) we would walk the velocity data and then
  also walk missing data, treating it as Point.zero with t=0.

- simplify some of the velocity tracker; e.g. instead of trying (and
  failing?) to clear the velocity tracker when the pointer stalls,
  just drop the data before a stall during the velocity estimation
  (where we redundantly had another bigger horizon anyway).
2017-01-05 16:19:14 -08:00
Adam Barth
27970bd82d Remove package:flutter/cassowary.dart (#7350)
We didn't end up using this mechanism.
2017-01-05 13:08:43 -08:00
Alexandre Ardhuin
9eaaa91df7 use isEmpty and isNotEmpty (#7207) 2016-12-09 15:37:42 -08:00
Alexandre Ardhuin
b670ce4bcc prefer const constructor (#7118) 2016-12-01 09:43:08 -08:00
Hans Muller
440ddef69e Regression tests should verify that debug are not set (#7090) 2016-11-29 15:17:51 -08:00
Adam Barth
f36b218ed3 Remove ChildSceneLayer (#7052)
This Fuchsia-specific code is moving into Fuchsia itself.
2016-11-28 12:28:08 -08:00
Adam Barth
bb3815694c Improve the docs for CustomMultiChildLayout (#6980)
Fixes #5695
2016-11-23 00:26:14 -08:00
Adam Barth
8ca4caa440 Rename Flexible to Expanded and improve docs (#6978)
This patch replaces uses of Flexible with Expanded where we're using
FlexFit.tight. We still need to think of a better name for the
FlexFit.loose variant.

Also, improve the docs for Row, Column, Flex, and RenderFlex to be more
problem-oriented and to give a complete account of the layout algorithn.

Fixes #6960
Fixes #5169
2016-11-21 23:16:43 -08:00
Hans Muller
516ac574c0 Allow null DropdownButton values (#6971) 2016-11-21 16:36:19 -08:00
Ian Hickson
9c1a24fa72 Reexport meta from foundation. (#6938) 2016-11-18 21:22:32 -08:00
Ian Hickson
15fb5c4ca6 Clean up some RenderObject layer stuff (#6883)
More idiomatic use of constraints in performResize.

Trivial fixes to comments.

Make ProxyBox not use BoxParentData since it ignores the field.

Make applyPaintTransform more helpful if you use a different ParentData
subclass than RenderBox expects.

Make debugAssertIsValid actually fulfill its contract in RenderObject as
documented.

Add a childBefore for symmetry (we already had childAfter).

Fix the way we dump the child list when there's no children in a
multichild render object.

More asserts in the rendering test library.
2016-11-15 17:55:51 -08:00
Ian Hickson
18362ec61d Improve the debugDumpFoo output (#6882) 2016-11-15 16:53:03 -08:00
Ian Hickson
ece851d5cd Minor improvements to the render tree dump. (#6831)
Also fixes https://github.com/flutter/flutter/issues/6510
2016-11-14 11:18:46 -08:00
Jason Simmons
ca5e1f3f23 In the semantics tree, do not detach a child if it has already been assigned a new parent (#6773)
Fixes https://github.com/flutter/flutter/issues/6690

Also add a version of the Gallery smoke test that enables semantics
2016-11-10 12:55:56 -08:00
Ian Hickson
fcd47f84d2 CustomPaint size (#6790) 2016-11-09 20:50:43 -08:00
Ian Hickson
01a8d51022 Clean up abstract node docs (#6786) 2016-11-09 18:15:51 -08:00
Ian Hickson
b9c3871163 Add debug info to offstage renderer (#6789) 2016-11-09 18:10:50 -08:00
Chinmay Garde
1939ba12d2 Wire up checkerboarding of raster cache images in the framework and gallery. (#6749) 2016-11-09 11:36:17 -08:00
Ian Hickson
106ff33255 Detailed RenderBox and RenderObject docs (#6745) 2016-11-08 15:16:33 -08:00
Andrew Wilson
01ca34cd0c Add profiling for building and painting. (#6652) 2016-11-07 13:46:42 -08:00
Ian Hickson
2d9d4c2d3a Document typedefs better. (#6671) 2016-11-02 21:14:59 -07:00
Chris Bracken
438f4df00c Improve comment spelling consistency (#6622) 2016-11-01 09:20:52 -07:00
Adam Barth
018ab3f65b Default child lists to empty lists (#6592)
Fixes #6591
2016-10-30 20:10:33 -07:00
Adam Barth
7e539fea01 Remove flutter run_mojo (#6584)
This command is no longer needed. Also, remove some stray references to Mojo.
2016-10-28 16:24:57 -07:00
Jason Simmons
617fa8c3a9 Engine roll with updates to the ParagraphBuilder constructor (#6528) 2016-10-25 12:20:02 -07:00
Chris Bracken
8b197bddce Fix common typos in doc comments (#6520) 2016-10-25 10:06:42 -07:00
Chris Bracken
d4c2481e37 Fix doc comments typos (#6499) 2016-10-24 13:03:15 -07:00
Ian Hickson
a979022253 Improve Table's docs and asserts. (#6471) 2016-10-24 11:03:56 -07:00
Matt Perry
d39eb84ac4 Add a maxLines parameter for multiline Input. (#6328)
If maxLines is 1, it's a single line Input that scrolls horizontally.
Otherwise, overflowed text wraps and scrolls vertically, taking up at
most `maxLines`.

Also fixed scrolling behavior so that the Input scrolls ensuring the
cursor is always visible.

Fixes https://github.com/flutter/flutter/issues/6271
2016-10-19 17:18:16 -04:00
Matt Perry
97dbd9eacf Rename RawInputLine to RawInput, and RenderEditableLine to RenderEdit… (#6401)
They support multiline text now.
2016-10-19 17:17:51 -04:00
Adam Barth
c77798a384 PaintingContext should say when alwaysNeedsCompositing is needed (#6338)
Also, update the docs to point to the correct property.

Fixes #6224
2016-10-17 12:35:19 -07:00
Adam Barth
8b16c0252d Add custom clipping to ClipRRect (#6346)
Fixes #773
2016-10-17 11:16:26 -07:00
Adam Barth
93d757c3e0 Dismissable should cull and clip background (#6325)
When not dismissing, the Dismissable widget should cull its background.
When a dismiss is in progress, it should clip the background to just the
part that is revealed.

Fixes #6127
2016-10-14 13:32:56 -07:00
Matt Perry
c13a6e275b Add a maxLines parameter for multiline Input. (#6310)
* Add a maxLines parameter for multiline Input.

If maxLines is 1, it's a single line Input that scrolls horizontally.
Otherwise, overflowed text wraps and scrolls vertically, taking up at
most `maxLines`.

Also fixed scrolling behavior so that the Input scrolls ensuring the
cursor is always visible.

Fixes https://github.com/flutter/flutter/issues/6271

* oops

* comments

* import

* test and RO.update fix

* constant

* fix.caretRect
2016-10-13 21:59:50 -04:00
Adam Barth
3b56f12219 Fix composited transform bounds calculations (#6302)
We weren't computing the bounds for composited transforms correctly. We
need to conjugate the transform by the offset in order to get the
correct paint bounds for the composited layer. We now also use the same
math in the non-composited case for consistency.

Also, don't scale the z-coordinate in RenderFittedBox.

Fixes #6293
2016-10-13 15:00:34 -07:00
Adam Barth
5af922edb0 Use antialiased clips (#6298)
The Skia team tells us that these go faster.
2016-10-12 18:27:40 -07:00
Adam Barth
322d1041a8 Add label and children to semantics update (#6268)
We were missing these before.
2016-10-11 12:16:07 -07:00
Adam Barth
f5b9d388cd Switch to the new semantics backend (#6259)
This match switches the framework to use the semantics backend in `dart:ui`
rather than the Mojo backend.
2016-10-11 10:51:41 -07:00
Adam Barth
f11bb25b8f SemanticsDebugger should use SemanticsNodes directly (#6252)
Instead of reading the mojom serialization and re-inflating it, the
SemanticsDebugger now shows the SemanticsNode objects directly.
2016-10-07 19:57:55 -07:00
Adam Barth
2c21d795a4 Deploy @checked (#6244)
This patch adds `@checked` everywhere is needed to remove the
`strong_mode_invalid_method_override` strong mode error.
2016-10-07 11:27:54 -07:00
Adam Barth
d65cda2379 Switch the model for SemanticsNode to use dart:ui types (#6234)
This will make it easier to switch to SemanticsUpdateBuilder.
2016-10-06 11:29:41 -07:00