4842 Commits

Author SHA1 Message Date
Loïc Sharma
0dbedd3617 [Windows] Remove accessibility root assumptions (flutter/engine#39441)
* [Windows] Remove accessibility root assumptions

* Improve tests

* Improve comment

* Use helper

* Add TODO

* Fix

* Make test more thorough

* Add assertion

* More assertions

* Format

* Tweak comments based off feedback
2023-02-07 23:27:07 +00:00
hangyu
13c33441ef Override _accessibilityHitTest to fix IOS 16 semantics issues (flutter/engine#38794)
* Update SemanticsObject.mm

* lint

* Update SemanticsObjectTest.mm

test

Update SemanticsObjectTest.mm

Update SemanticsObjectTest.mm

test

test

Update SemanticsObject.mm

Update SemanticsObjectTest.mm

Update SemanticsObjectTest.mm

Update SemanticsObject.mm

Update SemanticsObjectTest.mm

update

Update SemanticsObjectTest.mm

* Update SemanticsObjectTest.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update shell/platform/darwin/ios/framework/Source/SemanticsObject.mm

Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>

* Update SemanticsObject.mm

* hittestorder

* Update SemanticsObject.h

* Update accessibility_bridge.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObject.mm

* Update SemanticsObjectTest.mm

* Update SemanticsObject.mm

* Update accessibility_bridge_test.mm

---------

Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
2023-02-07 22:25:53 +00:00
Jake Schafer
ec42a1d6e0 iOS keyboard animation synchronization (flutter/engine#37604)
* first keyboard commit

* first keyboard commit

* cleaned up from initial testing

* added keyboard animation stop calculation

* added keyboard animation stop calculation

* lucky updates :)

* type change

* final touches

* final touches

* final touches

* removed KeyboardAnimationView class

* removed KeyboardAnimationView class

* dynamic keyboard spring curve implementation

* broke out spring curve to own objc files

* broke out spring curve to own objc files

* simplified and added test

* modified spring formula to use damping

* added logic for compounding simultaneous animation calls

* remove unnecessary code

* cleanup

* cleanup

* update springCurveIos file

* cleaning up

* simple optimizations

* comment update

* bool update

* credit spring calculation project

* improved setupKeyboardAnimationCureveIfNeeded tests

Improved setupKeyboardAnimationCurveIfNeeded tests

* Optimized compounding animation checks and added new tests

* changed viewport update logic

* Update FlutterViewControllerTest.mm

Updated test nits

* Updated license

* Updated tests

* Cleanup

* Migrated spring class based on React

* Updated syntax

* Update shell/platform/darwin/ios/framework/Source/spring_curve_ios.mm

Co-authored-by: Jenn Magder <magder@google.com>

* Update shell/platform/darwin/ios/framework/Source/spring_curve_ios.h

Co-authored-by: Jenn Magder <magder@google.com>

* Updated naming

* Updated naming

* Optimized spring model calculations

* Improved interpolation accuracy

* Revert "Improved interpolation accuracy"

This reverts commit 6d025129b620db44741f70d659900430d9536628.

* Updated comment

* Updated spring curve comments

* updated to work with third_party spring animation

* updated to use SpringAnimation to/from values

* updated license (removed old files)

* updates

* allow updating springanimation position values

* updated test

* update

* fixes

---------

Co-authored-by: Jenn Magder <magder@google.com>
2023-02-07 01:12:23 +00:00
Loïc Sharma
fb53ce4e48 [Windows] Fix the 'engine restart resets keyboard' test (flutter/engine#39380) 2023-02-07 01:00:09 +00:00
godofredoc
9cf8958796 Fix cpp-wrappers archive. (flutter/engine#39400)
* Fix cpp-wrappers archive.

* Include wrapper headers.
2023-02-06 23:22:04 +00:00
luckysmg
f1582eec0a [iOS] Ensure FlutterView's background color is not nil to avoid CAMetalLayer nextDrawable being time-consuming (flutter/engine#39359)
* ++

* Add tests

* ++
2023-02-04 00:49:03 +00:00
Chris Yang
c05f179a2c [ios] Lock refresh rate to 80fps when threads are merged (flutter/engine#39172)
When there are PlatformViews on the screen (threads merged), Flutter engine cannot consistently hit 120 fps, especially when the PlatformView is animating (scrolling etc), thus producing janks.
This PR locks the refresh rate to 80fps to avoid janks.

Fixes flutter/flutter#116640
2023-02-03 14:30:09 -08:00
Miguel
786803bc70 [fuchsia] fdio_service_connect no longer provides rights which we need (flutter/engine#39374)
fdio_service_connect no longer provides rights. Since we need the READABLE right when opening the debug/ctrl/diagnostics directories, this change uses fdio_open_at.

This change also fixes the Clone to remove specific rights and instead use CLONE_SAME_RIGHTS.

Verified locally that we no longer get ACCESS_DENIED on the diagnostics directory when opening in component manager.
2023-02-03 17:03:36 -05:00
yaakovschectman
ce15fbec0e Use Windows high contrast black/white theme with MaterialApp themes (flutter/engine#39206)
* Check high contrast themes

* Formatting

* Test message sending

* Assert channel name

* Formatting

* Calculate luminance

* Refactor brightness check

* Formatting

* Formatting
2023-02-01 13:21:37 -05:00
Brandon DeRosier
841758cc6c Add SkSurface include to every file where it's used (flutter/engine#39304) 2023-02-01 00:50:58 +00:00
Loïc Sharma
c6f9e5cebd [Shell] Update stale comments after multi-view (flutter/engine#39298) 2023-01-31 23:58:10 +00:00
Miguel
ea5b6dfa72 Revert "[fuchsia] Diagnostics directory rights are R* (#39203)" (flutter/engine#39271)
This reverts commit f1bbb9058945878a280c37991d4a4488cda0cb96.
2023-01-30 18:10:56 -08:00
Tong Mu
9d1b539c4a Rebase all (flutter/engine#38855) 2023-01-31 01:00:56 +00:00
Loïc Sharma
f0d59792fa [Windows] Use 'FlutterWindowsEngineBuilder' in keyboard unit tests (flutter/engine#39209)
* [Windows] Refactor the keyboard unit tests

* Kick CI

* Second approach

* Undo unnecessary changes
2023-01-30 23:19:32 +00:00
Loïc Sharma
c6e65f2054 [Windows] Remove dead code from FlutterWindow tests (flutter/engine#39216) 2023-01-30 23:16:37 +00:00
Ben Konyi
d3f45828bf Reland "Remove references to Observatory (#38919)" (flutter/engine#39139)
This reverts commit 5dd945442b230a2c0549ee6d798fda71e031a4a9.
2023-01-30 09:50:09 -05:00
Miguel
f1bbb90589 [fuchsia] Diagnostics directory rights are R* (flutter/engine#39203) 2023-01-27 17:44:24 -05:00
Tamir Duberstein
15f53d515e [fuchsia] Migrate to new RealmBuilder API (flutter/engine#39205)
See https://fxrev.dev/793422.

Missed in 92fca42e0667969b3a78815c77afca9c6acd1c83,
3bfa5c5b1db5391d49cc58f9a23f1b4cd802d3e3 and
d429b674f1dd60590fda077fd893a4493c2b5455.
2023-01-27 15:42:15 -05:00
Zachary Anderson
54e53b326e Fix for downstream C++20 compiler (flutter/engine#39197) 2023-01-27 10:12:19 -08:00
Tamir Duberstein
d429b674f1 [fuchsia] Migrate to new RealmBuilder API (flutter/engine#39196)
See https://fxrev.dev/793422.

Missed in 92fca42e0667969b3a78815c77afca9c6acd1c83 and
3bfa5c5b1db5391d49cc58f9a23f1b4cd802d3e3.
2023-01-27 13:01:28 -05:00
Tamir Duberstein
3bfa5c5b1d [fuchsia] Migrate to new RealmBuilder API (flutter/engine#39175)
See https://fxrev.dev/793422.

Missed in 92fca42e0667969b3a78815c77afca9c6acd1c83.
2023-01-26 17:54:43 -08:00
Hannes Winkler
7e99ce795b properly namespace flutter software pixel formats (flutter/engine#38847)
- rename `kGray8 --> kFlutterSoftwarePixelFormatGray8`
- rename `kRGB565 --> kFlutterSoftwarePixelFormatRGB565`
- etc.
2023-01-26 22:30:17 +00:00
Zachary Anderson
56a4d347ae Revert "[macos] Move TextInputPlugin outside of visible area (#39031)" (flutter/engine#39176)
This reverts commit d06ef7a5bfbed4cba6eb98f47b618803ac6c8a53.
2023-01-26 13:47:58 -08:00
Matej Knopp
d06ef7a5bf [macos] Move TextInputPlugin outside of visible area (flutter/engine#39031)
* [macos] Move TextInputPlugin outside of visible area

* Make plugin empty and add test
2023-01-26 21:12:44 +00:00
J-P Nurmi
d7963e6fa1 [Linux][FlView] fix rendering on startup when shown after plugin registration (flutter/engine#38982)
* [FlView] fix rendering on startup when shown after plugin registration

* Add clarifying comment
2023-01-26 21:11:20 +00:00
Tamir Duberstein
92fca42e06 [fuchsia] Migrate to new RealmBuilder API (flutter/engine#39163)
See https://fxrev.dev/793422.
2023-01-26 11:15:23 -08:00
Tong Mu
02a18907ce Reland "[macOS] Formalize FlutterViewController's initialization flow, and prohibit replacing" (flutter/engine#39145)
* Revert "Revert "[macOS] Formalize FlutterViewController's initialization flow, and prohibit replacing (#38981)" (#39144)"

This reverts commit be4ea1a42d27ca88007f9013fd7c5526087b3268.

* Fix?
2023-01-26 00:13:47 +00:00
Tong Mu
be4ea1a42d Revert "[macOS] Formalize FlutterViewController's initialization flow, and prohibit replacing (#38981)" (flutter/engine#39144)
This reverts commit a8242f0b392a03c4c8fb3d299cabceb06462a647.
2023-01-25 15:16:59 -08:00
Tong Mu
a8242f0b39 [macOS] Formalize FlutterViewController's initialization flow, and prohibit replacing (flutter/engine#38981)
This PR adds FlutterViewController.id, and formalizes how FlutterViewController is initialized by FlutterEngine:
When FlutterViewController is set to the engine, the engine calls FlutterViewController#attachToEngine:withId:.
When FlutterViewController is unset from the engine, the engine calls FlutterViewController#detachFromEngine.
This allows the ID to be generated by the engine.

The default View ID is now 1 instead of 0. In this way, we can use 0 as an empty value, the value for FlutterViewController.id when the FVC is not attached to an engine. (IDs are meant to be opaque, and views should be a map, not an array anyway.)

This PR moves almost all initialization code into FVC's CommonInit to ensure that all init path produces the expected result.

With this PR, FlutterEngine no long supports replacing viewController (from non-null to a different non-null). Setting the view controller (from null to non-null) is intended to allow pre-warming an engine before displaying it in add-to-app, but replacing the view controller does not make much sense.

If the developer wants to persist the state of the view between different windows, they could just attach the view controller to different windows.
In fact, Flutter doesn't even have a way to create a FlutterViewController that is unattached to an engine. All initializers either require an engine or create an engine.
As a result, unit tests that used to create FVC with the wrong initializer are fixed.
2023-01-25 14:32:27 -08:00
Zachary Anderson
daeb8316d7 Only build analyze_snapshot on Linux host (flutter/engine#39129) 2023-01-25 08:35:57 -08:00
Loïc Sharma
6de1c715fb Manually roll ANGLE, vulkan-deps, SwiftShader (flutter/engine#38650) 2023-01-25 00:53:25 +00:00
Loïc Sharma
3119b5c02b Improve crashes if messenger APIs are used incorrectly (flutter/engine#39041)
* Clarify messenger APIs

* Feedback
2023-01-24 23:22:51 +00:00
Ahmed Ashour
51c0a9ec65 Remove superfluous words from comments (flutter/engine#39068)
* Remove superfluous words.

* Format

* Duplicate in consecutive lines.
2023-01-24 09:54:19 -08:00
Constantine Shablya
a38bdae396 [embedder] Fix getting vkGetInstanceProcAddr (flutter/engine#39051) 2023-01-24 01:22:38 +00:00
Chris Yang
353f0b5b32 [ios_platform_view] MaskView pool to reuse maskViews. (flutter/engine#38989)
* reuse maskView

reuse mask view

format

format

draft

draft

fixes

test

* comments

* fix comment

* test for releasing maskView

* updates

* fix
2023-01-21 04:26:04 +00:00
Ben Konyi
002fce29e0 Revert "Remove references to Observatory (#38919)" (flutter/engine#39035)
Reason for revert: breaking Flutter -> plugins roll

This reverts commit 1f603711c7b7afe52dff3872a5035789e3ddba02.
2023-01-20 12:33:40 -05:00
Bruno Leroux
258cde6cd2 [macos] Synthesize modifier keys events on pointer events (flutter/engine#37870)
* [macos] Synthesize modifier keys events on pointer events

* Move test to FlutterViewControllerTest

* Simplify by using 'for in'

Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
2023-01-20 10:43:16 +00:00
Chris Bracken
1dd1f02bc4 Extract WideToUTF16String/UTF16StringToWide to FML (flutter/engine#39020) 2023-01-19 22:55:47 -08:00
Robert Ancell
3b47df5adf Fix invalid Unix locale to Flutter locale (BCP-47) mapping (flutter/engine#36512)
Flutter locales use the BCP-47 format
(https://www.rfc-editor.org/rfc/bcp/bcp47.txt), and Unix locales use a POSIX
format. There is not a perfect mapping between them, see
https://wiki.openoffice.org/wiki/LocaleMapping

The current implementation is not correctly setting the appropriate optional
fields, so remove that.

There are likely some Unix locales that should set these fields, but these are
best fixed by adding special cases for them as they are discovered.

Fixes: https://github.com/flutter/flutter/issues/111341
2023-01-19 22:53:59 +00:00
Nayuta403
0626a035ce Remove unused variables and import (flutter/engine#38971) 2023-01-19 21:06:53 +00:00
yaakovschectman
7ed656d596 Merge MSAA alert functionality with UIA (flutter/engine#38745)
* Use AXFragmentRootWin for MSAA functionality.

Some unused code remains to be removed.

Merge MSAA to AXFragmentRootWin

* Removing unused code

* Remove unused files

* Flip macro

* Formatting

* Licenses

* Make reference

* Disable copy constructor/assignment

* Unused import

* Formatting

* Relocate alert logic

* Remove comment and unused mock

* Fix unit test

* Idempotency

* Formatting

* PR feedback

* Doc comments

* Undo string change for now

* Couple fragment root and alert node

* Formatting

* Add comments

* Pointer to reference

* Typo fix
2023-01-19 13:28:27 -05:00
Ben Konyi
1f603711c7 Remove references to Observatory (flutter/engine#38919)
Observatory is being deprecated for Dart 3.0 so it should no longer be referenced in tooling messaging / flags.

See https://github.com/dart-lang/sdk/issues/50233
2023-01-19 09:20:46 -05:00
Chris Yang
1284ee8f45 [ios_platform_view] more precision when determine if a clip rrect is necessary (flutter/engine#38965)
* draft

fix

rename

unittest

* update scenario

* test
2023-01-18 22:19:13 +00:00
Chris Bracken
42fd13c246 [windows] Eliminate unnecessary iostream imports (flutter/engine#38824)
In 491db72 I replaced use of direct writes to cerr and replaced them
with FML_LOG calls but may have missed removing some iostream #includes,
or they may have been missed in previous cleanups. This removes any
remaining #includes of iostream that are unused.
2023-01-12 18:05:20 -08:00
Chris Bracken
bcfa08f532 [windows] Use FML_DCHECK in place of C assert (flutter/engine#38826)
Now that the embedders depend on FML, migrate assertions to FML_DCHECK,
which allows for an explanatory log message to be emitted along with the
assertion.

No tests since no semantic changes are made.
2023-01-12 18:03:19 -08:00
luckysmg
598fb62a0b Correct FrameTimingRecorder's raster start time. (flutter/engine#38674)
* ++

* ++

* Add tests

* Add missing trace

* ++

* ++

* ++
2023-01-13 01:38:17 +00:00
Matej Knopp
86c5ce8349 [macOS] Do not block raster thread when shutting down (flutter/engine#38777) 2023-01-12 22:28:06 +01:00
Pierrick Bouvier
3811a350df Add CI builder for windows-arm64. (#38394) (flutter/engine#38739)
* Generate zip archives for Windows following target platform.

* Add CI builder for windows-arm64.

All packages can be cross compiled from an x64 machine.
Unittests are disabled, as they require an arm64 machine.

* Add windows-arm64 to CI.
2023-01-11 23:01:08 +00:00
Rich Kadel
e43616416f [fuchsia] Replace deprecated AddLocalChild (flutter/engine#38788)
`AddLocalChild(LocalComponent*)` is deprecated.

It was replaced by:

`AddLocalChild(LocalComponentFactory)`, which is a type alias for a
lambda that returns a `std::unique_ptr<LocalComponentImpl>`.

This change addresses problems that arised due to object lifetime
management of the components, and allows RealmBuilder to model the
component lifecycle of local components in a way that's more consistent
with other components.

The RealmBuilder-built `Realm` now owns the lifetime of the local
components, instead of the client, and those objects are valid until
the `Realm` is destroyed.

Bug: fxbug.dev/109804
2023-01-11 16:54:22 -05:00
Jim Graham
eb615c6cc4 delete include of private GrMtlTypes header (flutter/engine#38783) 2023-01-11 19:57:47 +00:00