3390 Commits

Author SHA1 Message Date
Michael Goderbauer
34ff00a752
Add a11y support for selected text (#14254)
Framework side for https://github.com/flutter/engine/pull/4584 & https://github.com/flutter/engine/pull/4587.

Also rolls engine to 4c82c566edf394a5cfc237a266aea5bd37a6c172.
2018-01-25 10:12:02 -08:00
Ian Hickson
97b9579e55
Random cleanup across the tree (#14221) 2018-01-25 09:46:48 -08:00
Vyacheslav Egorov
a5b3139126 Use void as type argument instead of Null where appropriate 2018-01-24 15:25:29 -08:00
Sam Rawlins
5ae770345a Self-execute closure passed to assert (#14235) 2018-01-23 13:46:14 -08:00
Michael Goderbauer
8059aea365
TextFields should only have one SemanticsNode (#14219)
* scrolling node eleminated

* remove second node

* fix ids
2018-01-22 18:12:39 -08:00
Hans Muller
773902c59d
Fix _RenderDecoration.debugDescribeChildren() (#14217) 2018-01-22 17:14:44 -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
Tan Jay Jun
de023bc6f4 Improve SystemChrome documentation (#14181) 2018-01-22 11:08:17 -08:00
Ian Hickson
a29d723c59
[H] Move the splitting of licenses to an isolate (#14160)
* Move the splitting of licenses to an isolate

This improves (from horrific to terrible) the performance of the
license screen. It also introduces a feature in the foundation layer
to make using isolates for one-off computations easier.

The real problem that remains with this, though, is that transfering
data between isolates is a stop-the-world operation and can take an
absurd amount of time (far more than a few milliseconds), so we still
skip frames.

More work thus remains to be done.

* - Add profile instrumentation to the isolate compute() method
- Add profile instrumentation to the LicensePage
- Add profile instrumentation to the scheduleTask method
- Make scheduleTask support returning a value
- Make the license page builder logic use scheduled tasks so that it doesn't blow the frame budget
2018-01-20 01:42:55 -08:00
Hans Muller
677f218ef6
Added InputDecorationTheme (#14177) 2018-01-19 22:53:29 -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
Hans Muller
629d325284
Fix: InputDecorator fails with null border, non-null labelText (#14166) 2018-01-18 17:15:43 -08:00
Jacob Richman
2e4522f7ec
Inspector robustness fixes. (#14154)
* Inspector robustness fixes.
Avoid cases where setState was called on disposed object.
Avoid cases where the inspector wouldn't render as it was called
after the first frame rendered and no other frames were rendered.
2018-01-18 16:19:31 -08:00
Ian Hickson
521bdaea05
Specify what image formats are supported in the API docs. (#13717)
Depends on https://github.com/flutter/engine/pull/4483
2018-01-17 17:47:47 -08:00
Jason Simmons
0434ae22ec
Do not apply the canvas bounds as a cull rectangle when recording a Skia picture (#14027)
The picture may need to draw outside the bounds (specifically for shadows)

Fixes https://github.com/flutter/flutter/issues/12618
2018-01-17 16:30:17 -08:00
Michael Goderbauer
15af86459d
Identify CheckBox and RadioButton as such (#14087)
* Identify CHeckBox and RadioButton as such

* review feedback
2018-01-17 10:23:36 -08:00
Hans Muller
7b6af52c92
Improve TextField splash management: cancel() ... confirm() (#14130) 2018-01-17 09:27:22 -08:00
Hans Muller
b94f757d77
Small simplification in RenderEditable (#14119) 2018-01-17 09:14:30 -08:00
Hans Muller
e63a63784c
Fix dartdoc errors in generated localization code and RenderEditable (#14132) 2018-01-17 08:37:02 -08:00
Michael Goderbauer
37e1684825
Document Android's SemanticsAction.tap behavior (#14031)
* Document Android's SemanticsAction.tap behavior

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

* review comment
2018-01-16 23:19:40 -08:00
Ian Hickson
f98b4863a7
Make debugCheckHasMaterial more useful (#14101)
Fixes https://github.com/flutter/flutter/issues/2877
2018-01-16 20:31:21 -08:00
Dwayne Slater
4488f58acf Set _imageInfo to null BEFORE adding listener to new ImageStream (#13825)
* Set _imageInfo to null before adding listener to new ImageStream

Fixes an edge case where switching the ImageStream to an already completed ImageStream caused the Image widget to show nothing. ImageStreamCompleter calls the listener during addListener if their image is already loaded.

* Fix whitespace

* Add test to verify correct behavior

* Added test from mravn-google's PR
2018-01-16 10:14:01 -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
Michael Goderbauer
0efc8cde1f
Fix SemanticsData hashode and equals (#14079) 2018-01-16 09:44:56 -08:00
Vyacheslav Egorov
b47a25cea7
Strong mode fix in Table._updateRenderObjectChildren (#14108)
renderObject.setFlatChildren expects List<RenderBox>, not List<RenderObject>.
2018-01-16 16:46:32 +01:00
Ian Hickson
299ddb4320
Add some color to the ShapeDecoration.shape docs (#14100)
...especially about TextDirection.
2018-01-15 12:43:43 -08:00
Vyacheslav Egorov
6e38b42919
Fix a couple of strong mode issues. (#14070)
* JSON.decode produces Map<String, dynamic> and List<dynamic>
objects. If a more tight type is required then object needs to
be converted explicitly (see dart-lang/sdk#31876);
* Completer<dynamic> produces Future<dynamic>. In Dart 2 it is
runtime error to assign Future<dynamic> to variable of type Future<T>;
2018-01-13 09:18:12 +01:00
Hans Muller
27eeb9722f
TextField splash integration (#14055) 2018-01-12 17:40:53 -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
Ian Hickson
80d6095d98
Fix ShapeDecoration (#14009)
And add a test that catches these problems.
2018-01-12 15:03:51 -08:00
Ian Hickson
8cf109d20f
Reland #14054 after having landed all the engine commits in between (#14064)
This gets us back to where we were a few minutes ago.
2018-01-11 23:21:53 -08:00
Ian Hickson
78dcc0e685
Revert "Revive "Push physical layers with paths instead of rects in RenderPhy… (#14054)" (#14063)
This reverts commit 592f297922270c0c338b0048d37a510c9c16db14.
2018-01-11 22:27:11 -08:00
amirh
592f297922
Revive "Push physical layers with paths instead of rects in RenderPhy… (#14054)
* Revive "Push physical layers with paths instead of rects in RenderPhysicalModel. (#13942)"

That commit was reverted due to a performance problem which has now been
fixed.

* Roll engine 05fe72d068e19c7886e8d27f9b004201d5ad1300
2018-01-11 18:54:12 -08:00
Sebastiano Poggi
2a07f3f211 Fix typo in framework.dart private method name (#14046) 2018-01-11 21:15:34 +01:00
Mikkel Nygaard Ravn
aad36ab7dd
Remove large int support in standard message codec (#14011) 2018-01-11 08:47:16 +01:00
Ian Hickson
09270dcb0b
The Ink widget (#13900)
This provides a way to draw colors, images, and general decorations on Material widgets, without interfering with InkWells that are further descendants of the widget.

This thus provides a cleaner way to solve the issue of FlatButtons and InkWells not working when placed over Image widgets than the old hack of introducing a transparency Material.

Fixes #3782.

Also, some fixes to documentation, and remove a redundant property on the Image widget.
2018-01-10 16:42:45 -08:00
Leaf Petersen
ab874da7be
Roll Dart SDK to 2.0.0-dev.16.0, along with associated package updates (#13857)
Rolling the Dart SDK to 2.0, with associated package updates.  

https://groups.google.com/forum/#!topic/flutter-dev/E22RdKAYjs8
2018-01-10 14:31:28 -08:00
Michael Goderbauer
46629b7187
Do not crash when toggling Semantics on, off, on (#13999)
* Do not crash when toggeling Semantics on, off, on

* review comments
2018-01-10 10:12:36 -08:00
Ian Hickson
316d8e1c2c
Make DecoratedBox repaint after being reparented (#13927)
Fixes https://github.com/flutter/flutter/issues/12553

The root cause of https://github.com/flutter/flutter/issues/12553 was that when the refresh indicator went away, which happened after the avatars had started their image loads but before the avatars had loaded, the DecoratedBoxes, along with the rest of the list, got GlobalKey-reparented, which caused the RenderDecoratedBox objects to unregister from the DecorationImagePainters, but they never re-registered since the whole subtree was in a RepaintBoundary and was therefore not explicitly repainted when the tree got reattached.

This fixes the bug by explicitly requiring any RenderDecoratedBox to repaint when it's reattached. This is probably a little more aggressive than required; we could probably expose a flag on Decoration that says whether or not the onChanged handler will ever be invoked, and only call markNeedsPaint if that's true, but we'll do that if it turns out that there's a performance issue here.

(This patch also introduces a bunch of improved debugging information that I used to track down the bug.)
2018-01-09 20:26:37 -08:00
Hans Muller
03e8ab1f53
Add support for a new kind of InkSplash: the "ripple" (#13986) 2018-01-09 14:43:08 -08:00
xster
c5c63dfd47
Don't flush touch events during first launch frame pre-warm (#13990)
* Lock events during runApp's warm up frame

* move to scheduler binding

* let the one scheduleWarmUpFrame api always lock

* tweak test
2018-01-09 14:05:12 -08:00
Michael Goderbauer
8a6e973739
Remove semantics boundary from gesture detector AND MORE (#13983)
`RenderSemanticsGestureHandler` is no longer a semantics boundary, which allows us to correctly mark disabled buttons as disabled without having their semantics size and semantics node id change unexpectedly.

Fixes https://github.com/flutter/flutter/issues/12589.
Fixes https://github.com/flutter/flutter/issues/11991.
See also https://github.com/flutter/flutter/issues/11993.

This change also required some refactoring to how we deal with `twoPaneSemantics` scrolling as it previously relied on `RenderSemanticsGestureHandler` being a semantics boundary. This should also make the underlying logic easier to understand.

In addition, the following minor changes are included in this PR:
* Removal of orphaned and unused `SemanticsConfiguration.isMergingDescendantsIntoOneNode`.
* Logic optimizations for `markNeedsSemanticsUpdate` .
* Fix for edge case where `MergeSemantics` failed to merge semantics.
* Use of emojis to better indicate leaf merging in the printed semantics tree.
* Better assert message for adding invisible child semantics nodes.
* Make some semantics tests robuster by not relying on creation order of SemanticsNode ids across test boundaries.

Fixes https://github.com/flutter/flutter/issues/13943.
2018-01-09 13:31:59 -08:00
Michael Goderbauer
24e3f70536
Rename SemanticsFlags to SemanticsFlag (#13994)
to align with `SemanticsAction` and other enum-like types.
2018-01-09 10:31:23 -08:00
Ian Hickson
9b92c919a0
Imply stops on LinearGradient and RadialGradient if they're missing (#13987) 2018-01-09 08:22:17 -08:00
Ian Hickson
7cf58702c1
Wrap _debug flag setting in asserts. (#13974)
Fixes the last bits of #5759.
2018-01-08 21:39:50 -08:00
Ian Hickson
3905d99109
Minor doc improvements. (#13969) 2018-01-08 21:39:40 -08:00
Ian Hickson
ce83f4fbe2
Make updateUserScrollDirection protected (#13850) 2018-01-08 21:39:16 -08:00
amirh
61a8132ea9
Revert "Push physical layers with paths instead of rects in RenderPhysicalModel. (#13942)" (#13988)
This reverts commit 57b4a52555388a613d3e4d5378b5bdf761d5f8df.
2018-01-08 19:24:19 -08:00
amirh
57b4a52555
Push physical layers with paths instead of rects in RenderPhysicalModel. (#13942) 2018-01-08 18:41:16 -08:00