3969 Commits

Author SHA1 Message Date
Tong Mu
45f496761f [Windows, Keyboard] Lift key event redispatching to KeyboardManagerWin32 (flutter/engine#30702) 2022-01-13 19:08:21 -08:00
Jason Simmons
e9dffcbe05 Ensure that PlatformViewIOS does not call into Shell semantics APIs during destruction (flutter/engine#30835) 2022-01-13 18:40:02 -08:00
Camille Simon
6e22c1fb87 Remove usages of deprecated setSystemUiVisibility() (flutter/engine#29493) 2022-01-13 12:40:10 -08:00
Alexander Biggs
116fe9190a [fuchsia] Switch from core-jit to core snapshots. (flutter/engine#30744) 2022-01-13 11:05:33 -08:00
ColdPaleLight
03e2fe4a87 Only creates 'onscreen_surface_' when it's not available in 'AndroidSurfaceGL::CreateSnapshotSurface' (flutter/engine#30590)
* Only creates 'onscreen_surface_' when it's not available in 'AndroidSurfaceGL::CreatePbufferSurface'

* Rename the function and add some unit tests

* Update android_surface_gl.h

Co-authored-by: Dan Field <dfield@gmail.com>
2022-01-13 10:17:01 -08:00
ColdPaleLight
af5e4cf7f4 Add a trace to GpuSurfaceMetal around canvas flushing (flutter/engine#30667) 2022-01-13 09:31:42 -08:00
Darren Chan
84aebe8bb6 Roll Fuchsia Linux SDK from DS-3oCidC... to 35I2K_Bou... (flutter/engine#30829)
* Roll Fuchsia Linux SDK from DS-3oCidC... to 35I2K_Bou...

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/fuchsia-linux-sdk-flutter-engine
Please CC kaushikiska@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

* Use zircon/rights.h instead of zx/cpp/fidl.h.

This helps us avoid namespace clashes, unblocking the SDK roll.

Co-authored-by: skia-flutter-autoroll <skia-flutter-autoroll@skia.org>
2022-01-12 19:53:59 -05:00
ColdPaleLight
ca35fae4bd Remove obsolete 'PlatformView::size_' member variable (flutter/engine#30812) 2022-01-12 16:35:09 -08:00
Tong Mu
400ee783e3 [Win32, Keyboard] Migrate FlutterWindowWin32 keyboard tests to keyboard_win32_unittests (flutter/engine#30808)
* Until AltLeft

* Alt right

* Meta keys

* Remove tests

* Format
2022-01-12 15:10:23 -08:00
ColdPaleLight
fdcc6befe9 Use the correct Settings in Engine::Spawn (flutter/engine#30741)
* Use the correct Settings in Engine::Spawn

* Add unit tests
2022-01-12 10:31:28 -08:00
Chris Bracken
9bca9234dc Win32: Fix Korean text input (flutter/engine#30805)
Fixes an issue with Korean IMEs wherein a text input state update may be
sent to the framework that misleads the framework into assuming that IME
composing has ended.

When inputting Korean text, characters are built up keystroke by
keystroke until the point that either:
* the user presses space/enter to terminate composing and commit the
  character, or;
* the user presses a key such that the character currently being
  composed cannot be modified further, and the IME determines that the
  user has begun composing the next character.

The following is an example sequence of events for the latter case:

1. User presses ㅂ. GCS_COMPSTR event received with ㅂ. Embedder sends
   state update to framework.
2. User presses ㅏ. GCS_COMPSTR event received with 바. Embedder sends
   state update to framework.
3. User presses ㄴ. GCS_COMPSTR event received with 반. Embedder sends
   state update to framework.
4. User presses ㅏ. At this point, the current character being composed
   (반) cannot be modified in a meaningful way, and the IME determines
   that the user is typing 바 followed by 나. GCS_RESULTSTR event
   received with 바, immediately followed by GCS_COMPSTR event with 나.

In step 4, we previously sent two events to the framework, one
immediately after the other:
* GCS_RESULTSTR triggers the text input model to commit the current
  composing region to the string under edit. This causes the composing
  region to collapse to an empty range.
* GCS_COMPSTR triggers the text input model to insert the new composing
  character and set the composing region to that character.

Conceptually, this is an atomic operation. The fourth keystroke causes
the 반 character to be broken into two (바 and ㄴ) and the latter to be
modified to 나. From the user's point of view, as well as from the IME's
point of view, the user has NOT stopped composing, and the composing
region has simply moved on to the next character.

Flutter has no concept of whether the user is composing or not other
that whether a non-empty composing region exists. As such, sending a
state update after the GCS_RESULTSTR event misleads the framework into
believing that composing has ended. This triggers a serious bug:

Text fields with input formatters applied do not perform input
formatting updates while composing is active; instead they wait until
composing has ended to apply any formatting. The previous behaviour
would thus trigger input formatters to be applied each time the user
input caused a new character to be input. This has the add-on negative
effect that once formatting has been applied, it sends an update back to
the embedder so that the native OS text input state can be updated.
However, since the GCS_RESULTSTR event is _immediately_ followed by a
GCS_COMPSTR, the state has changed in the meantime, and the embedder is
left processing an update (the intermediate state sent after the
GCS_RESULTSTR) which is now out of date (i.e. missing the new state from
the GCS_COMPSTR event).

Since GCS_RESULTR events are always immediately followed by a subsequent
GCS_COMPSTR (in the case where composing continues) or a
WM_IME_ENDCOMPOSITION (in the case where composing is finished), and
because the event handlers for both of those send updated state to the
framework, this change eliminates sending the (intermediate) state in
response to GCS_COMPSTR events.

Issue: https://github.com/flutter/flutter/issues/96209 (full fix)
Issue: https://github.com/flutter/flutter/issues/88645 (partial fix)
2022-01-12 10:00:58 -08:00
gaaclarke
1724b4f192 Reland: iOS Background Platform Channels (#29665) (flutter/engine#30697)
* iOS Background Platform Channels (#29665)

* added test that passes before this change, and fails after it

* started supporting backwards compatible usage of setting handlers
2022-01-12 09:57:29 -08:00
Matej Knopp
59414a9cd2 Only provide frame damage to rasterizer if partial repaint is enabled (flutter/engine#30704) 2022-01-12 15:19:01 +01:00
Chris Yang
a50ebf3955 Variable Refresh Rate Display (flutter/engine#30223) 2022-01-11 10:55:10 -08:00
ColdPaleLight
06addee8ac Remove unused setPersistentIsolateData function (flutter/engine#30795) 2022-01-11 10:25:10 -08:00
ColdPaleLight
975d330db0 Implemented library uri support for FlutterFragmentActivities (flutter/engine#30790) 2022-01-11 09:33:17 -08:00
gaaclarke
379651ad4f Implemented library uri support for FlutterFragments and FlutterActivities (flutter/engine#30726)
* Implemented library uri support for FlutterFragments and FlutterActivities.

* added docstrings

* emmanuel feedback
2022-01-10 14:21:21 -08:00
eggfly
ea4b23242b [android] Remove the FlutterView casting, add a @NonNull and fix code style (flutter/engine#30734) 2022-01-10 12:50:10 -08:00
Emmanuel Garcia
d81c472076 Remove glitch when displaying platform views (flutter/engine#30724) 2022-01-10 11:25:06 -08:00
Chase Latta
0f99fadcf2 Allow additional expose_dirs in flutter_runner (flutter/engine#30749)
Users can add an expose_dirs entry to the program field in a
component's cml file to optionally expose extra directories
from their out/ directory.

BUG: fxbug.dev/89690
2022-01-10 10:44:21 -08:00
LongCatIsLooong
db6f967f47 [iOS Text Input] Always forward press events to the view controller (flutter/engine#30580) 2022-01-07 13:15:03 -08:00
ColdPaleLight
99ae1b775f Remove AOT specific gates for isolate groups (flutter/engine#30743) 2022-01-07 10:05:10 -08:00
Alexander Biggs
a42101ccc6 [fuchsia] Add logging for when fdio_get_vmo fails. (flutter/engine#30742) 2022-01-07 10:00:10 -08:00
utzcoz
3e3ec2f1c7 Bump Robolectric to 4.7.3 (flutter/engine#30437) 2022-01-06 18:25:09 -08:00
Chase Latta
0d51ef6307 Fix aot builds in the dart_runner for fuchsia (flutter/engine#30722)
The dart_runner was crashing in aot builds. These changes allow the
dart_runner to run aot builds in fuchsia.
2022-01-06 16:45:53 -08:00
Tong Mu
adb05f30f7 Migrate keyboard_key_handler_unittests to keyboard_win32_unittests (flutter/engine#30615)
* Refactor to MockKeyResponseController (ATP)

* Implement LateResponding and move GetEngine in (ATP)

* RespondValue

* DisorderlyRepliedEvents

* SlowFrameworkResponse

* NeverRedispatchShiftRightKeyDown

* Migrate AltGr event. (ATP)

* Correctly handle sys messages.

* Remove SendInputInfo

* Comment and format
2022-01-05 17:19:14 -08:00
Alexander Biggs
3b0bf783c6 [fuchsia] Fix failing SDK roll. (flutter/engine#30675) 2022-01-05 14:32:08 -08:00
Kaushik Iska
41819f25e7 Revert "Only provide frame damage to rasterizer if partial repaint is enabled (#30461)" (flutter/engine#30696) 2022-01-05 14:14:31 -08:00
freiling
bec2463034 [fuchsia][shader warmup] fix for fxbug.dev/90387 (flutter/engine#30482)
Warmup surface was being initialized on the platform thread rather than
the raster thread which was causing races in the skia cache, this change
just moves the warmup surface intiialization to the raster thread.

This change also addresses another minor problem where invoking shader
warmup with 0 skps would drop the callback on the floor and that would
cause the dart future to hang forever. Simply invoke the dart future if
no SKP's are provided.
2022-01-05 14:08:23 -08:00
godofredoc
edb4651636 GN targets for generating release artifacts (flutter/engine#30679) 2022-01-05 12:10:02 -08:00
Tong Mu
4cfe108309 [Win32, Keyboard] TextInputPlugin is no longer a KeyboardHandlerBase (flutter/engine#30456)
* Impl

* format

* Comment
2022-01-05 04:09:32 -08:00
Matej Knopp
6e84bb64f5 Only provide frame damage to rasterizer if partial repaint is enabled (flutter/engine#30461)
* Only provide frame damage to rasterizer if partial repaint is enabled
2022-01-04 23:18:49 +01:00
gaaclarke
201909edd4 Removed "UiThread" annotation from MethodChannel#Result. (flutter/engine#30671) 2022-01-04 13:06:40 -08:00
Alexander Biggs
2d7d92e665 [fuchsia] Fix SDK roll failure. (flutter/engine#30600)
- Remove unused zx include. This include redefines several symbols that are now coming from
the SDK. See this SDK roll failure
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8826397088488060737/+/u/build_fuchsia_debug_x64_flutter_shell_platform_fuchsia:fuchsia_fuchsia_tests/stdout. This include does not appear to be used.

- Replace use of non-standard countof C++ feature. This feature does not appear to be defined anymore in the latest toolchain.
2021-12-31 08:15:00 -08:00
Chinmay Garde
bdd74b092a Make sure the GLFW example compiles. (flutter/engine#30442) 2021-12-21 12:29:09 -08:00
Alexander Biggs
da7796c917 Remove unused SpawnIsolate function. (flutter/engine#30364)
This function is only used by a single unit test and makes it more difficult to read how isolates get created on different platforms.
2021-12-21 14:53:47 -05:00
eggfly
8d18d929e5 [android] Provide a path instead of throwing NPE when getDir() suites returns null (flutter/engine#30367) 2021-12-16 22:09:09 -08:00
Chris Bracken
e9eeafb871 Fix incorrect test names (flutter/engine#30385)
There were two tests in the FlutterWindowsView tests that were tagged as
FlutterWindowsEngine tests. This corrects those.
2021-12-16 15:23:05 -08:00
freiling
1e72eb3be4 [fuchsia][flatland] Tests for FlatlandPlatformView (flutter/engine#29999) 2021-12-16 13:14:09 -08:00
Igor Cota
3ce5370e35 maybeGetInitialRouteFromIntent: check if URI data getPath() is null (flutter/engine#29766) 2021-12-16 13:09:13 -08:00
Chris Bracken
6a6541b4de Windows: Implement IAccessible hit testing (flutter/engine#30366)
IAccessible objects should implement accHitTest. Our implementation, in
AXPlatformNodeWin, delegates hit testing to
AXPlatformNodeDelegate::HitTestSync. Here, we do a quick recursive
depth-first walk of the accessibility tree to return the best match.

We define the best match as the deepest node in the tree that contains
the point under test whose children do not.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-16 10:13:15 -08:00
Emmanuel Garcia
522e4f06b6 Keep a single source of truth for embedding dependencies (flutter/engine#30359) 2021-12-15 23:39:02 -08:00
Jenn Magder
9b19d77c75 Revert "Removed the email warning about notifications entitlement" (flutter/engine#30330) 2021-12-14 18:09:02 -08:00
Tong Mu
3fface0f66 [Win32, Keyboard] Abstract KeyboardManager from FlutterWindowWin32 (flutter/engine#30296) 2021-12-14 17:54:03 -08:00
Jim Graham
46a8def326 Opacity peephole optimization (flutter/engine#29775) 2021-12-14 16:19:09 -08:00
Chris Bracken
a2d82caeab Desktop: Support a11y slider widgets (flutter/engine#30322)
Adds support to the common desktop accessibility bridge for widgets that
include a semantics node with the `isSlider` flag set.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-14 11:20:16 -08:00
Jenn Magder
aaaf467b08 Add logging to scrollable semantics test (flutter/engine#30321) 2021-12-14 11:14:02 -08:00
Dan Field
b38b90c039 Revert "Fix eglPresentationTimeANDROID is no effective" (flutter/engine#30310)
* Revert "Fix eglPresentationTimeANDROID is no effective (#30182)"

This reverts commit 0d7ba05d3456807e7e24353fe911738952a02888.

* Revert "Use eglPresentationTimeANDROID to avoid bogging down the GPU (#29727)"

This reverts commit edb87942de0404a2802351c050a4f1b6de239bd7.
2021-12-13 20:02:20 -08:00
Dan Field
87dcc5293f Optmize path volatility tracker (flutter/engine#30299) 2021-12-13 16:59:04 -08:00
Chris Bracken
a9722681ef Support toggle buttons for desktop accessibility (flutter/engine#30297) 2021-12-13 11:04:05 -08:00