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
[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.
* [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.
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)
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
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>
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.
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.
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.
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