2548 Commits

Author SHA1 Message Date
LongCatIsLooong
cfb0e1570f Add autofill save for iOS and Android (flutter/engine#18643) 2020-07-28 10:23:55 -07:00
chunhtai
23fb7c08c6 fix FlutterViewUpdateCustomAccessibilityActions uses correct string list (flutter/engine#19623)
* fix FlutterViewUpdateCustomAccessibilityActions uses correct string list

* add test to ci

* format

* add license file

* fix test

* fix lint
2020-07-28 09:49:59 -07:00
stuartmorgan
cd66f501cb Fix invalid selection handling in text plugins (flutter/engine#19899)
The Windows, Linux, and GLFW embeddings (which all share a common code
ancestry) pass TextInput.setEditingState selection base and extents
straight through to the shared text model class. The model expects those
values to be valid, but the framework sends -1/-1 for "invalid"
selections, which happen for some empty text cases (e.g.,
TextFieldController.clear()).

This translates those invalid selection values to an empty selection at
the start of the string, as expected by the model.

Fixes https://github.com/flutter/flutter/issues/59140
2020-07-27 11:00:02 -07:00
Emmanuel Garcia
da28c5954a bool SubmitFrame -> void SubmitFrame (flutter/engine#18984) 2020-07-23 16:16:02 -07:00
Todd Volkert
f13417b37a Add support for playing alert sound on MacOS (flutter/engine#19970)
flutter/flutter#62143
2020-07-23 14:00:13 -07:00
Emmanuel Garcia
b7345a4242 Remove android view from the Mutator stack (flutter/engine#19972) 2020-07-23 10:50:15 -07:00
Felipe Archondo
6cdf2e8d43 fix and re-enable SessionConnection unit tests (flutter/engine#19812)
[fuchsia] fix and re-enable SessionConnection unittests

This change waits until Scenic is initialized before beginning the test
logic. This should fix the issue where the test starts running before or
during Scenic startup.
2020-07-23 12:15:07 -04:00
gaaclarke
ee0e1788d9 Made the linter print out more information in its output and fixed bugs (flutter/engine#19895) 2020-07-22 15:38:09 -07:00
Greg Spencer
36d1a9f78c Revert "Implement delayed event synthesis key event handling for Android (#19024)" (flutter/engine#19956)
This reverts commit adeb2599ce8c144daef5e77bd25c4da6cae7bc44 because it breaks flutter_gallery__back_button_memory and a customer test.
2020-07-22 12:36:26 -07:00
William Wold
f9535697d8 Change FlView::renderer from X11-specific to generic 2020-07-22 11:17:38 +12:00
William Wold
31b6df06b4 Call eglGetError() before other EGL calls that will wipe it 2020-07-22 11:17:38 +12:00
freiling
63633ce553 Test Framework for SKP based shader warmup (flutter/engine#19260)
* [fuchsia] fix Rasterizer::ScreenshotLayerTreeAsPicture on Fuchsia

* [fuchsia] Add shell test for skp based shader warmup

* [fuchsia] use custom image serialization when writing out SKP's

This change adds custom image serialization functions for skp serialization
which write out onlythe image metadata and not the contents of the
images themselves. This allows SKP's to be used for shader warmup with
a significantly reduced disk space footprint.
2020-07-20 17:03:45 -07:00
Emmanuel Garcia
ab12b9a8e6 Support talkback in hybrid composition (flutter/engine#19860) 2020-07-17 18:56:02 -07:00
chunhtai
971aa24aae fix On iOS, dialog titles are announced twice (flutter/engine#19826) 2020-07-17 11:16:51 -07:00
Greg Spencer
adeb2599ce Implement delayed event synthesis key event handling for Android (flutter/engine#19024)
This implements the design in flutter.dev/go/handling-synchronous-keyboard-events for Android.

I started with Android, but this will be used for all platforms as we add them.

The related framework PR is: flutter/flutter#59358 (which has already landed)
2020-07-17 11:03:19 -07:00
Justin McCandless
9ac2cb9518 Fix loss of negative text selection ranges (flutter/engine#19785)
iOS now matches Android behavior in that empty selections put the cursor at the start of the field.
2020-07-17 08:10:05 -07:00
Dan Field
b92d241f08 remove obsolete check on FlutterPlatformViewsController::OnCreate (flutter/engine#19819)
* remove obsolete check

* FML_DCHECK flutter_view_ in methods that actually use it
2020-07-16 15:37:10 -07:00
chunhtai
c93bb58102 Makes IOS dispatch showOnCcreen action for header semantics nodes (flutter/engine#19788)
* Makes IOS dispatchs showOnCcreen action for header semantics nodes

* update

* format
2020-07-16 11:00:28 -07:00
Stanislav Parshin
ee677401a8 Fix NullPointerException in FlutterTextView (flutter/engine#19501) 2020-07-16 08:06:04 -07:00
Gary Qian
ef7f2900f2 Desktop embedder ComputePlatformResolvedLocale entrypoint (flutter/engine#19597) 2020-07-16 04:48:02 -07:00
rekire
f425dd713c Prevent that removeActivityResultListener() is causing an ConcurrentModificationException (flutter/engine#19702) 2020-07-15 17:59:08 -07:00
Tong Mu
78f0fc74d9 Add all system cursors (engine) (flutter/engine#19550)
* Support all system cursors in WIn, Linux, mac, Web and Android.
2020-07-15 15:37:18 -07:00
Jonah Williams
81aa9a3a9a [null-safety] update use of dot packages to package_config.json (flutter/engine#19780)
Work towards flutter/flutter#60999

All usage of .packages must eventually be replace with package_config.json to support language versioning.
2020-07-15 15:26:34 -07:00
Kaushik Iska
aed2016ee8 [android] Childview will process its motion events (flutter/engine#19662) 2020-07-14 19:18:14 -07:00
David Reveman
1e966b5ead [fuchsia] Fix use-after-free due to raster cache (flutter/engine#19740)
Co-authored-by: David Reveman <reveman@google.com>
2020-07-14 19:06:45 -04:00
Jonah Williams
29f281a2f5 [null-safety] add null assertions to dart-flags allowlist (flutter/engine#19746)
Will allow enabling the null-safety asserts flag for flutter/flutter#61042
2020-07-14 13:27:07 -07:00
Michael Goderbauer
5555b36877 Add flag to indicate whether the platform supports state restoration (flutter/engine#19717) 2020-07-14 11:01:25 -07:00
Jonah Williams
7e600fad3c switch kernel_compiler to package_config (flutter/engine#19582)
Update the kernel compiler target to be compiled with a package_config, eventually needed for null safety.

Work towards flutter/flutter#60999
2020-07-14 09:16:36 -07:00
David Worsham
cfa8f4e1a8 Fix Mac / iOS builds (flutter/engine#19728) 2020-07-13 18:34:49 -07:00
David Worsham
cbd3cd9c0d fuchsia: Enable most unittests (flutter/engine#19583)
Tweak the primary flutter build rule so that fuchsia is more similar to
other platforms in how tests and the shell are built.

Only embedder_unittests and GLFW tests are disabled on Fuchsia now.

TEST: Ran unittests on host/fuchsia; workstation on fuchsia
BUG: fxb/53847, fxb/54056
2020-07-13 17:36:19 -07:00
David Reveman
e14e4ad37f [fuchsia] Use memory_requirements_2 extension. (flutter/engine#19678)
This is required by some Vulkan 1.0 drivers. For example,
MoltenVK through goldfish ICD when running in the emulator.

Co-authored-by: David Reveman <reveman@google.com>
2020-07-13 17:37:20 -04:00
Sebastian Roth
fe3a0c34e6 Fixes typo in android_context_gl.h (flutter/engine#19700) 2020-07-13 21:45:27 +01:00
Tong Mu
a7cf911b7e Linux: Use a hash table to map cursors (flutter/engine#19561)
Refactors the process of looking up system mouse cursor value, so that instead of a linear search it uses a hash table.
2020-07-13 13:32:13 -07:00
Gary Qian
d298a08c85 [Android] Prevent FlutterRenderer listener from calling JNI after detach (flutter/engine#19558) 2020-07-13 06:29:30 -07:00
Andy Weiss
d498287222 Use the main bundle if the App bundle is not found (flutter/engine#18749)
It looks like half the code in this function was updated to use the
main bundle but this one line was still only using the _dartBundle. I am
pretty sure that is a mistake and instead we want to use the mainBundle
as a backup both to find the plist and to find the assets.
2020-07-11 21:08:27 -07:00
Kaushik Iska
a292cb8d21 [android] Pass synthesized eventType to VirtualDisplay platform views and fix memory leak (flutter/engine#19620) 2020-07-09 18:06:02 -07:00
gaaclarke
26774fd70d Added the ability to set properties in interface builder for FlutterViewController. (flutter/engine#19458) 2020-07-09 17:23:32 -07:00
Robert Ancell
7dc1897fba Fix clipboard paste functionality not working (flutter/engine#19489) 2020-07-10 11:34:23 +12:00
Robert Ancell
2c9a7e1cd7 Fix documentation of unset platform view ID (flutter/engine#19320) 2020-07-10 11:17:14 +12:00
Robert Ancell
84ccba79fc Set locale in Linux shell (flutter/engine#19470) 2020-07-10 11:16:50 +12:00
stuartmorgan
f0c88b310c Implement cursor support for Windows (flutter/engine#19459)
Implements the basic engine support for Windows for
https://github.com/flutter/flutter/issues/31952
2020-07-09 11:18:39 -07:00
Justin McCandless
e52d9ab7fc Make DPAD movement consider grapheme clusters (flutter/engine#17420)
Moving the caret with the software Dpad now correctly considers complex characters.
2020-07-08 13:59:58 -07:00
gaaclarke
025b1cf4e9 Changed iOS channels to start cleaning up the accessibility handler when the bridge is deleted (flutter/engine#19556)
Started cleaning up the accessibility handler when the bridge is
deleted and made nilling out channels safer by making sure they don't
overwrite newly setup handlers.
2020-07-08 13:26:29 -07:00
Kaushik Iska
3239b704c3 Propoagate Tap events on Android hybrid views (flutter/engine#19608)
Translate the coordinate from global flutterview to the specific embedded sub-view.
2020-07-08 13:19:17 -07:00
Dan Field
5abad59767 Call Dart_NotifyLowMemory more on iOS (flutter/engine#19289) 2020-07-08 04:44:03 -07:00
Chinmay Garde
91fc6696db Only attempt surface creation in viewDidLayoutSubviews if the application is active. (flutter/engine#19592)
UIKit does not guarantee that the application is in the active state when it
lays out it subviews. However, in `viewDidLayoutSubviews`, Flutter attempts to
create the render surface and wait for the first frame. These operations require
GPU access which is forbidden when in the background on iOS. This layout while
in the background only seems to happen under very specific circumstances as
described in the reproducible test case. Notably, this behavior cannot be
reproduced when the application is just launched with the "Background Fetch"
XCode run scheme. The other instance of invocations to create the rendering
surface have been audited and I can confirm that those are already in the
correct lifecycle callbacks. This was the only instance where the surface
creation was in a non-lifecycle callback.

Fixes https://github.com/flutter/flutter/issues/55969
(This issue has a clear reproducible test case and was used as the basis for
verification.)
Fixes https://github.com/flutter/flutter/issues/57676
(This is significantly harder to reproduce but the issue looks to be the same. I
tried this patch on multiple devices overnight and could not reproduce this.)

This underlying cause here was identified by the enhanced GPU error reporting
introduced in iOS 14. I am not able to submit those patches because the Beta
builders are not available on infra. I will submit those when available so that
issues like this have more actionable error messages in the future.
2020-07-07 17:14:01 -07:00
Chase Latta
cdf666d945 include list_libraries.dart as a snapshot for fuchsia (flutter/engine#19567) 2020-07-07 11:16:50 -07:00
James Clarke
71dafa45b1 Refactor Win32FlutterWindow in preparation for UWP windowing implementation (flutter/engine#18878)
* Add flutter_windows_view and window_binding_handler

Switch input handling infra to FlutterWindowsView

win32_flutter_window implement WindowBindingHandler

Strip unneeded functionality from win32flutterwindow

Fulfill WindowBindingHandler interface in Win32FlutterWindow

Add implementations for missing input handling in Win32FlutterWindow

Cleanup dead code

Correctly hook up rendering again

Fix resizing

clang-format

Fix clipboard

Cleanup

Rename

Add comments

cleanup

* clang-format

* CR Feedback

* clang-format; gn format

* Fix licensing

* CR feedback

* CR feedback

* CR feedback

* Git rid of unnecessar :: prefixes

* Extract WindowBindingHandlerDelegate as an interface

* Missing file

* Extract physical window bounds as a struct

* CR Feedback

* CR feedback

* clang-format

Co-authored-by: Stuart Morgan <stuartmorgan@google.com>
2020-07-07 06:49:51 -07:00
Kaushik Iska
8818677dfd Track motion events for reuse post gesture disambiguation (flutter/engine#19484)
This change makes it so that we track all the motion events encountered by `FlutterView` and all of its subviews in the `MotionEventTracker` class, indexed by a unique `MotionEventId`. This identifier is then passed to the Flutter framework as seen in https://github.com/flutter/flutter/pull/60930. Once the gestures take part in gesture disambiguation and are sent back to the engine, we look-up the original motion event using the `MotionEventId` and dispatch it to the platform.

Bug: https://github.com/flutter/flutter/issues/58837
2020-07-06 22:22:37 -07:00
Emmanuel Garcia
f9ad019129 Resubmit frame when the surface is switched (flutter/engine#19555) 2020-07-06 21:55:52 -07:00