9174 Commits

Author SHA1 Message Date
Hans Muller
528d28ba03 Add material/18n/README.md (#12359) 2017-10-03 10:10:32 -07:00
Michael Goderbauer
49499457f2 Drop invisible SemanticsNodes from tree (#12358)
* Drop invisible SemanticsNodes from tree

A node is invisible if it is outside of the bounds of the screen and if it is not merged into its (partially) visible parent.

Also in this PR: only set `wasAffectedByClip` to true if the nodes has actually been clipped.

* Fix other failing tests

* renaming

* review feedback

* more doc
2017-10-03 09:52:36 -07:00
Adam Barth
6128f48c80 Switch SlideTransition over to using Offset (#12369)
Previously, we used `Alignment`, which was difficult to understand. Now,
we just use an `Offset` scaled to the child's size, which is much easier
to understand.
2017-10-02 23:30:14 -07:00
Adam Barth
31b6ac049c Restore FractionalOffset operators (#12368)
These now act the way they used to act if both operands are
FractionalOffsets.  Once you mix in some other AlignmentGeometry
objects, everything gets converted to the AlignmentGeometry coordinate
system.
2017-10-02 21:48:24 -07:00
Ian Hickson
7bfa3c5676 FlutterLogoDecoration.lerpFrom/lerpTo with non-logos (#12360)
FlutterLogoDecoration should defer to Decoration for what to do when
it doesn't know how to lerp to/from another kind of decoration.
2017-10-02 17:32:00 -07:00
Ian Hickson
ce930db3b4 Move Border into its own file (#12364)
I'm about to add the BoxBorder and BorderDirectional classes to
this new file, but figured it would make review easier if the move
of the existing class happened first.
2017-10-02 17:06:57 -07:00
Alex
eb2518f20a fix(typo) desc of jumpToPage (#12320) 2017-10-02 16:59:26 -07:00
Alexander Aprelev
fd04d4d126 Revert "Roll flutter engine (#12307)" (#12365)
This reverts commit f6fe8dc7e3e961c067432e74f8a5fc089d7559b7.

This breaks coverage test
https://travis-ci.org/flutter/flutter/jobs/282472585
2017-10-02 16:01:09 -07:00
Michael Goderbauer
affdab1a5a Add SemanticsEvent.toString for easier debugging (#12363) 2017-10-02 15:46:22 -07:00
Alexander Aprelev
f6fe8dc7e3 Roll flutter engine (#12307)
* Roll engine

* Pick up updated engine with analyzer fix

* Add new typeArguments override

* Update engine dep

* Up dartdoc version to fix name resolution issues
2017-10-02 15:28:09 -07:00
gspencergoog
18f0d3aef7 Add framework support for system text scale factor. (#12180)
* Add framework-side support for system text scale factor.

* Rolling engine to e3404b81a53ba3180c7623a6f2190ebb28518f30
  Additional changes rolled in with engine change:
    libtxt: implementation of GetRectsForRange that processes a line at a time - e3404b8
    Provide an entropy source to the Dart engine (#4161) - e1aa867
    libtxt: search for fallback fonts that can match emoji and CJK characters - 8061df1
    Roll skia to e4679fa06a. (#4157) - 267e7a8
    Update buildroot to 53fea9aebbcc39c6522731471a1a45960ee0685e (#4160) - 02ea7ae
    Revert engine Dart roll. (#4158) - 14aab33
    Add support for system text scale factor. (#4124) - b2a7f4b
    Include _http into sky_engine libraries for analyzer (#4154) - b930f10
    libtxt: Remove postprocess_line and improve tracking of X offsets - 86f95f0
    libtxt: remove redundant line_widths (#4152) - 14bf515
    Roll dart to ade37f931e90b0fdb8fe16d6bf6f089545da55b6 (#4151) - 6f1264f
2017-10-02 14:18:18 -07:00
Ian Hickson
7d75c29b3b BoxDecoration tweaks (#12336)
Reorder the code, remove some redundant documentation, improve the
interpolation logic.
2017-10-02 11:20:34 -07:00
Ian Hickson
53194ed477 ShapeBorder (#12335)
This class lays the groundwork for RTL borders.
2017-10-02 10:24:01 -07:00
Michael Goderbauer
437e4c089b Make "mergeIntoParent" information available during compile of semantics tree (#12332)
* ++

* Allow unmerging of SemanticsNodes

* test passing

* ++

* remove prints

* doc comments

* rectify comment

* review comments
2017-10-02 09:49:04 -07:00
Adam Barth
0044ea2dbb Replace usage of FractionalOffset with Alignment (#12348)
Alignment will eventually replace FractionalOffset.
2017-10-02 00:06:24 -07:00
Adam Barth
2b126bcd0d Add Alignment, which will replace FractionalOffset (#12342)
Unlike FractionalOffset, Alignment uses the center as the zero of the
coordinate system, which makes the RTL math work out much cleaner.

Also, make FractionalOffset into a subclass of Alignment so that clients
can continue to use FractionalOffset.
2017-10-01 23:06:18 -07:00
Ian Hickson
89566feeed Run pub with --trace (#12328)
See https://github.com/dart-lang/pub/issues/1714
2017-09-29 17:56:25 -07:00
Ian Hickson
21899ce62f Honor more of the Theme for CircleAvatar with backgroundColor (#12333) 2017-09-29 15:38:22 -07:00
gspencergoog
f40d09e166 Fixing docs for testWidgets. No functionality change. (#12309)
* Fixing docs for testWidgets.  No functionality change.
2017-09-29 15:30:47 -07:00
Ian Hickson
944fef4564 Border.add, improve BorderSide.merge (#12327)
...and other minor Border improvements.
And tests.

This changes the merge logic I added yesterday to not support nulls
but instead support BorderSide.none and equivalents. This makes more
sense when dealing with actual Borders.
2017-09-29 15:20:17 -07:00
Todd Volkert
ada593e8f7 Move assert into constructor body. (#12331)
Temporary workaround to the fact that the Analyzer API
doesn't have a way to turn on asserts in initializers, coupled
with the fact that this file is being parsed by package:intl
using the Analyzer API.
2017-09-29 15:16:21 -07:00
Chris Bracken
2698fe852e Delete a duplicate EditableText test (#12325)
In 85c425ac88, a test was added to ensure that widget.onChanged was
fired when the contents of an EditableText changed via system paste
events (e.g. triggered from a TextSelectionOverlay). Due to a long stack
of rebases and (less-than-perfect) manual merge conflict merge
resolution, it was inadvertently added twice.
2017-09-29 11:18:53 -07:00
Michael Thomsen
3f6b28dddb Add a check for gradle failing due to missing licenses (#12318)
* Add a check for gradle failing due to missing licenses

* Review feedback Jakob
2017-09-29 13:49:38 +02:00
Michael Goderbauer
35ce207b14 Fix failure message in SemanticsTester (#12308) 2017-09-28 17:52:43 -07:00
Chris Bracken
85c425ac88 Improved behaviour for text-editing widgets (#12273)
This patch fixes a collection of issues with widgets involved in text
editing:

  * Fire widget.onChanged on EditableText value change:
    The value of an EditableText is composed of the text value as well
    as other editing-related data such as selection-related information.

    Previously, widget.onChanged() was only called for updates via
    updateEditingValue(). For pastes via a TextSelectionOverlay, updates
    are signalled via _handleSelectionOverlayChanged(), which only ever
    triggered widget.onSelectionChanged(), but not widget.onChanged().

    Both updateEditingValue() and _handleSelectionOverlayChanged()
    perform the value update via _formatAndSetValue(), which is where
    this patch moves the widget.onChanged() call.

  * Correctly update TextFormField value on edits via controller:
    The textual value of a TextFormField exists in two locations:
      1. FormField.value, as with all FormFields and subclasses.
      2. TextEditingController.value associated with the TextField
         underlying the TextFormField.

    Previously, edits to the TextEditingController associated with a
    TextFormField resulted in updates to the rendered TextField widget,
    but did not update TextFormField.value. FormField.value is updated
    via FormField's onChanged function, which is called from the
    EditableText underlying the TextField underlying the TextFormField.
    EditableText only fires onChanged when it receives changes from the
    engine. It does not fire onChanged for changes made to the
    underlying TextController, since the owner of the TextController is
    the one making these changes and thus, already aware of them.
    FormField, however, *does* need to listen to these changes to update
    its value.

  * Adds an initialValue parameter to the TextFormField constructor:
    FormField's constructor already takes an initialValue parameter,
    which specifies the initial value in the field, which is also the
    value to which reset() returns the field.

    Previously, TextFormField took its initial value from the controller
    value (if a controller was passed in) or the empty string (if not).
    This had the undesirable effect that calling reset() always resets
    the value to the current value of the controller... i.e., does
    nothing.

    We now take an initial value explicitly.
2017-09-28 17:45:49 -07:00
Ian Hickson
e1fa035b69 Retry on failed download. (#12293) 2017-09-28 17:37:34 -07:00
Ian Hickson
4c83ea8bef SafeArea (#12292)
* SafeArea

* AnimatedSafeArea

* AppBar test

* Apply feedback
2017-09-28 17:37:25 -07:00
Ian Hickson
9646e1fbad BorderSide improvements (#12294) 2017-09-28 16:43:46 -07:00
Ian Hickson
9909e773dc More documentation fixes (#12290) 2017-09-28 16:43:33 -07:00
Stefano Rodriguez
dca164ab2d Fix LinearProgressIndicator constructor (#12282)
* Update AUTHORS

* Add background and value colors to LinearProgressIndicator

* Add tests for LinearProgressIndicator with colors
2017-09-28 15:17:07 -07:00
Todd Volkert
ce59412cf2 Remove hard-coded "Runner" from iOS simulator logs filtering (#12306) 2017-09-28 13:11:16 -07:00
Chris Bracken
283f27d422 Clarify libimobiledevice installation status message (#12303)
Differentiate between 'not installed' and 'not working' and emit a more
targeted message.
2017-09-28 13:04:59 -07:00
Alexander Aprelev
1a3097025d Clone hot reload benchmark for --preview-dart-2 option. (#12251)
* Clone hot reload benchmark for --preview-dart-2 option.

* Get rid of linux and win preview_dart_2 (only android would be sufficient for now). Refactor code into lib/tasks

* Revert 2016 to 2017

* Mark new test as flaky
2017-09-28 12:45:54 -07:00
Chris Bracken
f06ef528e9 Verify EditableText fires update on replaced controller (#12276)
Adds a test that verifies that EditableText sends a
TextInput.setEditingState message to the engine when the associated
TextEditingController is replaced.
2017-09-28 12:18:56 -07:00
Michael Goderbauer
ad41de0059 Roll engine to bdfedcc26f78ea332cdac0ed67590157c82c954e (#12302) 2017-09-28 10:54:14 -07:00
Todd Volkert
9ea1ff12d7 Add Flags class. (#12268)
This class lives in the Context and allows callers to "inject"
flag values, where flag values are first extracted from the
command arguments, then from the global arguments as a fallback.
2017-09-28 09:36:55 -07:00
Ian Hickson
efb45ea788 Trivial nit fixes (#12285) 2017-09-27 16:13:48 -07:00
gspencergoog
4389f07024 This adds multiline text widget support. (#12120)
Add multiline keyboard support to editable text widget.  Fixes #8028.
2017-09-27 14:23:34 -07:00
Michael Goderbauer
2670786210 Send scroll progress with ScrollCompletedSemanticsEvent (#12263)
* Send scroll progress with ScrollCompletedSemanticsEvent

This requires engine change https://github.com/flutter/engine/pull/4144

* fix analyze warning

* review comment

* Roll engine to 45b11f742d38ebf564a5a832b1af00661d1a31fa

* fix test
2017-09-27 13:14:46 -07:00
gspencergoog
31fe65e23b Roll engine to 90ba98e741007cf249db26517ff8efea1a56057e (#12272)
Rolling the engine so I can land the flutter side of multiline text changes.

There are no other changes since the last roll.
2017-09-27 10:06:54 -07:00
Ian Hickson
63d7b9338d Update engine.version (#12265)
* Update engine.version

Rolls engine to have:
* https://github.com/flutter/engine/pull/4139 Replace a View.getDisplay call that is not supported on API level 16 
* https://github.com/flutter/engine/pull/4135 Remove spurious error message
* https://github.com/flutter/engine/pull/4141 Clamp overflows in Color.lerp
* https://github.com/flutter/engine/pull/4125 Update vulkan semaphore extension

* Update engine.version
2017-09-26 14:54:23 -07:00
Sarah Zakarias
3cbbbf0617 Allow empty pubspec file when building asset bundle (#12269) 2017-09-26 23:14:20 +02:00
Chris Bracken
65e3df8869 Fix a minor typo in the TextField.controller docs (#12267) 2017-09-26 13:37:53 -07:00
asaarnak
97dd12cf83 Seems like a lint was renamed. (#12034)
* Seems like a lint was renamed.

Lint `- unnecessary_brace_in_string_interp` is not in the list here: http://dart-lang.github.io/linter/lints/

In linter [0.1.30](9652dd44b6/CHANGELOG.md (0130)): [http://dart-lang.github.io/linter/lints/unnecessary_brace_in_string_interp.html](unnecessary_brace_in_string_interp)
In linter [0.1.2](9652dd44b6/CHANGELOG.md (012)): [http://dart-lang.github.io/linter/lints/unnecessary_brace_in_string_interps.html](unnecessary_brace_in_string_interps)

* Fix lint tests. analyze_once_test.dart and create_test.dart
2017-09-26 11:03:45 -07:00
jiamingc
8a441ae72b Make switch widget accept 3 other colors. (#12118)
* Make switch widget accept 3 other colors: inactiveThumbColor, inactiveTrackColor, activeTrackColor.

* Make switch widget accept 3 other colors.

* Make switch widget accept 3 other colors.
2017-09-26 10:05:51 -07:00
Kyle Bradshaw
7a35db1f99 _SaltedKey solution to ExpansionPanelList (#11902)
* _SaltedKey solution to `ExpansionPanelList`

_SaltedKey implementation courtesy of @Hixie
Tested and confirmed working.
Fixes #11166

* Added a simple test

* Style correction to test
2017-09-26 10:04:17 -07:00
Todd Volkert
bb0a724a1d Don't require .packages file for flutter packages command (#12258)
(it's the command that populates the .packages file)
2017-09-26 09:12:40 -07:00
Adam Barth
3433f42b09 Attempt to fix Fuchsia build (#12259) 2017-09-26 08:50:41 -07:00
Sarah Zakarias
a0e91bf9e8 Update Flutter Gallery to use new asset api for package assets (#12254) 2017-09-26 15:21:01 +02:00
Sarah Zakarias
49ba974710 Factor out flutter manifest logic (#12237) 2017-09-26 14:48:52 +02:00