3236 Commits

Author SHA1 Message Date
Ryan Knauer
9a24208940 Add support for right-click in GLFW. (flutter/engine#25110) 2021-03-25 16:23:06 -07:00
shuoch-g
7a83f0694b Let FlutterEngine to turn off automaticallyRegisterPlugins from AndroidManifest.xml. (flutter/engine#24479) 2021-03-25 14:59:02 -07:00
Kaushik Iska
9f88f31f86 Highlight VSync support for embedders (flutter/engine#25247)
Chrome Trace viewer treats events labeled "VSYNC" as special and highlights them (when the "Highlight Vsync" checkbox is enabled). Ideally VSYNC events are generated by the host system at their source. System VSYNC events are indeed present in full-system systraces. Flutter-level traces (as seen in Observatory/Flutter devtools) do not contain the system VSYNC events, so we rely on the engine to generate them (as close to where they would be generated by the system ideally).
2021-03-25 14:58:44 -07:00
gaaclarke
5633133996 Revert "Started waiting for the notifications locally before asserting side effects (#25226)" (flutter/engine#25248)
This reverts commit 88028595191186f24a63a33e17f2a6bdd443824c.
2021-03-25 13:48:35 -07:00
gaaclarke
8802859519 Started waiting for the notifications locally before asserting side effects (flutter/engine#25226) 2021-03-25 11:14:01 -07:00
chunhtai
dd9fcd6de3 Fixes android voice access delete text, redo, and undo actions. (flutter/engine#25050)
* Fixes android voice access delete text, redo, and undo actions

* account for unicode
2021-03-25 10:42:01 -07:00
Michael Goderbauer
d627e66bcf remove ignores (flutter/engine#25131) 2021-03-25 10:19:01 -07:00
apankhurst
6040569c1b Fuchsia: filed crash reports are marked as non-fatal (flutter/engine#24980)
Flutter crash reports on Fuchsia are considered non-fatal because they're not filed in response to the termination of the Flutter application, just a Dart exception that was thrown.
2021-03-23 13:56:51 -07:00
Wu Zhong
0fc1ff7bc1 [iOS] Fixes platform view clipped when FlutterView has non-zero offset (flutter/engine#24893) 2021-03-23 10:01:01 -07:00
xster
708d427d93 Make DartExecutor.isExecutingDart account for spawned engines (flutter/engine#25171) 2021-03-23 09:50:03 -07:00
gaaclarke
58151aed7d Switched assert(x > 0) to assert(x != 0) to handle tagged pointers in java (flutter/engine#25174) 2021-03-23 18:19:56 +08:00
George Wright
0317a21159 Add AXPlatformNodeWin and AXFragmentRootWin (flutter/engine#25121)
* Remove IAccessible and IChromeAccessible from AXPlatformNodeWin

* Fixes to make AXPlatformNodeWin, AXFragmentRootWin and associated unit
tests work and pass in Flutter/Windows
2021-03-22 16:59:38 -07:00
Chris Bracken
d2800926d1 Decode empty message to nil in standard codec (flutter/engine#25064)
This updates Flutter.*Codec `decode:` implementations to treat empty
messages as equivalent to nil or NSNull, which avoids a crash when we
subsequently otherwise try to read the type/value from the message. This
handles the case where the sender were to send `null` over the channel.
e.g.,

    final channel = BasicMessageChannel<Object?>('somechannel', StandardMessageCodec());
    channel.send(null);

It also updates the macOS embedder to send nil to the decoder when a
zero-length message is received in order to be consistent with the iOS
embedding.

Previously, the macOS embedder always encoded platform messages as
NSData regardless of length:
ca1a7760b4/shell/platform/darwin/macos/framework/Source/FlutterEngine.mm (L498-L500)

The iOS embedder did not have this issue since it special-cased
zero-length messages as nil:
ca1a7760b4/shell/platform/darwin/ios/framework/Source/platform_message_router.mm (L23-L26)

Bug: https://github.com/flutter/flutter/issues/78003
2021-03-18 14:09:37 -07:00
Gary Qian
1d44011816 Sanitize textInRange inputs to prevent invalid argument exceptions (flutter/engine#25036) 2021-03-17 23:59:16 -07:00
Kaushik Iska
ca7c19d772 Revert "Reland "Remove pipeline in favor of layer tree holder" (#24947)" (flutter/engine#25027) 2021-03-16 16:43:01 -07:00
Gary Qian
a203c370aa Call request on platform thread (flutter/engine#25004) 2021-03-16 14:48:01 -07:00
Kaushik Iska
40c0b51d5e [macos] [metal] Fix use after free in FlutterExternalTextureMetal (flutter/engine#24995)
* [macos] [metal] Fix use after free in FlutterExternalTextureMetal

This also adds a test for the said failure

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

* fix review comments
2021-03-16 13:55:28 -07:00
Tong Mu
005b81f13f Hardware Keyboard: macOS (flutter/engine#23469)
The macOS changes for the Hardware Keyboard project.
2021-03-15 22:35:46 -07:00
Gary Qian
5359dffc36 [deferred components] Handle base module loading units (flutter/engine#24983) 2021-03-15 17:48:01 -07:00
chunhtai
340eecd0a9 fixes reference retaining issue in flutter text input plugin (flutter/engine#24768) 2021-03-15 14:28:01 -07:00
chunhtai
521edb0159 fix selectable text selections are not announced in voice over (flutter/engine#24933) 2021-03-15 14:23:02 -07:00
gaaclarke
13c0c1a096 Fixed issue where the gpu disable syncswitch was being overridden after init. (flutter/engine#24958) 2021-03-15 14:22:27 -07:00
Yuhui Huang
8d051fad2f fix printing Failed to determine valid GL format (flutter/engine#24964) 2021-03-12 22:36:25 -08:00
James Clarke
82f95901a3 Windows: Switch UWP build to using winrt generated headers (flutter/engine#24861)
* Switch build to using generated headers

* Update DEPS to pick up newer buildroot

* Only run hook on Windows
2021-03-11 21:52:53 -08:00
Matej Knopp
e02b1aeee5 Send -1 for empty composition range (flutter/engine#24865)
https://github.com/flutter/flutter/issues/77600
2021-03-11 15:17:42 -08:00
huanghongxun
87509d8518 Fix incorrect texture format with OpenGL ES 2021-03-12 11:27:02 +13:00
Kaushik Iska
660e70b250 Reland "Remove pipeline in favor of layer tree holder" (flutter/engine#24947) 2021-03-11 10:56:08 -08:00
Yuhui Huang
e56f733369 Fix high CPU consumption (flutter/engine#24944) 2021-03-11 10:32:44 -08:00
Matej Knopp
fad37e65ca End composing when inserting text (flutter/engine#24866)
https://github.com/flutter/flutter/issues/77544
2021-03-11 10:27:45 -08:00
Jason Simmons
0d98a065b9 Detach the newly created EGL context from the main thread in the embedder unit tests (flutter/engine#24908)
The EGL context will be used by other threads during test execution, and it
should not be active on multiple threads at the same time.  This was not
noticed previously because SwiftShader was not checking for this, but other
EGL implementations may enforce this constraint.
2021-03-10 11:29:48 -08:00
chunhtai
9a28a147ac fix voice control delete line command does not delete line correctly (flutter/engine#24831) 2021-03-10 10:45:03 -08:00
chunhtai
a48966cc4f Wires up accessibility bridge in mac embedding (flutter/engine#23870)
* Wires up accessibility bridge in mac embedding

* addressing comment

* addressing comments
2021-03-10 10:44:22 -08:00
Chris Bracken
e2a2a79a1d Add framebuffer destruction_callback for Linux (flutter/engine#24901)
While we no longer crash when the framebuffer destruction_callback is
null (patched in https://github.com/flutter/engine/pull/24845) we should
bet setting one, even if it's a no-op containing a comment pointing to
where cleanup is implemented.
2021-03-10 10:26:49 -08:00
Gary Qian
3f022df5d0 Rename moduleName to componentName for consistency (flutter/engine#24906) 2021-03-10 03:20:01 -08:00
xster
c0b9da55ea update links from https://github.com/flutter/engine/pull/24766 (flutter/engine#24818) 2021-03-09 23:45:02 -08:00
Ren You
4885af8ae3 Revert "Fix memory leak and bug in the RunsOnCreationTaskRunner check (#24690)" (flutter/engine#24874)
This reverts commit e0a475111216cf4775e08441100c0b6a24fd8b84.
2021-03-09 06:29:42 -08:00
Chris Bracken
a712590dfc Only call destruction_callback if non-null (flutter/engine#24845)
In MakeSkSurfaceFromBackingStore and other places in embedder.cc, we
call a texture or framebuffer destruction callback without first
verifying it's non-null. This adds a check before such calls.

Currently fl_renderer_gl_create_backing_store() in the Linux GTK
embedder and ExternalTextureGL::PopulateTexture() in the Windows
embedder either explicitly or implicitly set a null destruction
callback.

This prevents a crash reported when running under OpenGL ES 2.0 reported
in https://github.com/flutter/flutter/issues/76881.

While this prevents the crash, it does not fix the underlying issue.
2021-03-08 17:31:22 -08:00
Chris Bracken
13cf185e1c Correct setup-related typos (flutter/engine#24846)
Corrects uses of setup as a verb to 'set up', leaves noun/noun-phrase
forms of setup as 'setup'. Also settles on 'teardown' as opposed to
tear-down for consistency across the codebase.

A few other minor comment/wording corrections.
2021-03-08 17:31:10 -08:00
David Worsham
5f2b7a72ab fuchsia: Correct PlatformView scale/transform (flutter/engine#24645) 2021-03-08 15:18:16 -08:00
Emmanuel Garcia
503af63aef Prevent race condition while switching surfaces (flutter/engine#24838) 2021-03-05 21:50:13 -08:00
Emmanuel Garcia
e5ca96cc41 Revert "Replace Flutter surface only after all platform views are destroyed (#24363)" (flutter/engine#24800)
This reverts commit 5d850382d4205a9e2f5d42383d63ecb8cae2247b.
2021-03-05 10:45:20 -08:00
J-P Nurmi
069154f7ee [linux] Fix text selection via Shift+Home/End (flutter/engine#24623)
Adds TextInputModel::SelectToBeginning/End() and applies when shift key is pressed.
2021-03-05 08:51:33 -08:00
chunhtai
92d11213ff Adds set text action for voice access (flutter/engine#24734) 2021-03-04 17:44:01 -08:00
Matej Knopp
aa32d53a38 Use hidden window to process flutter messages (flutter/engine#24232)
https://github.com/flutter/flutter/issues/75500
2021-03-04 14:35:15 -08:00
Kaushik Iska
abc42cde56 Guard metal rendering behind SHELL_ENABLE_METAL (flutter/engine#24727) 2021-03-04 09:04:01 -08:00
chunhtai
935384301f Enables semantics when voice control is turned on (flutter/engine#24640) 2021-03-03 17:24:02 -08:00
Chris Bracken
e77d5ec898 Move CIPD package creation tools under tools/cipd (flutter/engine#24766)
This moves tooling related to the creation of the Android embedding
bundle CIPD package under tools/cipd. Having a single location for CIPD
package creation tooling avoids spreading these around the tree and aids
in discovery.

This does not change the path within the CIPD package repo, nor does it
change the path to which we download it via gclient as specified in the
DEPS file.

This will be followed by a patch to add a new Windows CIPD package
necessary for UWP builds.
2021-03-03 15:21:28 -08:00
James Clarke
9beda3c62b Fix UWP build for UpdateCursorRect rename (flutter/engine#24697) 2021-03-02 19:34:53 -08:00
Emmanuel Garcia
e0a4751112 Fix memory leak and bug in the RunsOnCreationTaskRunner check (flutter/engine#24690) 2021-03-02 12:39:02 -08:00
Chris Bracken
ee19dbeb1b Win32: Support Korean input (flutter/engine#24713)
This change fixes a bug in Korean input whereby WM_IME_COMPOSITION
messages of type GCS_RESULTSTR were assumed to end composing mode.

This change breaks out an additional handler for "commit composing text"
events. In Japanese/Chinese IMEs, these events typically occur on
selection of a candidate from the candidates list and are mostly
synonymous with an "end composing" event.

In Korean text input, there is no candidates list, but rather a
character is built up as keypresses are handled, and committed as soon
as the character is unambiguously complete; in other words, when either
space/return is pressed or a keypress is received that cannot be
interpreted as a modification of the character being composed and
therefore must be the first keystroke of a new character. In these
cases, we want to commit the previous character without ending the
composition.

To illustrate with an example:
1. User focuses on a text field and sets input mode to Hangul.
2. User presses 'ㄱ'. Composing region contains 'ㄱ'.
3. User presses 'ㅏ'. Composing region is updated to '가'.
4. User presses 'ㄴ'. Composing region is updated to '간'.
5. User presses 'ㅏ'. Result string '가' is committed. Composing region is
   updated to '나'.
6. User presses 'ㄷ'. Composing string is updated to '낟'.
7. User presses 'ㅏ'. Result string '나' is committed. Composing region is
   updated to '다'.
8. User presses space or enter. Result string '다' is committed.
   Composing is ended.

On a non-Korean QWERTY keyboard the following key mappings serve to
perform the above input:
* r -> ㄱ
* k -> ㅏ
* s -> ㄴ
* e -> ㄷ

To support the above, we break out a separate "commit composing" method
and commit on WM_IME_COMPOSITION events of type GCS_RESULTSTR and end
composing on WM_IME_ENDCOMPOSITION events. Further, we eliminate the
workaround in the GCS_RESULTSTR handler for continued composition on
Chinese/Japanese IMEs now that we're no longer ending composition on
that event type.
2021-03-02 10:14:27 -08:00