3437 Commits

Author SHA1 Message Date
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
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
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
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
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
Chris Bracken
a9722681ef Support toggle buttons for desktop accessibility (flutter/engine#30297) 2021-12-13 11:04:05 -08:00
voicewitness
600e46b8b0 Fix wrong context when use platfromview (flutter/engine#30184) 2021-12-12 22:14:05 -08:00
Marcel Kirchhoff
f27c7836eb Fix typo in jni registration (flutter/engine#30282) 2021-12-12 18:14:09 -08:00
Dan Field
9a45b6d009 Revert "iOS Background Platform Channels (#29665)" (flutter/engine#30289)
This reverts commit 7ab226eaf44a58e380fee9023b5eaf2eb6f73233.
2021-12-12 13:43:48 -08:00
MiracleSoul
0d7ba05d34 Fix eglPresentationTimeANDROID is no effective (flutter/engine#30182)
* Fix eglPresentationTimeANDROID is no effective

* Update android_environment_gl.cc

Co-authored-by: Dan Field <dfield@gmail.com>
2021-12-10 11:05:25 -08:00
Emmanuel Garcia
dceed9cd73 Migrate to Mockito 4.1.0 (flutter/engine#30257) 2021-12-10 10:19:10 -08:00
Chris Bracken
2474482021 Override FlutterPlatformNodeDelegate::GetUniqueId (flutter/engine#30261)
The default implementation of GetUniqueId on ui::AXPlatformNodeDelegate
always returns ID 1. We had previously implemented this on the windows
platform node delegate, but for consistency's sake, and because the
default implementation is surprising, we're promoting this to the
FlutterPlatformNodeDelegate base class.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-10 10:05:00 -08:00
chunhtai
95eab38132 Android accessibility bridge also fire selection change event when it predict selection change. (flutter/engine#30199) 2021-12-10 10:04:08 -08:00
Chris Bracken
f5dc978476 Test shell/platform/common a11y code on Windows (flutter/engine#30262)
This enables unittests for the accessibility bridge in
common_cpp_unittests, when running on Windows. Previously, we only
tested on macOS.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-09 22:49:50 -08:00
Chris Bracken
82f25e5da7 Fix TestAccessibilityBridgeDelegate event caching (flutter/engine#30260)
TestAccessibilityBridgeDelegate::accessibility_events previously held
values of type ui::AXEventGenerator::TargetedEvent. TargetedEvent
contains an AXNode pointer and a const reference to a
ui::AXEventGenerator::EventParams object, and as such it's unsafe to
make or read copies of TargetedEvent values outside the scope of the
AccessibilityBridgeDelegate::OnAccessibilityEvent callback.

In this patch, we update the accessibility_events vector to simply hold
EventType values since this is the only part of the value we use in our
existing tests. If in future we need the full TargetedEvent, we'll need
to properly copy these values.

This patch also fixes a typo in the accessibility_events identifier and
converts an EXPECT_EQ to an ASSERT_EQ in a case where the following
test expectations are meaningless/could crash if the
accessibility_events size isn't as expected.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-09 22:08:58 -08:00
Chris Bracken
616ed57c9b Simplify win32 platform node delegate GetParent (flutter/engine#30258)
In the Win32 accessibility tree, each AXTree node has an associated
IAccessible object. In WindowWin32, our WM_GETOBJECT handler returns the
IAccessible associated with the root node of the tree (node 0). On other
platforms, we often add our root accessibility object as a subnode of
some existing accessibility object associated with the view. On Windows,
the root IAccessible _is_ the accessibility object associated with the
view (on Windows, and HWND).

In the previous implementation, AccessibleObjectFromWindow actually just
returns the root IAccessible object, which is equivalent to just
returning GetNativeViewAccessible. Instead, we just return null once we
hit the root of the tree.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-09 19:29:11 -08:00
Chris Bracken
01b8db3de9 Call IAccessible::accFocus to move a11y focus (flutter/engine#30256)
On receipt of a FOCUS_CHANGED event from the AX tree, call
IAccessible::accFocus to tell screen readers to move the accessibility
focus to that node. This is in addition to setting the keyboard focus
via the EVENT_OBJECT_FOCUS event.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-09 15:58:07 -08:00
Chris Bracken
5992275cdb Win32: Handle OnAccessibilityEvent (flutter/engine#30176)
Implements OnAccessibilityEvent, which translates events from the AXTree
into Windows MSAA event notifications.

This also eliminates the UIA root object lookup in response to
WM_GETOBJECT, since our initial implementation, like Chromium's default
implementation, is based on MSAA.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-09 14:38:24 -08:00
Amanda
6819f18463 [fuchsia] Use network-legacy-deprecated pkg in embedder test (flutter/engine#30244) 2021-12-09 13:34:05 -08:00
Rulong Chen(陈汝龙)
915625716a [android] Fix unexpected behavior in |detachFromFlutterEngine|. (flutter/engine#30202) 2021-12-09 10:44:04 -08:00
eggfly
d459933b42 [Android] Fix mEditable NullPointerException in TextInputPlugin (flutter/engine#30145) 2021-12-08 20:19:05 -08:00
Chris Bracken
0d41ebed6a Implement GetUniqueId on Windows node delegates (flutter/engine#30204)
`AXPlatformNodeDelegate` provides a default implementation of
`GetUniqueId()` which returns the same value (1) for all nodes.
`AXPlatformNodeWin` relies on a unique ID being returned from this
method in its `GetTargetFromChildID` method.

In the world MSAA accessibility, each `HWND` may have a root
`IAccessible` object associated with it. Events are fired by calling the
`NotifyWinEvent` Win32 call and specifying:

1. The `HWND` (in our case, the one associated with our `WindowWin32`)
2. The target object (`OBJID_CLIENT` for the root `IAccessible`
   associated with that `HWND`)
3. A child identifier that uniquely identifies the target node in the
   tree

This child identifier can be one of:

* `CHILDID_SELF` for events targeting the root `IAccessible`.
* A positive integer that specifies the index of a direct child of the
  root.
* A negative integer which, when negated, specifies the unique ID of a
  child within the tree.

On receipt of an accessibility event, `AXPlatformWin` (our `IAccessible`
implementation) looks up the target `IAccessible` from the child ID
specified on the event using its `GetTargetFromChildID` method and
delegates the appropriate method call to that object.

So, why is this implemented on our `AXPlatformNodeDelegate` subclass and
not on `AXPlatformNodeWin` itself? Because the implementation of
`AXPlatformNode::GetUniqueId()` delegates this lookup to the node
delegate.

As background, `AXUniqueId` automatically assigns itself a
globally-unique value in its constructor; it tracks all used values in
an internal static pool.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-08 09:41:46 -08:00
Chris Yang
22693e2599 [ios platform view] fix overlay zPosition (flutter/engine#29930) 2021-12-07 16:04:01 -08:00
Chris Bracken
0189aaaca1 Win32: Implement DispatchAccessibilityAction (flutter/engine#30187)
Implements DispatchAccessibilityAction: a pass-through method that
forwards to the engine, which calls through the Embedder API back to the
framework.

Issue: https://github.com/flutter/flutter/issues/77838
2021-12-07 11:07:45 -08:00
Chris Bracken
334a0c6ff9 Use MallocMapping for DispatchSemanticsAction data (flutter/engine#30149)
In the Windows embedder, the data parameter of
FlutterWindowsEngine::DispatchSemanticsAction was a vector of bytes.
Here, we switch it to use MallocMapping since that is the type of the
data paramater on the DispatchAccessibilityAction method of
AccessibilityBridgeDelegate, which calls this method. This avoids an
extra type conversion.
2021-12-06 08:44:41 -08:00
eggfly
fdfdd6dccb Fix embedder_->EndFrame() not called in case of DrawLastLayerTree() (flutter/engine#29979) 2021-12-05 06:59:01 -08:00
Emmanuel Garcia
0849c0ecd7 Fix cast in FlutterView (flutter/engine#30106) 2021-12-03 15:54:01 -08:00
Jenn Magder
cb6cd0a3e8 Update IosUnitTests to use iPhone 11 simulator (flutter/engine#30090) 2021-12-03 10:49:02 -08:00
Emmanuel Garcia
cc8debdc54 Close image reader when the resource is unreachable (flutter/engine#30089) 2021-12-02 16:29:01 -08:00
Tong Mu
5d28d76321 [Windows keyboard] Remove redundant parameter FlutterWindowsView (flutter/engine#30086) 2021-12-02 15:39:01 -08:00