3473 Commits

Author SHA1 Message Date
Jackson Gardner
228c22e017 Be slightly more lenient about the assertion, as it differs on different backends. (flutter/engine#51877)
We shouldn't assume the exact format of the assertion string here, as the exact output is slightly different on dart2js vs ddc vs dart2wasm. They should all contain the message text, however.
2024-04-03 20:15:07 +00:00
Zachary Anderson
9404f5112e Revert "Prevent solo: true from being committed" (flutter/engine#51858)
Reverts flutter/engine#51712

Reason for revert: As discussed in
https://github.com/flutter/flutter/issues/143312, and in
https://discord.com/channels/608014603317936148/1224499330824802375. I
apologize if this seems hasty and not fully justified, but it is
important that the engine repo follows policies like this to make it
easier for our various teams to work together.
2024-04-02 20:19:12 -07:00
Michael Goderbauer
b71942aadb Remove outdated deprecated_member_use ignores (flutter/engine#51836)
These are obsolete with https://github.com/flutter/engine/pull/50575.
2024-04-03 02:28:51 +00:00
Jason Simmons
296d677a7c Add an engine switch that controls whether the platform isolate API is available. (flutter/engine#51784)
Platform isolates are currently supported only on Android and iOS.

See https://github.com/flutter/flutter/issues/136314
2024-04-02 22:47:04 +00:00
Jackson Gardner
fea11e834d [skwasm] Fix Paragraph.getLineBoundary (flutter/engine#51846)
The Skia APIs I was previously using were returning `-1` for `paragraphGetLineNumberAt` when querying at the end of the string. I changed the implementation to be identical to what CanvasKit and the native Paragraph object are doing.
2024-04-02 20:31:56 +00:00
Jackson Gardner
adfd52167c [Skwasm] Forward text height from paragraph height to default text style (flutter/engine#51819)
We need to apply the paragraph style's height to the initial default text style on the stack. I also added a `toString` method for `StrutStyle` so that things are a bit easier to debug.
2024-04-01 21:20:28 +00:00
Matan Lurey
61573f8d69 Implement Paint.from(other) for dart:ui. (flutter/engine#51110)
(Tenatively) Closes https://github.com/flutter/flutter/issues/142871.

I personally think this is a reasonable request, and we (framework authors) can make some users happy in a fairly simple way (https://github.com/flutter/flutter/issues/142871, https://github.com/flutter/flutter/issues/40497).

Some questions:

1. Is the web implementation good enough or would we want to "ship" with an optimized impl?
2. Can folks imagine other edge cases to test beyond correctness and deep/immutable copies?
2024-03-29 21:46:05 +00:00
LongCatIsLooong
cddc8f5910 Turn struct half leading in canvaskit kitchensink test back on (flutter/engine#50707)
Undo https://github.com/flutter/engine/pull/50617

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-29 18:50:35 +00:00
Mouad Debbar
01ea911472 [web] Use viewId for text editing (flutter/engine#51099)
Handle `viewId` for text fields.

Part of https://github.com/flutter/flutter/issues/137344
2024-03-29 16:50:01 +00:00
Jackson Gardner
b27ae53b79 [skwasm] Fix toString methods on Paint and ImageFilter/ColorFilter (flutter/engine#51766)
This fixes https://github.com/flutter/flutter/issues/141639

Most of this was previously unimplemented. It turns out the reason for the hang described in the github issue was that there was a typo in the name of the `getMiterLimit` C function, so if the client actually called that method the Wasm module failed to compile, as it couldn't find an import with the misspelled name.
2024-03-29 02:06:18 +00:00
Loïc Sharma
a01206ad39 Add completion callback to Shell::AddView (flutter/engine#51659)
In the future, `FlutterEngineAddView` will be added to the embedder API to allow embedders to add views. `FlutterEngineAddView` will accept a callback that notifies the embedder once the view has been added.

This embedder API will be powered by `Shell::AddView`. This change adds a completion callback to `Shell::AddView` to prepare for the embedder API.

Design doc: https://flutter.dev/go/multi-view-embedder-apis

Part of https://github.com/flutter/flutter/issues/144806
Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-29 00:39:10 +00:00
Jackson Gardner
6741217138 [skwasm] Use text position affinity when calculating word boundaries. (flutter/engine#51753)
I had failed to take position affinity into account when calculating word boundaries on skwasm. This brings skwasm's behavior in line with canvaskit's.
2024-03-28 19:54:12 +00:00
Mouad Debbar
b0300e2fc2 Prevent solo: true from being committed (flutter/engine#51712)
At some point, we inherited a change from the repo-level `analysis_options.yaml` that [allowed deprecated](https://github.com/flutter/engine/pull/50575) members to be used. We rely on that analyzer error to prevent `solo: true` from being committed in our tests ([example](c935c3ba36/lib/web_ui/test/ui/line_metrics_test.dart (L179)) of one that slipped recently).

This PR overrides the `deprecated_member_use` error to enable it inside the web engine.
2024-03-28 19:31:14 +00:00
Jackson Gardner
601cb5058f [Skwasm] Correctly handle paragraphs with empty text. (flutter/engine#51695)
Instead of just returning, if our paragraph builder has empty text, we still need to generate a set of line breaks for skia to use. Otherwise, it will actually cause subtle memory access errors.
2024-03-27 20:18:57 +00:00
Harry Terkelsen
a2f2c59db0 [canvaskit] Fix color filter for dst and dstIn (flutter/engine#51693)
When CanvasKit returns `null` for a ColorFilter, it indicates the
ColorFilter is a no-op, not that an error has occurred. This fixes the
engine to correctly handle when CanvasKit returns a null ColorFilter.

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

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-03-27 11:07:55 -07:00
Jackson Gardner
af3d972f03 Pass the flutter test font by default. (flutter/engine#51671)
In the default case, where no fonts are specified, we should specify the flutter test font. This fixes a swath of framework tests in skwasm.
2024-03-26 18:16:58 +00:00
Srujan Gaddam
f55ed6aa70 Change JSBoxedDartObject to JSAny (flutter/engine#51634)
Closes https://github.com/dart-lang/sdk/issues/55256

d7ce346fba added code to avoid the less performant boxing of JSBoxedDartObject and instead use backend-specific logic to externalize and internalize the UniqueRef until we get a better solution from dart:js_interop. On the JS backends, this relied on casting to and from JSAny, as its representation type is just Object. However, this callback that takes in the UniqueRef as an arg is still typed as accepting JSBoxedDartObject, leading to a cast failure on the JS backends, since the representation type is JSObject.

The fix is to use JSAny. On dart2wasm, this makes no difference, as the underlying representation type does not change.
2024-03-26 15:41:23 +00:00
Harry Terkelsen
c94c54253a [web] Add ability to customize font fallback download URL (flutter/engine#51569)
Gives developers the ability to change the base URL to download fallback
fonts from `fonts.gstatic.com` to a URL of their choosing.

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

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-03-22 14:58:39 -07:00
Jackson Gardner
047ea1efd4 [skwasm] Use test fonts while in debugEmulateFlutterTesterEnvironment mode (flutter/engine#51630)
This brings the behavior in line with the other renderers. The framework sets this bit to make sure we render only using the Ahem font.
2024-03-22 21:56:53 +00:00
Jackson Gardner
f79cfcc0d3 [Skwasm] Respect the debugDisableFallbackFonts flag. (flutter/engine#51626)
Skwasm needs to respect the `debugDisableFallbackFonts` flag, which is used by framework tests.
2024-03-22 19:22:22 +00:00
Jackson Gardner
2b1f29dcdc [skwasm] Throw when gradient color stops are invalid in debug mode. (flutter/engine#51624)
One of many unit test failures that are appearing when running framework tests against skwasm.
2024-03-22 18:48:58 +00:00
Ian Hickson
9d1537ccb8 Add a breadcrumb from FlutterView to PlatformDispatcher. (flutter/engine#51504) 2024-03-21 20:53:12 +00:00
Jason Simmons
cd1ba5d6e7 Add the platform isolate API to the files included in the sky_engine package (flutter/engine#51538)
This makes the API available to Flutter framework users.

See https://github.com/flutter/flutter/issues/136314
2024-03-20 19:50:51 +00:00
Yegor
15eb786641 [web] include the hint field in semantics labels (flutter/engine#51529)
Add hint to the semantic label. A label containing all field will now look like this:

```
tooltip
label hint value
```

Fixes https://github.com/flutter/flutter/issues/143852
2024-03-19 23:10:32 +00:00
Jackson Gardner
7aa5194894 Fix slash in chromium path. (flutter/engine#51527)
The previous code here introduced an extra slash. Our test platform was tolerant to this extra slash and essentially ignored it, but this probably won't work for most hosting solutions. I went ahead and added some extra validation to the URL when fetching so that we won't serve URLs that have the double slash in their path, in order to catch this if it regresses again.
2024-03-19 20:05:26 +00:00
Martin Kustermann
d7ce346fba [web] Avoid using js_util.{jsify,dartify}() in dart2wasm for converting to JS wrappers (flutter/engine#51375)
The `js_util.jsify()` related code shows up in CPU profile of wonderous.

=> Any `SkwasmObjectWrapper` object invokes this logic in the
constructor and dispose method.

This PR

* makes `DomFinalizationRegistryExtension` accept `JSAny` types instead
of Dart types and internally converting
  => Callsites can call more precise `<>.toJS*` extension methods
=> Will avoids extra type checks on the objects when we can call
`Object.toJSBox` directly

* makes us use a `toJSWrapper` / `fromJSWrapper` which will not delegate to a recursive `jsify()` but simply externalize the wasm gc object
=> We cannot use `Object.toJSBox` due to it being slower to create JS
boxes as it semantically does something different atm (see issue below)
=> Instead use conditional import of `dart:_wasm` which provides the
necessary primitives
  => Similar for going from JS to Dart.

* Avoid converting from Dart object to `JSAny` more than needed
(we did the operation twice for each registration and once for
unregistration)

Issue https://github.com/dart-lang/sdk/issues/55183
2024-03-18 23:04:13 +01:00
Loïc Sharma
21c9a731f0 [Embedder API] Remove view (flutter/engine#51400)
Adds `FlutterEngineRemoveView` to the embedder API. This will be used to destroy a view.

The embedder API does not allow embedders to create multiple views yet.

Design doc: https://flutter.dev/go/multi-view-embedder-apis

Part of https://github.com/flutter/flutter/issues/144806
Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-18 18:23:22 +00:00
Yegor
896df78f52 [web] remove Tappable from basic set of a11y roles; add it case by case (flutter/engine#51466)
Remove the `Tappable` role from the `PrimaryRoleManager.withBasics` constructor. Only add `Tappable` to primary roles that know for sure they need it.

Fixes https://github.com/flutter/flutter/issues/144364
2024-03-18 17:35:21 +00:00
Zachary Anderson
66fa3dd66c Pass some missing --disable-dart-dev and --suppress-analytics to dart (flutter/engine#51473) 2024-03-17 08:46:11 -07:00
Harry Terkelsen
3eb357342b [canvaskit] Fix backdrop filter with platform views as children (flutter/engine#51442)
There is a bug in CanvasKit where a backdrop filter with a platform view
as a child will cause the backdrop filter to apply multiple times. This
change fixes it by only applying the backdrop filter once.

The bug case is more likely to happen since
https://github.com/flutter/engine/pull/47317 landed because when we
encounter an invisible platform view, we always create a new SkPicture
instead of continuing to use the same SkPicture.

BEFORE:

![canvaskit_backdropfilter_with_platformview_BAD](https://github.com/flutter/engine/assets/1961493/c1fa766f-ebf7-4468-9ea7-8ab0d51314c7)

AFTER:

![canvaskit_backdropfilter_with_platformview](https://github.com/flutter/engine/assets/1961493/57d27d62-ee49-43a2-af3f-e532aaba0ffb)


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-03-15 11:40:10 -07:00
Tomasz Gucio
1767a8c6d6 Add missing baseline check in text layout tests (flutter/engine#51444)
This PR adds a check for the `baseline` value in text layout service tests that appears to be missing.

Test-exempt: increasing test coverage only.
2024-03-15 17:39:06 +00:00
zijiehe@
fb4d1819e7 [Fuchsia] Remove the use of //build/ in fuchsia (flutter/engine#51072)
### Motivation of the change:

Both dart and flutter are using fairly outdated gn-sdk without properly maintained. Currently @hjfreyer is working on version'ed IDK / SDK libs which requires changes in gn-sdk to use the right version of the libs in fuchsia/sdk/obj/{arch}-api-{level} rather than the one in the fuchsia/sdk/arch. But current implementation does not support choosing the right version.

### Blocking issue:

The new gn-sdk (in flutter/tools/fuchsia/gn-sdk) generates multiple BUILD.gn files rather than a large BUILD.gn the previous version created. So most of the build rules need to switch from the old `fidl:{api}` build rule to `fidl/{api}` rule. The same change will happen in the dart/sdk, i.e. http://go/dart-reviews/356924. But since the two repos cannot have one single atomic change, changing either side first will cause flutter to break. E.g. the linkage error caused by duplicated symbols will happen if we change the dart/sdk first, since in flutter, it will still refer to the old build rules in the middle.

### Solutions:

Ideally we can create redirect rules in the current `build/fuchsia` buildroot tree to redirect the old rules into the new one, so we can make the change in the flutter first then dart/sdk. But creating the rules is not trivial and will only be used once.

So an alternative solution is

- pause the dart/sdk -> flutter roll
- submit dart/sdk change (http://go/dart-reviews/356924)
- update this change to manually bring the dart/sdk change, namely the `dart_revision` in the DEPS file and signatures in the ci/licences.
- resume the dart/sdk -> flutter roll.

But it requires this change itself to be reviewed first, and I'd like to know your opinion before moving forward.

See corresponding dart/sdk change at http://go/dart-reviews/356924.

### //build/fuchsia/ from buildroot should be removed after this change.

Bug: [b/40935282](https://issues.chromium.org/issues/40935282?pli=1&authuser=0)

FYI: @hjfreyer 

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-15 02:52:21 +00:00
Hassan Toor
5ca890f401 [web] - fix text editing IME composition interruption on geometry updates (flutter/engine#51323)
This change fixes an issue where IME composition gets interrupted when the `setEditableSizeAndTransform` platform message is received mid-composition.  This occurs when a multiline input expands and needs to inform the underlying `textarea` to update its size.  

Fixes https://github.com/flutter/flutter/issues/134797
Fixes https://github.com/flutter/flutter/issues/98817
2024-03-14 16:58:45 +00:00
Matan Lurey
31b0fb1ea3 Remove or replaced unused or duplicate code in SkiaGoldClient. (flutter/engine#51399)
- `get isAvailable` -> `SkiaGoldClient.isAvailable()`
- `get isLuciEnv` -> `SkiaGoldClient.isLuciEnv()`
- Remove unused `SkiaGoldHttpOverrides`
2024-03-14 08:45:34 -07:00
Yegor
826074672d [web] make text more crawlable; fix a JAWS bug (flutter/engine#50794)
On Windows, where JAWS is a popular screen reader and, [unfortunately](https://github.com/FreedomScientific/standards-support/issues/759), ignores `aria-label` on empty elements, and for user agents that are known web crawlers (that also ignore `aria-label`), render semantic text into the DOM using an additional `<span>` element.

Fixes https://github.com/flutter/flutter/issues/122607
2024-03-13 23:03:00 +00:00
Juanjo Tugores
db857bd325 Implement PlatformDispatcher.requestViewFocusChange on web. (flutter/engine#50535)
Implement PlatformDispatcher.requestViewFocusChange on web. 

Relevant Issues are:

* Design doc: https://flutter.dev/go/focus-management 
* Focus in web multiview: https://github.com/flutter/flutter/issues/137443
* Platform dispatcher changes: https://github.com/flutter/engine/pull/49841

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-13 17:37:44 +00:00
Chinmay Garde
6a151f5c40 [Impeller] Make masks type safe. (flutter/engine#51369)
Uses the utility added in https://github.com/flutter/engine/pull/51361

I counted the removal of 58 static casts. There was one addition made to the original utility however. Vulkan HPP was promoting all enums to its own mask type. This in itself is problematic but we got away with it because there was no one else doing this kind of promotion. Till we added our own utility. To avoid polluting the namespace with methods that may cause ambiguity, enums that are masks must explicitly be marked as maskable with `IMPELLER_ENUM_IS_MASK` in the `impeller` namespace.

No change in functionality.
2024-03-13 00:12:21 +00:00
Brandon DeRosier
fa6808182c Remove early Flutter GPU prototype from ui/experiments. (flutter/engine#51367)
We moved to lib/gpu some time ago!
(Initially added with https://github.com/flutter/engine/pull/42228)
2024-03-12 16:09:58 -07:00
Pavel Mazhnik
a9c40d24b7 [web] make addView/removeView functions sync (flutter/engine#51103)
Related to https://github.com/flutter/flutter/issues/138930
2024-03-12 22:29:27 +00:00
Loïc Sharma
b2f119de6b [dart:ui] Add view ID to PointerData.toString (flutter/engine#51352)
The `view_id` is useful information as the pointer's `x` and `y` coordinates are relative to the view's origin.

Part of https://github.com/flutter/flutter/issues/112205
Part of https://github.com/flutter/flutter/issues/142845

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-12 21:53:41 +00:00
Jackson Gardner
f646f9a40c Reland "Move emscripten out of the buildroot into the flutter repo" (flutter/engine#51353)
This is a reland of the change moving the emsdk out of the buildroot, but without the removal of `web_dependencies`, since that removal was causing issues with the rollers.
2024-03-12 18:32:08 +00:00
David Iglesias
e62c718145 [web] Split initialization of the _flutter namespace and loader object. (flutter/engine#51294)
This makes it possible to more flexibly compose `{{flutter_js}}` and `{{flutter_build_options}}` in @eyebrowsoffire's [bootstrapping improvements PR](https://github.com/flutter/flutter/pull/144434).

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-11 23:21:17 +00:00
auto-submit[bot]
0c2c540e72 Reverts "Move emscripten out of the buildroot into the flutter repo. (#51299)" (flutter/engine#51330)
Reverts: flutter/engine#51299
Initiated by: zanderso
Reason for reverting: Blocking the autoroller
Original PR Author: eyebrowsoffire

Reviewed By: {matanlurey}

This change reverts the following previous change:
This migrates the emscripten toolchain into the flutter repo, as well as the fonts for web unit tests. Also, removed the `web_dependencies` thing which is no longer used.

This fixes https://github.com/flutter/flutter/issues/143332

Depends on a buildroot change here: https://github.com/flutter/buildroot/pull/833
2024-03-11 20:39:25 +00:00
Jackson Gardner
048ee12c07 Move emscripten out of the buildroot into the flutter repo. (flutter/engine#51299)
This migrates the emscripten toolchain into the flutter repo, as well as the fonts for web unit tests. Also, removed the `web_dependencies` thing which is no longer used.

This fixes https://github.com/flutter/flutter/issues/143332

Depends on a buildroot change here: https://github.com/flutter/buildroot/pull/833
2024-03-11 17:24:19 +00:00
Juanjo Tugores
976d528d71 Mark the Flutter Views as focusable by setting a tabindex value. (flutter/engine#50876)
Mark the Flutter View as focusable by setting a tabindex value.

* When a given flutter view is focused its tabindex will be `-1`
* When a given flutter view is not focused its tabindex will be `0`
* When semantics are enabled no tabindex will be set.

Relevant Issues are:

* Design doc: https://flutter.dev/go/focus-management 
* Focus in web multiview: https://github.com/flutter/flutter/issues/137443
* Platform dispatcher changes: https://github.com/flutter/engine/pull/49841

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-08 23:36:16 +00:00
Harry Terkelsen
4c86674a0f Optimize overlays in CanvasKit (flutter/engine#47317)
Optimize overlays by detecting when Flutter-rendered content intersects
with platform views. Overlay canvases are only needed when the content
intersects, so by checking for this, we can optimize out most overlays.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-03-08 14:28:24 -08:00
Juanjo Tugores
1e38a17a22 Prepend the accessibility placeholder (flutter/engine#51050)
Prepends the accesibility placeholder. Previously it was being appended (last child) to the body. 

Relevant Issues are:

* Design doc: https://flutter.dev/go/focus-management 
* Focus in web multiview: https://github.com/flutter/flutter/issues/137443
* Platform dispatcher changes: https://github.com/flutter/engine/pull/49841

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-07 18:16:21 +00:00
Martin Kustermann
572d662658 Make @keepToString annotation work for web and non-web (flutter/engine#51251)
* Update documentation for the annotation
* Add `@keepToString` annotation to web's `Locale` class (similar to
non-webs `Locale` class)

Issue https://github.com/flutter/flutter/issues/52759
2024-03-07 10:33:13 +01:00
Tong Mu
67603e5e32 Reland 5: Multiview pipeline (flutter/engine#51186)
This relands https://github.com/flutter/engine/pull/50931.

The crash that caused the 4th revert has been fixed by https://github.com/flutter/flutter/pull/144212.

[There has been discussion](https://github.com/flutter/engine/pull/51019) on why the benchmark in previous attempts show significant drop in build time. This PR addresses it using option a as described in [this comment](https://github.com/flutter/engine/pull/51186#issuecomment-1977820525).

This PR also addresses https://github.com/flutter/flutter/issues/144584 with option 1. A test is added.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-07 01:54:14 +00:00
LongCatIsLooong
8fd9bbee17 Reland "Remove migration flag and unused header files #50216" (flutter/engine#50259)
Forgot to update a pinned dependency in the previous attempt: https://github.com/flutter/tests/pull/340

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-05 02:17:05 +00:00