6442 Commits

Author SHA1 Message Date
Mikkel Nygaard Ravn
859d8d3830 Alpha pre roll (#11560) 2017-08-09 15:52:04 +02:00
Alexandre Ardhuin
8a88e2efca Bump Dart SDK to 1.25.0-dev.9.0 (#11509)
* Bump Dart SDK to 1.25.0-dev.9.0

* add link to sdk bug
2017-08-09 14:45:55 +02:00
Michael Goderbauer
3b76e7e258 Make tear-offs cacheable for RenderSemanticsGestureHandler (#11556)
* Make tear-offs cachable for RenderSemanticsGestureHandler

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

* comment fix

* refactor
2017-08-08 15:46:47 -07:00
Michael Goderbauer
1d9f834fb2 a11y: handle left/right scrolls correctly (#11309)
* a11y: handle left/right scrolls correctly

* fix keep alive test

* fix scaffold test
2017-08-08 14:42:17 -07:00
Michael Goderbauer
b551f53471 Don't trigger an assert when markNeedsSemanticsUpdate is called multiple times in edge cases (#11544)
* Don't trigger assert if a render object ceases to be a semantic boundary

This bug was exposed by https://github.com/flutter/flutter/pull/11309, which caused the following assertion to trigger when scrolling in the Animation demo:

```
The following assertion was thrown during _updateSemantics():
'package:flutter/src/rendering/object.dart': Failed assertion: line 2626 pos 16: 'fragment is
_InterestingSemanticsFragment': is not true.
```

A minimal reproduction of the bug can be found in `semantics_10_test.dart`, which has been added as a regression test for the bug by this PR.

Looking at that test, here is a description of the faulty behaviour:
1. During the second `pumpWidget` call `RenderExcludeSemantics` marks itself as needing a semantics update (due to excluding going from `false` -> `true`).
2. This causes the nearest ancestor with semantics information (here: `RenderSemanticsAnnotations` representing the "container" Semantics widget) to be added to the `_nodesNeedingSemantics` list.
3. `RenderSliverList` (implementation behind ListView) marks itself as needing a semantics update (due to its changing children).
4. This causes the `RenderSemanticsGestureHandler` to be added to the `_nodesNeedingSemantics` list.
5. Next, canDrag is updated from `true` -> `false`. This means, `RenderSemanticsGestureHandler` is no longer a semantics boundary, it marks itself as needing a semantics update.
6. The nearest ancestor with semantics (`RenderSemanticsAnnotations`, the "container") is added to the `_nodesNeedingSemantics` list (this is a no-op because it is already in the list).
7. During `flushSemantics`, the `_nodesNeedingSemantics` list is walked. The first entry (`RenderSemanticsAnnotations`) updates the semantics tree to only contain the container widget and drop everything else (= no children of the ExcludeSemantics widget are walked).
8. The second entry (`RenderSemanticsGestureHandler`) is updated. It does not add any semantics of its own and is no longer a semantics boundary. Therefore, it wants to merge its descendent semantics into its parents. Here is where the assert throws because the algorithm assumes that every entry in the `_nodesNeedingSemantics` list will produce and own an `_InterestingSemanticsFragment` (passing your semantics on to your parents is not interesting).

The problem here seems to be step 4 in combination with step 5. In step 4 we rely on the fact that `RenderSemanticsGestureHandler` is an (explicit or implicit) semantics boundary and that it will be able to absorb the semantics change of `RenderSliverList`. This is true
at this time. However, in step 4 `RenderSemanticsGestureHandler` decides to no longer be an (explicit or implicit) semantics boundary and our assumption from step 5 becomes incorrect. We did nothing to correct this assumption.

This PR removes a node, that could potentially cease to be a (explicit or implicit) semantics boundary from the `_nodesNeedingSemantics` list to fix that problem. Please node that this does not mean that the node's semantics will not be updated: The node's closest ances
tor with semantics is added to that list during the `markNeedsSemanticsUpdate` call. During `flushSemantics` we will walk from this node to update the semantics of it's children (if changed), which will include the node in question.

* tiny fix

* simplify test

* analyzer fixes

* review comments
2017-08-08 14:17:20 -07:00
Chris Bracken
74835db563 Avoid rebuilding snapshots if no change to source (#11551)
This change re-introduces skipping snapshot builds if input sources (and
outputs) have not changed since the last snapshot build, with a bugfix
to include the entry-point source in the checksum used to check whether
rebuild can be skipped. This ensures that the following sequence
invalidates the cached build, resulting in two snapshot builds:

  flutter build ios lib/foo.dart
  flutter build ios lib/bar.dart

This reverts commit 3d5afb5a81052b7d55661549320d6d43f893f448.
2017-08-08 10:52:24 -07:00
Michael Goderbauer
7edec88632 Allow tapping on TabBar indicator to switch tabs (#11525)
* Allow tapping on TabBar indicator to switch tabs

* fix semantics

* review comments
2017-08-08 10:14:35 -07:00
Hans Muller
9b3307a43b Add splashColor and highlightColor to IconButton (#11524) 2017-08-08 07:44:49 -07:00
Ian Hickson
02c214479f CupertinoPageRoute cleanup (#11473) 2017-08-07 16:55:37 -07:00
Chris Bracken
cb14eb989d Update IntelliJ project files for latest plugin (#11536)
The most recent Flutter IntelliJ plugin replaces FLUTTER_MODULE with
WEB_MODULE and eliminates the exclusion of packages/ directories.
Use of the packages/ directory was turned off by default months ago, and
is replaced by the .packages file.
2017-08-07 12:19:25 -07:00
Yegor
bbc15724bd roll engine ff50334587 to get async stacks (#11519) 2017-08-07 10:03:09 -07:00
paolosoares
4da5e9b249 Adds more customization options to the Chip widget (#11498)
* Adds more customization options to the Chip widget

Includes:
- Custom Tooltip message for the delete button;
- Custom background color for the chip
- Custom delete icon color
- Custom label text style

* Adds missing type annotations to tests and improves documentation.

* Tweaks labelStyle field documentation
2017-08-04 17:44:20 -07:00
Ian Hickson
db88414131 Upgrade to the most recent test package. (#11526)
Also, add tests to verify that our coverage is actually being tested!
2017-08-04 16:33:38 -07:00
Michael Goderbauer
1e53d3206b Adding tests for animationStatus (#11520)
* Adding tests for animationStatus

* remove comments

* animateTo is allways forward

* clearify docs

* review comments
2017-08-04 16:14:05 -07:00
Jason Simmons
a5c4680e72 Reset the terminal if an exception occurs while handling terminal input in the app runner (#11516) 2017-08-04 14:27:36 -07:00
Michael Goderbauer
ec9df2f269 Allow Duration.Zero for animateTo (#11515) 2017-08-04 13:04:51 -07:00
Ian Hickson
00e135d879 Prevent event dispatch from happening during reassemble. (#11459)
It was previously possible for event dispatch to occurr during the
brief window where the tree had been marked dirty but before it had
been relaid out by reassemble, which would cause assertions to fire if
someone did a hot reload while touching the device.
2017-08-04 12:01:35 -07:00
Michael Goderbauer
d17ae25034 Do not schedule animation if already at the target value (#11503)
* Do not schedule animation if already at the target value

* Partially fixes https://github.com/flutter/flutter/issues/11495.
* Also includes a fix for Cupertino button to always run the tap animation even if the finger is immediately lifted from the screen (uncovered by a test failure).

* refactorings

* more tests

* test clearifications

* remove Listener

* fix lints

* fix async issue
2017-08-04 10:42:08 -07:00
Mikkel Nygaard Ravn
75ef9d02e8 Avoid building x86 jar for profile and release modes (#11486) 2017-08-04 14:57:54 +02:00
Jason Simmons
ffe5851eb7 Do not throw if a hot reload is attempted when all Flutter instances on the device have been stopped (#11504)
This can happen if an Android host app has been paused but its process is still running
2017-08-03 13:09:10 -07:00
Devon Carew
8ee902c04b rev the min. recommended flutter plugin version (#11501) 2017-08-03 10:21:35 -07:00
Jacob Richman
93a98327a8 Add Diagnosticable base class and add documentation. (#11458)
Add Diagnosticable base class and documentation
2017-08-03 09:49:44 -07:00
Yegor
89d06450e1 FadeInImage: shows a placeholder while loading then fades in (#11371)
* FadeInImage: shows a placeholder while loading then fades in

* fix dartdoc quotes

* license headers; imports

* use ImageProvider; docs; constructors

* _resolveImage when placeholder changes

* address comments

* docs re ImageProvider changes; unsubscribe from placeholder

* rebase

* address comments
2017-08-02 09:44:27 -07:00
Jason Simmons
c80d2482f9 An API that prefetches an image into the cache (#11471) 2017-08-01 17:36:38 -07:00
Ian Hickson
3d5afb5a81 Revert "Skip AOT snapshot build if inputs are unchanged" (#11463)
* Revert "Support space- and backslash-escaped dependencies (#11090)"

This reverts commit e6bafd0bdb70108b9f0604798386fd9e644e7c8d.

* Revert "Skip AOT snapshot build if inputs are unchanged (#11084)"

This reverts commit b5e522e2002f1b616e689b5012c9a42bbc9321f4.
2017-08-01 16:46:24 -07:00
Michael Goderbauer
d68caaafcd post-alpha-release work (#11472) 2017-08-01 16:45:29 -07:00
Devon Carew
a7c3bf4849 perform the initial poll for devices quicker (#11356)
* perform the initial poll for devices quicker

* add a Poller class

* test the new Poller class
2017-08-01 15:29:54 -07:00
Michael Goderbauer
bbcfb8d51a prepare alpha release (#11464) 2017-08-01 14:50:29 -07:00
Ian Hickson
ae5c3d5f89 Revert "Revert "Always evaluate the finder in driver.waitFor*()" (#11451)" (#11462)
This reverts commit 5d9db106db23d14e22a9c326d97d50fb1fcdc4d7.
2017-08-01 14:23:44 -07:00
perlatus
d1b222bef6 PopupMenuButton: create IconButton if child is Icon (#10230)
* PopupMenuButton: create IconButton if child is Icon

Otherwise the resulting button has an abnormally small and rectangular
area. With multiple PopupMenuButton(child: Icon) they get squished
together in the AppBar.

* Add separate icon argument to PopupMenuButton

* Fix style issues and tweak dartdocs

* Add tests for icon argument to PopupMenuButton

* Group icon tests and fix broken test, analyzer warnings

* Test that the correct custom icon is present

* Apply De Morgan's to work around dart analyzer bug

see: https://github.com/dart-lang/sdk/issues/30288
2017-08-01 12:32:49 -07:00
Alexey Shamrin
cfcf6d4428 brew update is not needed any more: Homebrew/brew#679 (#11406) 2017-08-01 12:21:56 -07:00
Ian Hickson
5d9db106db Revert "Always evaluate the finder in driver.waitFor*()" (#11451)
* Revert "Make plugins add their repos to projects in the consuming app (#11447)"

This reverts commit abe1e2520bb117c3de06cd3c44ad2a8250000de8.

* Revert "Support for custom build types on Android (#11354)"

This reverts commit 87eec719e20dd1423891a851d94b504b2453bf29.

* Revert "add a profile() method (#11443)"

This reverts commit 561d17a87606f8cf118b57bfacccb1acf6b9b594.

* Revert "Fix documentation based on dartdoc's warnings (#11428)"

This reverts commit 6655074b370d39150d2ed28f67851e3bce7013ab.

* Revert "Improve some docs around WillPopScope. (#11429)"

This reverts commit 58a28a296579b39360cbbb4a5f8b4b575eeb218b.

* Revert "temporarily disable broken driver test in integration_ui (#11440)"

This reverts commit 764515ec780421272de40b6b6c399497a1b38876.

* Revert "style fix"

This reverts commit 00bfc86630661edbd670b7c473fe07b11c6eee7a.

* Revert "tests for waitFor/waitForAbsent"

This reverts commit 31d2ee9c0cf259bc607bfbcaf112d4b8c2c360c1.

* Revert "Always evaluate the finder in `driver.waitFor()` and `driver.waitForAbsent()`"

This reverts commit 11d7c79b9902f960e9541f9f7da2f8857e4aaef4.
2017-08-01 10:39:08 -07:00
Ian Hickson
d4beaf54f0 Audit use of saveLayer (#11442)
It has recently come to light that we may have been ordering saveLayer
calls and clip calls incorrectly.
2017-07-31 12:21:42 -07:00
Mikkel Nygaard Ravn
abe1e2520b Make plugins add their repos to projects in the consuming app (#11447) 2017-07-31 14:51:09 +02:00
Mikkel Nygaard Ravn
87eec719e2 Support for custom build types on Android (#11354) 2017-07-31 13:57:24 +02:00
Devon Carew
561d17a876 add a profile() method (#11443)
* add a profile() method

* add todos
2017-07-30 16:29:28 -07:00
Ian Hickson
6655074b37 Fix documentation based on dartdoc's warnings (#11428) 2017-07-28 15:44:38 -07:00
Ian Hickson
58a28a2965 Improve some docs around WillPopScope. (#11429)
...and break the navigator<->routes circular dependency.

This is a step towards fixing https://github.com/flutter/flutter/issues/9577 but doesn't yet do so.
2017-07-28 15:10:11 -07:00
Todd Volkert
11d7c79b99 Always evaluate the finder in driver.waitFor() and driver.waitForAbsent()
Fixes #11327
2017-07-28 13:10:03 -07:00
Devon Carew
ba5bb57a52 Revert "fire service protocol extension events for frames (#10966)" (#11430)
This reverts commit 4b4cabb761ec1cb7fb5f2e8ec6e850de29a03056.
2017-07-27 16:14:30 -07:00
Devon Carew
4b4cabb761 fire service protocol extension events for frames (#10966)
* fire service protocol extension events for frames

* start time in micros

* introduce a profile() function; only send frame events when in profile (or debug) modes

* moved the profile() function to foundation/profile.dart

* refactor to make the change more testable; test the change

* fire service protocol events by listening to onFrameInfo

* remove the frame event stream; add a devicelab test

* remove a todo

* final
2017-07-27 15:34:53 -07:00
Jason Simmons
22ccb74ef5 Check all possible output directories to find a locally built gen_snapshot (#11417)
The output location of gen_snapshot differs based on the engine's target
platform, and we don't know the target platform when building a
platform-independent FLX in JIT mode.
2017-07-27 14:22:21 -07:00
Ian Hickson
87445e5913 Increase the touch slop. (#11419)
It was 8.0. It's now arbitrarily 18.0.

Changing this required adjusting some tests. Adjusting the tests
required debugging the tests. Debugging the tests required some tools
to help debugging gesture recognizers and gesture arenas, so I added
some. It also required updating some toString() methods which resulted
in some changes to the tree diagnostics logic.

Also I cleaned up some docs while I was at it.
2017-07-27 14:01:06 -07:00
Devon Carew
990dae85eb remove the flutter view cache; fix the ability to quit the app after a full restart (#11420)
* remove the flutter view cache; fix the ability to quit the app after a full restart

* improve test

* update test
2017-07-27 11:47:33 -07:00
Devon Carew
1d8705f3db re-flow comments in the create template (#11413) 2017-07-26 11:44:50 -07:00
Jason Simmons
838bd63182 Control raster cache flags in CustomPaint widgets (#11398) 2017-07-25 16:39:03 -07:00
Jacob Richman
9f510ebdc9 Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode (#11359)
Refactor RenderObject.toStringDeep and Widget.toStringDeep code to use DiagnosticsNode.
2017-07-25 09:25:13 -07:00
Ian Hickson
f0dec6e305 Add a debug feature to the gestures library to dump hit test results (#11346) 2017-07-24 10:10:19 -07:00
Mehmet Fidanboylu
94ed7dce41 Support automaticallyImplyLeading param in AppBar (#11264)
* Support automaticallyImplyLeading param in AppBar

* Review fixes

* fix review comments
2017-07-22 06:12:42 -07:00
Devon Carew
a92a62706c ignore PausePostRequest when reloading (#11340)
* ignore postpauseevents when reloading

* Update run_hot.dart

comment changes to kick the appveyor bot
2017-07-21 16:57:33 -07:00