2931 Commits

Author SHA1 Message Date
Kaushik Iska
caf678d30f
Move common graphics utils to //flutter/common/graphics (#22320) 2020-11-10 12:34:02 -08:00
xster
d642a939c3
move deprecation from the PluginRegistry outer interface to inner, v1-specific fields (#22345) 2020-11-09 13:57:06 -08:00
Chris Yang
2560b5321a
[PlatformViewsController] Clear root_views_ in Reset (#22403) 2020-11-09 12:34:01 -08:00
Chris Yang
fb72023d38
Reland "Do not involve external_view_embedder in submit frame process if threads are not merged. #22275" (#22372) 2020-11-06 21:04:02 -08:00
Gary Qian
e231e3bc93
Remove extra method in ComputePlatformResolvedLocale (#22362) 2020-11-06 16:34:45 -08:00
Chris Bracken
74472ce6da
Revert "Rasterizer is initialized with an external view embedder (#22348)" (#22367)
This reverts commit 0d5f2e901d1953d04eb45004666d34a4537a0060.

Due to merge conflicts, this also reverts #22275:

Revert "Do not involve external_view_embedder in submit frame process if threads are not merged. (#22275)"

This reverts commit 016fbde1bb275288242e2cf097b52af1dd66ab06.
2020-11-06 15:26:47 -08:00
Greg Spencer
13a624ac31
Use dispatchKeyEvent, and handle keys sent to InputConnection.sendKeyEvent on Android (#22340)
This (mostly) re-lands #21163, which was reverted in #22321

This switches from using onKeyDown to using dispatchKeyEvent on Android so that keys can be intercepted handled by the framework and not continue to be dispatched to other controls.

It also now intercepts key events sent to InputConnection.sendKeyEvent, as some IMEs do (e.g. the Hacker's Keyboard), and sends them to Flutter.

This fixes the problem where (for example) pressing TAB on a hardware keyboard sends the tab to both the text field and to the focus traversal system.

Note that we still can't intercept all keystrokes given to a soft keyboard, only those which the soft keyboard decides to send to InputConnection.sendKeyEvent, and system keys (like the back button) are only received if the IME doesn't eat them.
2020-11-06 12:45:47 -08:00
Chris Yang
016fbde1bb
Do not involve external_view_embedder in submit frame process if threads are not merged. (#22275) 2020-11-06 11:04:01 -08:00
Kaushik Iska
0d5f2e901d
Rasterizer is initialized with an external view embedder (#22348)
This allows us to not rely on surface methods for getting
the external view embedder.
2020-11-06 09:01:28 -08:00
Kaushik Iska
6e95e005f1
Platform views have CreateExternalViewEmbedder (#22214) 2020-11-06 05:30:48 -08:00
chunhtai
acaef6f00d
Revert "Added the ability to set the initial route via launch urls. (#21336)" (#22337) 2020-11-05 16:09:01 -08:00
Kaushik Iska
f3c5ecd35c
Roll dart e182eac158cf..9bc7d4604277 (#22332) 2020-11-05 15:59:02 -08:00
William Wold
bc45d04f4b
Set the IM context when showing the input method (#21896) 2020-11-06 09:22:17 +13:00
Greg Spencer
5d481fb9c1
Revert "Reland: Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (#22304)" (#22321)
This reverts commit 7a8057bd728772d5b7ff2451301d6c095d6bda1b because it breaks back button functionality.
2020-11-05 09:02:25 -08:00
freiling
3105db8ee8
SKP based shader warmup (#20643) 2020-11-04 23:19:02 -08:00
Greg Spencer
7a8057bd72
Reland: Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (#22304)
This re-lands #21163, which was reverted in #22004

Now that flutter/flutter#67359 has landed, this change will no longer cause spaces (and other shortcuts) to be ignored in text fields if there is no action associated with the intent, even if there is a shortcut key mapping to an intent.

It also no longer causes web test failures (as far as I can tell without submitting it: the same tests don't fail locally).

Here's the original PR description:

This switches from using dispatchKeyEvent to using dispatchKeyEventPreIme so that keys can be intercepted before they reach the IME and be handled by the framework.

It also now intercepts key events sent to InputConnection.sendKeyEvent, as some IMEs do (e.g. the Hacker's Keyboard), and sends the to Flutter before sending them to the IME (which it now only does if they are not handled by the framework).

This fixes the problem where pressing TAB on a hardware keyboard sends the tab to both the text field and to the focus traversal system.

Note that we still can't intercept all keystrokes given to a soft keyboard, only those which the soft keyboard decides to send to InputConnection.sendKeyEvent.
2020-11-04 15:54:21 -08:00
stuartmorgan
bf259226b2
Switch Linux embedding to proc table embedder API (#22280)
Switches the Linux embedding from the standard C API to the new proctable version, to allow for unit testing of the embedding layer separately from the embedder APIs implementation.
2020-11-04 15:12:44 -08:00
chunhtai
f61cbc05f0
Revert "support uri intent launcher in android (#21275)" (#22298) 2020-11-04 15:04:02 -08:00
Matej Knopp
acc246676c
Fix code style issues in MacOS embedder (#22270) 2020-11-04 14:49:03 -08:00
gaaclarke
122f242588
added unit tests to the rasterizer (#22282) 2020-11-04 13:56:29 -08:00
Omar Emara
092cbf519c
Fix Linux handling of window exposure events (#22268)
Currently, the Linux embedder does not handle window exposure events.
This is typically not a problem for users who use compositing window
managers, since they keep the display buffers even if the window is
completely covered. However, for users that don't use a compositor, the
window will not be redrawn by the engine if it was previously covered
until another event triggers the redraw.

This patch implements the GtkWidget draw callback to handle window
exposure events. The callback doesn't actually draw anything, it just
schedule a frame for drawing by the engine.

The engine doesn't support exposure events, so instead, we force redraw
by sending a window metrics event of the same geometry. Since the
geometry didn't change, only a frame will be scheduled.
2020-11-04 16:43:47 +13:00
stuartmorgan
91eab23eb3
Switch Windows embedding to proc table embedder API (#22211)
Switches the Windows embedding from the standard C API to the new proctable version, to allow for unit testing of the embedding layer separately from the embedder APIs implementation. This includes moving some engine messaging that was still in flutter_windows to the C++ engine class to better encapsulate the proc table.
2020-11-03 14:36:18 -08:00
Daco Harkes
ccdb6819ce
WeakPersistentHandle migration (#19843)
and roll Dart to 52783837369de45d3372cb6c6b7cdd63e71cd829.
2020-11-03 13:06:53 +01:00
stuartmorgan
3d194fa545
Switch macOS embedding to proc table embedder API (#21811)
Converts the macOS embedding to use the new proc table version of the embedding API, and adds one example unit test using it to demonstrate and validate the approach.
2020-11-02 21:44:10 -08:00
Robert Ancell
bd19181117
Add braces on if statements to match linter style (#22130) 2020-11-03 12:32:39 +13:00
stuartmorgan
46e3bba999
Defer Windows arrow key and delete handling (#22207)
The framework handles arrow keys, delete, and backspace (and with better
unicode support), so we shouldn't handle them at the embedding level.

Fixes #69202
2020-11-02 11:09:03 -08:00
chunhtai
9b4bb20ac9
makes android semanticsnode to ignore hittest if it is not focusable (#22205) 2020-11-02 09:53:01 -08:00
gaaclarke
4e9459e007
Refactored the FlutterEngine to make it easier to implement spawn functionality (#21890) 2020-10-30 15:29:10 -07:00
Kaushik Iska
37d766c0dc
Fix includes to start with shell (#22227)
See b/172031915
2020-10-30 08:51:32 -07:00
Robert Ancell
8d3d953192
Fix warning when no entrypoing args provided. (#22136)
Fixes errors like:
GLib-CRITICAL **: 14:20:17.248: g_strv_length: assertion 'str_array != NULL' failed

Introduced in fc72bd2ada5d8d9b4ab2c1255d4f960cc44b5de0
2020-10-30 14:57:35 +13:00
Robert Ancell
382f5ccba5
Fix incorrect parameter used for self object (#22135)
Fix incorrect parameter used for self object

Rename the GWeakNotify function parameters.
This matches the prototype and makes it harder to accidentally use the object
parameter the wrong way.
2020-10-30 14:52:24 +13:00
Lazy Llama
7d6180c301
Fix viewInset.bottom and viewPadding.bottom… (#21730) 2020-10-29 17:28:01 -07:00
Kaushik Iska
99cc50dfff
[ios] Surface factory holds the canonical reference to the external view embedder (#22206)
This furthers the refactor of making platform view hold the reference to
the external view embedder on iOS.
2020-10-29 16:47:31 -07:00
mikaelpessa
7a7804b6d3
Add "input shield" to capture pointer input for reinjection (#22067) 2020-10-29 15:23:02 -07:00
J-P Nurmi
bb32446c68
Fix FlTextInputPlugin tear down (#22007) 2020-10-29 15:18:04 -07:00
J-P Nurmi
28497c864b
Fix typos in FlValue docs (#21875) 2020-10-29 15:13:04 -07:00
Anirudh Balaji
b457e2dd85
Refactor make_mock_engine into fl_test (#21585) 2020-10-29 15:08:03 -07:00
stuartmorgan
caf32d5b28
Add a proc table version of embedder API (#21813) 2020-10-29 13:13:03 -07:00
Kaushik Iska
f81bc371c0
[profiling] Handle thread_info to account for killed threads (#22170)
Fixes: https://github.com/flutter/flutter/issues/63025
2020-10-29 12:06:16 -07:00
Kaushik Iska
d6627c6a7d
Reland [ios] Refactor IOSSurface factory and unify surface creation (#22016) 2020-10-29 11:58:03 -07:00
stuartmorgan
06b0910e2d
Fix possible use of std::moved value in Rasterizer (#22125) 2020-10-28 18:12:03 -07:00
George Wright
62d50af37e
Add plumbing for command line arguments on Windows (#22094) 2020-10-28 18:07:03 -07:00
Alexander Brusher
0270632d85
Includes roles for links, checkboxes, and radio buttons in semantics (#22061) 2020-10-28 18:02:02 -07:00
Matej Knopp
e61e8c2482
Smooth window resizing on macOS (#21525) 2020-10-28 11:12:04 -07:00
stuartmorgan
c896d6d1bb
Defer macOS arrow and backspace handling to framework (#22063)
The Flutter framework now has handling for arrow keys and backspace
in its editable text, so they no longer need to be handled in the
embedding. This not only avoids duplicate work, but improves the
handling of complex unicode (surrogate pairs, grapheme clusters) which
are currently correctly handled in the framework but not the macOS
embedding.

Fixes https://github.com/flutter/flutter/issues/68497
2020-10-26 12:56:30 -07:00
Kaushik Iska
a598f23763
[ios] Convert FlutterPlatformViewsController to smart pointer (#22082)
* Convert FlutterPlatformViewsController to smart pointer

* have a const reference of platform views controller

* change more stuff to references
2020-10-26 09:45:09 -07:00
gaaclarke
25bb31ef68
Added the ability to set the initial route via launch urls. (#21336) 2020-10-26 09:31:23 -07:00
Jason Simmons
5677d3dea5
Reformat some files that were not auto-formatted (#21940) 2020-10-23 18:57:03 -07:00
Filip Filmar
992689c70d
[fuchsia] Adds a test for timezone change (#21934) 2020-10-23 18:52:02 -07:00
chunhtai
742dfbefad
support uri intent launcher in android (#21275)
* support uri intent launcher in android

* fix comment
2020-10-22 15:54:30 -07:00