Commit Graph

650 Commits

Author SHA1 Message Date
Jonah Williams
a901b650b6
Update meta to 1.1.8 (#44584) 2019-11-12 13:48:42 -08:00
LongCatIsLooong
62db22d152
CupertinoDynamicColor improvements (#44317) 2019-11-07 13:14:08 -08:00
Greg Spencer
028ed7122a
Synchronize modifier keys in RawKeyboard.keysPressed with modifier flags on events. (#43948)
Currently, we listen to keyboard events to find out which keys should be represented in RawKeyboard.instance.keysPressed, but that's not sufficient to represent the physical state of the keys, since modifier keys could have been pressed when the overall app did not have keyboard focus (especially on desktop platforms).

This PR synchronizes the list of modifier keys in keysPressed with the modifier key flags that are present in the raw key event so that they can be relied upon to represent the current state of the keyboard. When synchronizing these states, we don't send any new key events, since they didn't happen when the app had keyboard focus, but if you ask "is this key down", we'll give the right answer
2019-11-06 14:52:55 -08:00
Nurhan Turgut
97cf355b9d
Adding handling of TextInputClient.onConnectionClosed messages handli… (#43466)
* Adding handling of TextInputClient.onConnectionClosed messages handling to Framework

* Adding more test cases for closing connection to editable_text_test

* fixing analyze error.

* Fixing analyze error in the test file

* Fixing comments on the new method

* Adding more closing connection examples.

* Indentation change

* Remove auto-add white space

* Changing the oncloseconnection behaviour to stop editing. Updating the tests

* Addressing PR comments. Added explicit log for method channnels to the tests. Added comments to the interfaces.

* add more documentation
2019-11-04 13:35:18 -08:00
liyuqian
40670c09dc
Allow multiple TimingsCallbacks (#43676)
This fixes https://github.com/flutter/flutter/issues/39277

The following tests cover this change:
- packages/flutter/test/foundation/service_extensions_test.dart
- packages/flutter/test/scheduler/scheduler_test.dart
2019-10-30 19:02:13 -07:00
LongCatIsLooong
4ac2daf337
CupertinoTheme & CupertinoTextTheme dark mode updates (#41859) 2019-10-28 15:50:08 -07:00
Albertus Angga Raharja
b31ca1aaca
Add more structure to errors (continuation of #34684) (#42640)
* Add structured errors in Animations, TabView, ChangeNotifier

* Add structured error on MaterialPageRoute, BoxBorder, DecorationImagePainter, TextSpan

* Add structured errors in Debug

* Fix test errors

* Add structured errors in Scaffold and Stepper

* Add structured errors in part of Rendering Layer

* Fix failing test due to FloatingPoint precision

* Fix failing tests due to precision error and not using final

* Fix failing test due to floating precision error with RegEx instead

* Add structured error in CustomLayout and increase test coverage

* Add structured error & its test in ListBody

* Add structured error in ProxyBox and increase test coverage

* Add structured error message in Viewport

* Fix styles and add more assertions on ErrorHint and DiagnosticProperty

* Add structured error in scheduler/binding and scheduler/ticker

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in AssetBundle and TextInput

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured errors in several widgets #1

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove unused import

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add assertions on hint messages

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix catch spacing

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in several widgets part 2 and increase code coverage

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Add structured error in flutter_test/widget_tester

* Fix floating precision accuracy by using RegExp

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove todo to add tests in Scaffold showBottomSheet

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix reviews by indenting lines and fixing the assertion orders

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Fix failing tests due to renaming class

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Try skipping the NetworkBundleTest

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>

* Remove leading space in material/debug error hint

Signed-off-by: Albertus Angga Raharja <albertusangga@google.com>
2019-10-28 11:00:49 -07:00
Kate Lovett
7bc02037e3
Re-land Local & Pre-Submit Support for Skia Gold (#43371) 2019-10-25 15:05:21 -07:00
Kate Lovett
3a3939a7fa
Revert "Skia Gold Support for Local & PreSubmit Testing in package:flutter (#40710)" (#43227)
This reverts commit 8df0d6556d.
2019-10-21 17:31:54 -07:00
Kate Lovett
8df0d6556d
Skia Gold Support for Local & PreSubmit Testing in package:flutter (#40710) 2019-10-21 16:45:56 -07:00
Ian Hickson
292519be98
Roll dart package dependencies (#42496) 2019-10-11 11:12:31 -07:00
Greg Spencer
89d6c8d90b
Enables setting of semantics focused and focusable attributes within Focus widgets. (#41814)
This adds a Semantics node to the Focus and FocusScope widgets, setting the focused and focusable attributes so that the accessibility subsystem can be told when a control has the input focus.

Includes an engine roll to flutter/engine@77252d2, and the following 8 engine changes:

flutter/engine@77252d2 Greg Spencer Add missing focusable testing info (flutter/engine#13013)
flutter/engine@0e42a29 skia-flutter-.. Roll src/third_party/skia 54548626a977..e27a503a0a21 (1 commits) (flutter/engine#13024)
flutter/engine@6b56ed7 gaaclarke Refactor: FlutterDartProject (flutter/engine#13006)
flutter/engine@393480c skia-flutter-.. Roll src/third_party/skia 77dde599c98a..54548626a977 (1 commits) (flutter/engine#13023)
flutter/engine@080b89d skia-flutter-.. Roll src/third_party/skia 2b1a25a4d324..77dde599c98a (1 commits) (flutter/engine#13021)
flutter/engine@90b0f30 Ben Konyi Roll src/third_party/dart f4a72bfc64..bb04f145b2 (18 commits) (flutter/engine#13020)
flutter/engine@049fb89 skia-flutter-.. Roll fuchsia/sdk/core/linux-amd64 from q_uYX... to cknsi... (flutter/engine#13019)
flutter/engine@6925b2a skia-flutter-.. Roll fuchsia/sdk/core/mac-amd64 from wuAtw... to u0JpE... (flutter/engine#13018)

Related Issues
Addresses #40101

Landing on red in order to fix the build: it's red because of the needed engine roll.
2019-10-09 14:45:42 -07:00
Kate Lovett
1ec44a0c36
Incorporating Link Semantics (#41327) 2019-10-08 18:16:11 -07:00
Yegor
ebfe6020b8
Enable more web tests; use blacklist to filter them out (#41922)
Add more web tests;use blacklist instead of whitelist
2019-10-07 15:05:24 -07:00
Greg Spencer
0509791663
Fix mouse hover to not schedule a frame for every mouse move. (#41014)
This fixes the mouse hover code to not schedule frames with every mouse move.

Before this, it would schedule a post frame callback, and then schedule a frame immediately, even if there was nothing that needed to be updated. Now it will schedule checks for mouse position updates synchronously, unless there's a new annotation, and skip scheduling a new frame in all cases. It has to be async in the case of a new annotation (i.e. a new MouseRegion is added), since when the annotation is added, it hasn't yet painted, and it can't hit test against the new layer until after the paint, so in that case it schedules a post frame callback, but since it's already building a frame when it does that, it doesn't need to schedule a frame.

The code also used to do mouse position checks for all mice if only one mouse changed position. I fixed this part too, so that it will only check position for the mouse that changed.
2019-09-26 13:13:42 -07:00
Mehmet Fidanboylu
c19e553d64 Allow test beds to override defaultTestTimeout (#40806) 2019-09-24 16:53:40 -07:00
Greg Spencer
0e6cb28dbe
Add fake keyboard key generation to the testing framework (#40706)
There were four or five different implementations in various tests for sendFakeKeyEvent, which roughly all did the same thing. I was going to add yet another one, and decided that it needed to be generalized and centralized. This replaces those instances with something that just takes a LogicalKeyboardKey so that it's self-documenting, and can be used with multiple platforms.

This adds two functions to widget tester: sendKeyDownEvent and sendKeyUpEvent which simulate key up/down from a physical keyboard. It also adds global functions simulateKeyDownEvent and simulateKeyUpEvent that can be called without a widget tester. All are async functions protected by the async guard.
2019-09-24 08:14:38 -07:00
Michael Goderbauer
4373a31971
Reapply "Revert "Propagate textfield character limits to semantics (#40468)" (#40767) 2019-09-18 14:55:37 -07:00
Michael Goderbauer
b4324aed59
Revert "Propagate textfield character limits to semantics (#40468)" (#40714)
This reverts commit 6ad88bd5c0.
2019-09-17 16:37:11 -07:00
Michael Goderbauer
6ad88bd5c0
Propagate textfield character limits to semantics (#40468) 2019-09-17 14:39:50 -07:00
Alexandre Ardhuin
df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
Kate Lovett
e62c68c243
Fix for broken LocalFileComparator output (#40399)
* Fixing LocalFileComparator output

* Fixing path separators for windows failures

* Windows path issues

* Testing

* ++

* ++

* Fixing base directory - windows

* Clean up
2019-09-16 13:14:46 -07:00
Jonah Williams
18ffb0fbc3
place conditions on same line (#40391) 2019-09-12 18:30:24 -07:00
Jonah Williams
91af071570
ensure dart2js does not compile unsupported packages (#40368) 2019-09-12 15:25:21 -07:00
Jonah Williams
8504f3ae13
Update the supported library set for Flutter for web (#39983) 2019-09-10 17:27:30 -07:00
chunhtai
57d714ebb8
fix widget built twice during warm up frame (#39079) 2019-09-06 09:46:18 -07:00
Jonah Williams
0167f53101
update packages --force upgrade (#39932) 2019-09-05 19:35:59 -07:00
Michael Goderbauer
e2325600ea
Do not render any frames when just initializing Bindings (#39535) 2019-09-05 17:08:50 -07:00
Ian Hickson
a415c76b5b
Docs (#39198)
* Minor improvements to framework documentation.

* maybePop documentation fix

* Mark some flutter_test arguments required.

Without these set, we get a crash.

* Minor correction to ListView docs
2019-09-05 15:11:50 -07:00
liyuqian
7c0dfd5362
Revert "Replace deprecated onReportTimings w/ frameTimings (#38861)" (#39778)
This reverts commit 6ef80b447f.
2019-09-05 09:58:08 -07:00
Harry Terkelsen
d33cf11556
Automatically generated registrants for web plugins (#39628)
* WIP on web plugin registry

* WIP on registering plugins

* WIP on web plugin registration

* Only generate `package:flutter_web_plugins` imports if plugins are
defined

* Add parsing test

* Add documentation

* Fix analyzer warnings

* add license headers

* Add tests for package:flutter_web_plugins

* Run `flutter update-packages --force-upgrade`

* Fix analyzer errors

* Fix analyzer error in test

* Update copyright and remove flutter SDK constraints

* Enable tests since engine has rolled

* add flutter_web_plugins tests to bots

* Create an empty .packages file for WebFs test
2019-09-03 10:37:34 -07:00
Kate Lovett
c8af729d1c
Golden Doc Updates (#39082) 2019-09-03 08:45:51 -07:00
Jonah Williams
7bc4074ff3
use dpr and window size from binding (#39577) 2019-09-01 23:57:32 -07:00
Phil Quitslund
37846b032f
migrate from slow async io calls (#39515)
* migrate from slow async io calls
2019-08-29 16:47:10 -07:00
liyuqian
6ef80b447f
Replace deprecated onReportTimings w/ frameTimings (#38861)
This is the continuation of https://github.com/flutter/engine/pull/11041 and https://github.com/flutter/flutter/pull/38574

This is not a breaking change as we're not removing `onReportTimings` API.
We're simply removing the use of it in our framework.
2019-08-28 15:25:06 -07:00
adazh
5667b78291
Added a Driver wait condition for no pending platform messages (#39196) 2019-08-27 14:26:31 -07:00
Shi-Hao Hong
3b7410476f
Add MediaQuery.systemGestureInsets to support Android Q (#37416)
* Wire Window.systemGestureInsets to MediaQuery.systemGestureInsets

* Add systemGestureInsets property to TestWindow
2019-08-22 00:34:11 -04:00
Chris Bracken
ffa3785411
Update package versions to latest (#39013)
This fixes a breakage in fuchsia where package_config version 1.1.0 is
required but flutter_tools is currently locked to 1.05.
2019-08-21 19:15:33 -07:00
adazh
93c32c4ff6
Moved the default BinaryMessenger instance to ServicesBinding (#38464)
* Moved the default BinaryMessenger instance to ServicesBinding

This reverts commit 821602aef3.

* Added assertion in defaultBinaryMessenger. Also fixed the devicelab tests.
2019-08-21 16:47:42 -07:00
Chris Bracken
a093b98060
Update BUILD.gn for package:flutter_test (#38916)
Syncs the BUILD.gn with pubspec.yaml for package:test. This fixes a
breakage in the Fuchsia tree.
2019-08-20 15:10:23 -07:00
James D. Lin
b2f8d3a668
Instrument pending timers in tests (#37646)
Flutter widget tests assert if a test completes with timers still
pending.  However, it can be hard to diagnose where a pending timer
came from.  For example, a widget might consume a third-party library
that internally uses a timer.

I added a FakeAsync.pendingTimersDebugInfo getter to quiver
(https://github.com/google/quiver-dart/pull/500).  Make flutter_test
use it.

Additionally modify Flutter's debugPrintStack to take an optional
StackTrace argument instead of always printing StackTrace.current.

Fixes #4237.
2019-08-20 10:28:49 -07:00
Kaushik Iska
d2bc74aa6d
Fix analyzer issues for onReportTiming to frameTiming (#38840)
Filed: https://github.com/flutter/flutter/issues/38838
to track these usages.

This was introduced by: https://github.com/flutter/engine/pull/11041
2019-08-19 14:56:22 -07:00
Kate Lovett
6ff212b328
Comparing pixels instead of bytes with GoldenFileComparator (#38473) 2019-08-19 09:06:22 -07:00
Yegor
34c692659e
Teach render objects to reuse engine layers (#36402)
Teach Layer and its implementations, RenderObject and its implementations, and PaintingContext to reuse engine layers. The idea is that a concrete RenderObject creates a Layer and holds on to it as long as it needs it (i.e. when it is composited, and the layer type does not change). In return, each Layer object holds on to an EngineLayer and reports it to the engine via addRetained and oldLayer. This allows the Web engine to reuse DOM elements across frames. Without it, each frame drops all previously rendered HTML and regenerates it from scratch.
2019-08-16 15:27:12 -07:00
Kate Lovett
cac8fa5da0
Re-land 'Adding physicalDepth to MediaQueryData & TestWindow' (#38546) 2019-08-16 13:34:23 -07:00
Nurhan Turgut
c2e2f093ec
Navigator change backup (#38494)
* Broadcasting popRoute and pushRoute methods via SystemChannels.navigation. These messages will be used in flutter_web to detect the route

* Broadcasting popRoute and pushRoute methods via SystemChannels.navigation. These messages will be used in flutter_web to detect the route

* Reverting all unrelated formatting changes.

* Adding unit tests. Adding more comments.

* Changing string method names with constant strings.

* Fixing a constant strings.

* Fixing analyzer error.

* Fixing more white space.

* Changing the method names. Adding comments to the SystemChannels

* Comment and code name fixes

* replacing the comment with reviewer suggestion.

* addinf systemchannels.navigation mock to test bindings

* Adding a new class for sending route change notrifications. The nottifications are only sent on web. This should fix breaking android/ios

* using new class RouteNotificationMessages in navigator

* Fixing analyzer issues.

* fixing cycle dependency

* fixing github analyze error

* dartfmt two new classes. trying to fix anayze errors

* Update route_notification_messages.dart

* trying to fix white space errors
2019-08-16 13:17:45 -07:00
Emmanuel Garcia
83a8a575ee
Update dependencies (#37971) 2019-08-10 12:38:20 -07:00
Michael Klimushyn
821602aef3
Revert "Moved the default BinaryMessenger instance to ServicesBinding (#37489)" (#37983)
This reverts commit 92ef2b9ce1.

This requires either runApp() or
WidgetsFlutterBinding.ensureInitialized() to have been called before
using any MethodChannels. Plugins broadly rely on MethodChannels and
right now there's no general requirements that they be constructed
within the runApp call, so the ecosystem breakages from this are broader
than originally thought. Reverting for now.
2019-08-09 16:30:30 -07:00
Kate Lovett
f3dbefd3ce
Revert "Adding physicalDepth to MediaQueryData & TestWindow (#37718)" (#37938)
This reverts commit 3a2d30813a.
2019-08-09 12:58:59 -07:00
adazh
92ef2b9ce1
Moved the default BinaryMessenger instance to ServicesBinding (#37489) 2019-08-09 10:13:40 -07:00