491 Commits

Author SHA1 Message Date
najeira
e0956cbdb7 remove "the" duplications (#14952) 2018-02-28 12:21:13 -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
xster
1bdbfe7b52
Fix SliverPadding dropping the chain on scrollOffsetCorrection propagation (#14789)
* Fix SliverPadding dropping the chain on scrollOffsetCorrection propagation

* review doc
2018-02-21 14:51:14 -08:00
Alexandre Ardhuin
297fd9431f
fix potential call on null (#14731)
* fix potential call on null

* review
2018-02-16 22:37:07 +01:00
Alexandre Ardhuin
bd1921ec84
unnecessary parenthesis (#14533) 2018-02-16 07:43:19 +01:00
Ian Hickson
10393a12fa
Add some more documentation. (#14717) 2018-02-15 14:06:25 -08:00
Ian Hickson
b2af326046
Fix boundaries in applyClampedDragUpdate (#14444) 2018-02-14 17:05:24 -08:00
Michael Goderbauer
e9163a1afe
Wire up didGainA11yFocus, didLoseA11yFocus for CustomPainter (#14711) 2018-02-14 15:18:59 -08:00
Todd Volkert
8a65872ef9
Re-apply "Send nextId in addition to previousId for traversal order" (#14694)
Re-apply "Send nextId in addition to previousId for traversal order (#14676)"
2018-02-13 23:32:28 -08:00
Todd Volkert
e9d7bf8ce1
Revert "Send nextId in addition to previousId for traversal order" (#14691) 2018-02-13 21:50:44 -08:00
Michael Goderbauer
58689c796c
Send nextId in addition to previousId for traversal order (#14676) 2018-02-13 17:14:04 -08:00
Greg Spencer
7be0bd1ce9
Move geometric sort for semantics to the framework side. (#14539)
This adds geometric sort ordering back in for semantics nodes that don't have a sort order defined.

With this change, widgets that either have no sort order, or have an equivalent sort order, will be compared geometrically. The comparison is between the two starting corners, so it is TextDirection-aware: parent nodes that are set to have LTR text will compare upper left corners of their children, and upper right when set to RTL.

Also fixed a bug in the Transform widget that didn't mark modified nodes as needing a semantics update.
2018-02-12 20:53:32 -08:00
Greg Spencer
bfc6833459
Swap nextNodeId for previousNodeId, since setTraversalBefore is broken. (#14607)
It seems that setTraversalBefore doesn't work as well as setTraversalAfter for some reason, although I'm using them the same way. Some apps would lock up TalkBack when traversing if setTraversalBefore was set, but not with the equivalent setTraversalAfter.

It's not entirely clear why this is, but I'm going with this to at least get it fixed for apps we know about.

Fixes #14600
2018-02-12 14:10:39 -08:00
Vyacheslav Egorov
ce82cc656c
Fix Dart 2 issues in editable_text_test. (#14632)
Need to use `typed(any)` instead of `any` in Dart 2.
2018-02-12 08:20:32 +01:00
Michael Goderbauer
04d3ecb87e
Add accessibilityFocus and loseAccessibilityFocus as a11y actions (#14603) 2018-02-09 19:57:02 -08:00
Michael Goderbauer
72517f0a0a
Encode scrolling status into tree (#14536) 2018-02-09 18:33:50 -08:00
Alexander Markov
d64efe9fdb
Roll engine to a031239a5d4e44e60d0ebc62b8c544a9f592fc22 (#14601)
Includes:
* Exclude frontend_server from the license crawl (https://github.com/flutter/engine/pull/4645)
* Make native wrapper classes non-abstract (https://github.com/flutter/engine/pull/4607)
* Restrict clang-format to C, C++, Obj-C, Obj-C++ (https://github.com/flutter/engine/pull/4654)
2018-02-09 14:40:28 -08:00
Alexander Aprelev
0f3aa50071
Roll engine with rolled dart (#14538)
* Roll engine to pre-dart roll

* Roll engine to pick up updated dart

* Apply Map changes

* Move to dev.22

* Fix some analysis issues

* Silent analyzer

* More consts

* More const massaging

* Yet more const massaging

* Yet more const massaging

* Use nonconst()
2018-02-09 10:33:24 -08:00
Vyacheslav Egorov
d20125c3da
Change GlobalObjectKey.toString to strip away State<StatefulWidget>. (#14558)
This allows const GlobalObjectKey(0) to be concisely formatted as
[GlobalObjectKey int#0000] in both Dart 2 and Dart 1 modes.

Without this change it would be formatted as
[GlobalObjectKey<State<StatefulWidget>> int#0000] because in Dart 2
types are instantiated to bounds.

In addition to retaining general readability this also fixes few
tests that rely on this short string representation (see
test/widgets/global_keys_duplicated_test.dart).
2018-02-09 09:51:58 +01:00
Vyacheslav Egorov
7db0564ab6
Fix message channel usage in few tests. (#14557)
Channels don't preserve Map and List type arguments: Map<String, Object>
arrives as Map<dynamic, dynamic> to the receiver.

In Dart 2 type system dynamic no longer serves as bottom type so
Map<dynamic, dynamic> can't be assign to a variable of type
Map<String, dynamic>.

Issue #14556
2018-02-08 22:25:25 +01:00
Vyacheslav Egorov
0556e14f18
Strong mode fixes in tests (#14520)
* Use explicit types for onClick handler in diagnostics_test.

This test formats it to string and expects exact match.

Before this change onClick had type () => dynamic in Dart 1 and () => Null in
Dart 2.

* Fix strong mode issues in packages/flutter/test/material/dropdown_test.dart

Pass explicit type argument to renderObjectList(...) in expressions like

     List<RenderBox> l = tester.renderObjectList(...).toList();

Dart 2 mode inference is not strong enough to infer RenderBox as a type argument
fto renderObjectList and passes RenderObject instead, which later leads to
runtime check failures (because List<RenderObject> is not List<RenderBox>).

* Fix strong mode issues in packages/flutter/test/material/theme_test.dart.

Pass type argument explicity to widgetList. Dart 2 type inference can't infer
it by itself.

* Fix strong mode issue packages/flutter/test/widgets/unique_widget_test.dart

Pass correct type argument to GlobalKey.

* Fix type annotation in packages/flutter/test/material/app_test.dart.

pushNamed returns Future<Object> not Future<String>.
2018-02-08 09:31:34 +01:00
Chris Bracken
4b878dc687
Add minimum insets to SafeArea (#14505)
As a convenience, this adds a set of minimum padding to apply. The
greater of the minimum padding and the media padding is applied to each
edge.
2018-02-06 15:27:39 -08:00
Chris Bracken
35c2267ffe
Add SliverSafeArea widget (#14499)
A SafeArea-like widget that applies a SliverPadding instead of a
Padding.
2018-02-06 14:28:58 -08:00
Greg Spencer
14309b9311
Adds the semantic node traversal API. (#14060)
This adds an API for defining the semantic node traversal order.

It adds a sortOrder argument to the Semantics widget, which is a class that can define a list of sort keys to sort on. The keys are sorted globally so that an order that doesn't have to do with the current widget hierarchy may be defined.

It also adds a shortcut sortKey argument to the Semantics widget that simply sets the sortOrder to just contain that key.

The platform side (flutter/engine#4540) gets an additional member in the SemanticsData object that is an integer describing where in the overall order each semantics node belongs. There is an associated engine-side change that takes this integer and uses it to order widgets for the platform's accessibility services.
2018-02-06 13:24:16 -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
12ceaefb18
work around const lints (#14416)
* work around const lints

* update nonconst doc
2018-02-02 08:06:42 +01:00
Alexandre Ardhuin
841d5d7bd5
prefer_const_declarations on local variables (#14358) 2018-02-01 07:51:26 +01:00
Ian Hickson
17c50693b1
Rationalize the ScrollMetrics cloning logic (#14281) 2018-01-31 17:10:56 -08:00
Michael Goderbauer
3fd737c8f7
a11y on Android: copy/cut/paste (#14343)
With a little refactor and unification of how availability of copy/cut/paste is determined across platforms.

Minor remaining issue: https://github.com/flutter/flutter/issues/14331.

Fixes https://github.com/flutter/flutter/issues/13501.
2018-01-31 12:26:24 -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
Tom Larsen
b7f6be6ff2 Add onLeave callback to DragTarget (#14103)
* Add a callback that fires when a Draggable leaves a DragTarget.  This enables the DragTarget to manage its state from entry to exit.

* It helps to have a null check here

* Add test for onLeave callback and add verbiage to onWillAccept explaining the callback lifecycle of a DragTarget.
2018-01-29 22:48:35 -08:00
Ankur Kedia
47e52b827f adds properties to dismissible widget (#14162)
* adds crossAxisEndOffset and rollbackDuration properties to dismissible widget

* re-added removed license comment

* corrected license comments

* Adds test for rollbackDuration and crossAxisEndOffset

* added tests and comments

* modified tests for dismissible widgets
2018-01-29 22:45:30 -08:00
Ian Hickson
7701127bdd
Fix shadows in NestedScrollView (#14279)
* Fix shadows in NestedScrollView

The previous logic (and especially the previous test) wasn't quite right.

* Update nested_scroll_view.dart
2018-01-26 22:36:00 -08:00
Ian Hickson
d6f006db1e
Rename a test that wasn't running (#14278) 2018-01-26 17:00:06 -08:00
Michael Goderbauer
c9215e6be6
Wiring for semantic actions copy, cut, paste (#14295)
* Roll engine to 6921873c71e700235c0f68f0359be2332f93c8bc
2018-01-26 15:44:34 -08:00
Michael Goderbauer
671c1101a4
Change text selection (or cursor position) via a11y (#14275)
Roll engine to 7c34dfafc9acece1a9438f206bfbb0a9bedba3bf
2018-01-26 10:44:41 -08:00
xster
667f478506
CupertinoPicker part 4 - create CupertinoPicker and add gallery demo (#14091)
* controller, position and test

* Make controllers swappable

* WIP

* Create a ListWheelScrollPhysics

* Created picker and gallery demo and testing now

* Works. Ready to document and test.

* Document and add tests. Make the scroll controller more generic.

* minor cleanup

* review

* review

* fix tests

* stop using TransformLayers for now
2018-01-25 16:31:43 -08:00
Alexandre Ardhuin
10f721c8a5
use const instead of final with const declarations (#14253) 2018-01-25 19:28:22 +01:00
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
Vyacheslav Egorov
a5b3139126 Use void as type argument instead of Null where appropriate 2018-01-24 15:25:29 -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
Hans Muller
7b6af52c92
Improve TextField splash management: cancel() ... confirm() (#14130) 2018-01-17 09:27:22 -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
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
Alexandre Ardhuin
0fe1e5bf5b
apply upcoming lint prefer_const_literals_to_create_immutables (#14029) 2018-01-11 08:38:55 +01: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