220 Commits

Author SHA1 Message Date
Jason Simmons
aa04a056f3
Disable a text field test that fails on some Macs with libtxt (#14895) 2018-02-26 14:45:00 -08:00
Jason Simmons
44592238bb
Roll engine to 33b88173f3820690169348859bbdc29133179e0b (#14832)
libtxt is now the default text renderer
2018-02-26 11:39:48 -08:00
Hans Muller
24efb55b03
Generalized TabBar selected tab indicator (#14741) 2018-02-21 09:13:45 -08:00
amirh
4ae1b5f415
Paint the shape border in the Material widget (#14383) 2018-02-07 15:18:04 -08:00
Amir Hardon
d0a72752ac update buttons_test to expect clipPath instead of clipRRect 2018-02-06 18:44:42 -08:00
Amir Hardon
c90983dde9 add a pushClipRRect override to TestRecordingPaintingContext 2018-02-06 18:44:42 -08:00
Amir Hardon
b79f4e319d Revert "Use RRects instead of Paths when possible in Material. (#14404)"
This reverts commit d9ef7df978e6d50663a4d100963ec16205f3ab6f.
2018-02-06 18:44:42 -08:00
Ian Hickson
e810bee6e5
Fix scrolling of multiple SliverLists and SliverGrids (#14449)
* Fix scrolling of multiple SliverLists and SliverGrids

* Update sliver_fixed_extent_list.dart

* Update sliver_grid.dart
2018-02-05 13:56:28 -08:00
Alexandre Ardhuin
c02b6a8bcf
some whitespace cleanup (#14443) 2018-02-02 23:27:29 +01:00
Alexandre Ardhuin
841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
amirh
d9ef7df978
Use RRects instead of Paths when possible in Material. (#14404)
0672055a72ff1265b2aedb037f2848455318f22a changed the Material widget to
always use Paths for representing the outline.
These paths are later used for clipping and drawing a shadow.
This changed introduced a performance regression, see:
https://github.com/flutter/flutter/issues/14403

We did not expect a path that is a rounded rectangle to be less
performant than a rounded rectangle, as Skia should be able to tell the
path is just a rounded rectangle.
Until we find a solution for this regression, we keep using RRect when
we can represent the shape with it.
2018-01-31 16:06:14 -08:00
amirh
0672055a72
Support arbitrary shaped Material. (#14367)
For backward compatibility we keep supporting specifying the shape as a
combination of MaterialType and borderRadius, and we just use that as a
default when shapeBorder is null.

To cleanup the implementation if shapeBorder was not specified we just
translate the specified shape to a shapeBorder internally.
I benchmarked paint, layout and hit testing, with the specialized shape
clippers vs. the equivalent path clippers and did not see any
significant performance difference.

For testing, I extended the clippers/physicalShape matchers to match either the
specialized shape or the equivalent shape.
2018-01-30 23:24:42 -08:00
xster
e64d44ca78
CupertinoPicker part 1 - create a generic ListWheelScrollView (#13783)
* Create ListWheelScrollView

* fix missing doc

* tweak docs a bit

* fix imports

* Add some tests

* review

* review and transform tests

* fix test

* repatch lost 977701cf69

* review

* Review
2018-01-22 12:02:32 -08:00
Ian Hickson
bed71b9a15
Make FadeTransition more efficient (#14155)
* Make FadeTransition more efficient

* Update fade_transition_test.dart

* Update proxy_box.dart
2018-01-18 20:22:22 -08:00
Ian Hickson
3ac9449ad4
Fix the confusing-zero case with NestedScrollView. (#14133)
* Fix the confusing-zero case with NestedScrollView.

* Update mock_canvas.dart

* Update tabs_demo.dart

* more tweaks
2018-01-18 20:21:15 -08:00
Ian Hickson
c5050bc8a9
Prepare for running tests on Windows (#14112)
Seems like we don't yet run the flutter tests on Windows, but we're
close to being able to. This makes some minor changes to make that
more possible:

 - fix the stack parsing code to support Windows paths
 - fix the tests for the stack error handling code to handle Windows paths
 - skip some tests that rely on Ahem font metrics
2018-01-16 10:11:13 -08:00
amirh
0230a87476
Add a PhysicalShape widget and a render object for it. (#13682)
This CL also refactors common logic for RenderPhysicalModel and
RenderPhysicalShape into a base class _RenderPhysicalModelBase.
2018-01-12 15:56:01 -08:00
Alexandre Ardhuin
0fe1e5bf5b
apply upcoming lint prefer_const_literals_to_create_immutables (#14029) 2018-01-11 08:38:55 +01:00
Jason Simmons
77872cc560
libtxt: update paragraph_text for current libtxt behavior (#14004)
* libtxt now calculates selection rectangles reflecting the heights of
differently styled text spans within a line (matching Blink)
* libtxt does not round the coordinates of selection rectangles (unlike Blink)
2018-01-10 10:27:59 -08:00
Ian Hickson
ecb708ee3a
Clean up lerp() methods and their documentation. (#13684)
This cleans up lerp, lerpFrom, lerpTo, and scale methods, and their
documentation.

Fixes https://github.com/flutter/flutter/issues/12377.
2017-12-21 11:09:49 -08:00
Ian Hickson
78ff7707e1
Fix niggling PaginatedDataTable bugs (#13556)
Prevent header from thinking it can wrap and then overflowing.

Fix default footer string which lost its colon (localized values are fine).

Make the "rows per page" drop-down include at least one value even when the table lacks many items. (Previously it would assert if your table was too short.)

Make the footer scrollable.

Fix some todos and improve some debug output.

Tests for much of the above.
2017-12-19 12:39:48 -08:00
Ian Hickson
9ac5963d2a
Fix TableBorder bugs (#13495)
Add more tests, fix docs, fix painting bugs...

Fixes https://github.com/flutter/flutter/issues/12902
2017-12-12 15:24:09 -08:00
Yegor
b80751cdc3
Make time picker accessible (#13152)
* make time picker accessible

* use new CustomPaint a11y API

* flutter_localizations tests; use bigger distance delta

* fix am/pm control; selected values

* fix translations; remove @mustCallSuper in describeSemanticsConfiguration

* exclude AM/PM announcement from iOS as on iOS the label is read back automatically
2017-12-08 14:29:28 -08:00
Ian Hickson
44e228eb9e
Move image logic from services/ to painting/. (#13409)
This allows the scheduler library to depend on the services library
and the painting library to depend on the scheduler library without
the services library having to depend on the scheduler library.

While I was at it I also cleaned up some of the binding logic: the
licenses logic can now be overridden (and the test library does so),
and the image cache can now be overridden as well.
2017-12-07 14:53:08 -08:00
Jacob Richman
ed54868c22
Change enum properties to use camel case instead of dash separated names
Make regular Alignment values look more like enumProperties while
leaving more complex AlignmentDirectional values unchanged.
2017-12-07 10:32:56 -08:00
Michael Goderbauer
6493c8b43d
Adapt markNeedsSemanticsUpdate algorithm to new semantics tree compiler (#13274)
* ensures that only semantics boundaries will be added to owner._nodesNeedingSemantics as expected by compiler.
* no longer throws assert if markNeedsSemanticsUpdate is called on non-semantic-boundary render object with a non-semantic-boundary parent.
* Fixes #13109.
* removes onlyLocalUpdates from markNeedsSemanticsUpdate as its no longer needed.
2017-11-30 12:18:33 -08:00
Ian Hickson
34ba6be93a
Popup menus RTL (#13110)
This fixes the popup menu code to do a better job of expanding
smoothly regardless of which side of the screen it's on. It still
results in a bidirection growth when positioned at the bottom of the
screen, so maybe we'll need to animate menus differently, but that's
a problem for another patch.

Also, improve some docs and provide RelativeRect.toSize which I needed
at one point while building this patch (though it didn't survive all
the way to the end).
2017-11-22 15:15:21 -08:00
Greg Spencer
0259be90b8
Fix spelling errors in all the dartdocs. (#13061)
I got tired of drive-by spelling fixes, so I figured I'd just take care of them all at once.

This only corrects errors in the dartdocs, not regular comments, and I skipped any sample code in the dartdocs. It doesn't touch any identifiers in the dartdocs either. No code changes, just comments.
2017-11-17 10:05:21 -08:00
Greg Spencer
c15c021e6c
Adding accomodations to ListTile for scaleTextFactor. (#12973)
This makes ListTile expand vertically when text is scaled, or really when whatever is placed inside it is larger than the available space.

In order for UnconstrainedBox to be useful here, I needed for it to only unconstrain the child Row in one dimension, so I added a "constrainedAxis" parameter to the UnconstrainedBox.

Also, changed one enum test to use a switch instead.

I modified the ListTile test to be more representative of the intention of the spec: we were testing with text in the leading and trailing sections, and the design wants icons there. Because there was leading text, and the dense mode only changes the font size on the text lines, the leading text was propping up the minimum size of the tile, making so that the test wasn't really testing any changes in dense mode.
2017-11-15 09:00:36 -08:00
Greg Spencer
3541ad0a64
Add an UnconstrainedBox and factor out debug overflow indicator. (#12856)
UnconstrainedBox will allow its child to size itself as if it had no constraints, and then attempt to fit around that object, until its own constraints are exceeded, in which case it will clip and display an overflow warning.

I also factored out DebugOverflowIndicator, which will draw overflow indicators on containers which overflow but aren't expected to.
2017-11-08 20:15:06 -08:00
Ian Hickson
e064d6cbc9
RenderFlex with MainAxisSize.min RTL (#12875)
There was a left-bias when MainAxisSize.min couldn't be honoured.
2017-11-03 17:50:11 -07:00
amirh
616a2ad6da
Move semantics stuff from rendering to a top-level semantics/ library (#12793) 2017-11-02 17:38:28 -07:00
Michael Goderbauer
1d4607ff04
Identify text fields as such to a11y (#12804)
* Identify text fields as such to a11y

* focus

* make travis happy

* review comments
2017-11-02 10:08:56 -07:00
amirh
6161d54eb6
Move AbstractNode to lib/foundation. (#12789)
(in preparation for moving the semantics stuff out of rendering)
2017-11-01 09:24:30 -07:00
Michael Goderbauer
9184dfba14
Support value announcement for increase/decrease (#12741)
* Support value announcment for increase/decrease

* ++

* review comments about docs
2017-10-31 14:22:33 -07:00
Michael Goderbauer
c3e049613d Support for accessibilityHint and accessibilityValue (#12677)
* Support accessibility labels and hints

* more tests

* ++

* review comments

* fix merge

* test fix
2017-10-24 11:17:51 -07:00
Michael Goderbauer
141a6355ce Performance improvements for semantics tree compilation (#12682)
* Without checking compatibility

* ++

* ++

* ++

* more docs
2017-10-23 17:33:46 -07:00
amirh
ce4a45779d Add an isButton flag to the Semantic widget,use it for MaterialButton (#12657)
https://github.com/flutter/flutter/issues/11992
2017-10-23 14:52:41 -07:00
Alexandre Ardhuin
1fce14a31c enable lint prefer_single_quotes (#12665) 2017-10-22 18:11:36 +02:00
Ian Hickson
faf44b592a Factor out painting logic for DecorationImage (#12646)
This avoids some code duplication that existed before and will make
further modifications easier.
2017-10-20 16:58:16 -07:00
Jason Simmons
5e8634a625 libtxt: make a paragraph selection test handle equivalent libtxt and blink output (#12606) 2017-10-20 12:54:36 -07:00
Michael Goderbauer
f8a2bd20e9 Redesign Semantic Tree Compilation Algorithm (#12605)
* Oct 12 10:12am

* implicit_semantics_test.dart passes

* refactoring

* works in nice

* minor rename

* more doc comments

* to be explicit check better

* fix test

* ++

* ++

* semantics_9_test (BlockSemantics) and implicit_semantics_test are passing

* doc updates

* tiny refactor

* fix static errors in tests

* fix gesture detector

* ++

* ++

* geometry

* ++

* remove noGeometry

* revert test

* +

* all tests but scrolling/clipping pass

* clipping works

* scrolling halfway

* sliver tests pass

* ALL TESTS PASS

* SemanticsNode changed

* docs and tiny fixes

* card test

* more doc comments

* remove missed print

* more tests

* make test pass on Linux

* remove changes to intellij proj file

* review comments
2017-10-18 16:28:24 -07:00
Jason Simmons
264cbf6145 libtxt: adapt a selection rectangle test (#12612)
libtxt's implementation of Paragraph.getBoxesForRange returns the full line
height for all characters in a line.  Blink had been returning a tighter
enclosing rectangle for each individual character.
2017-10-18 14:48:20 -07:00
Ian Hickson
0e34c7f28c CircleBorder (#12570) 2017-10-17 13:38:06 -07:00
Adam Barth
a13320253c Don't attempt to draw invisible overflow indicator (#12534)
If the flex is empty, there's no space in which to draw the overflow indicator,
so we shouldn't bother trying to draw it.

Fixes #12532
2017-10-17 11:17:08 -07:00
Ian Hickson
4e48a737eb Fix flex floating point error causing unnecessary striped warnings (#12424)
Also:

 * Provide a better message when you lerp from infinity to finity
   constraints.

 * Make the striped marker support RTL.

 * By popular demand, dump a warning to the console the first time
   a particular Flex overflows. (Resets on hot reload.)
2017-10-06 19:24:34 -07:00
Adam Barth
a30b109c9e Add RTL support to ListBody (#12414)
Fixes #11930
2017-10-05 09:45:41 -07:00
Ian Hickson
cd3715a854 Border RTL (#12407) 2017-10-05 01:12:21 -07:00
Chris Bracken
0189696e4b Roll engine to 459f722b86415da01386fe41f37bafa842f11ae8 (#12413)
Eliminates Invocation.typeArguments override recently introduced and removed in upstream Dart SDK commit:
https://dart-review.googlesource.com/c/sdk/+/10702
2017-10-04 19:44:48 -07:00
Ryan Macnak
dfa13a14f9 Roll engine to f7685ddf16ccf9e5f6c4386c23061b02ed0e37d4. 2017-10-04 14:44:44 -07:00