3018 Commits

Author SHA1 Message Date
Mouad Debbar
11cb3ce067 [web] Support platform view creation params (flutter/engine#42255)
1. Wire platform views' `creation params` in the engine.
2. Move acceptable factory signatures to `dart:ui_web`.
3. Don't put any JS types in `dart:ui_web`'s interface.
    -  Use type casting to check at runtime instead.
4. Tests.

Part of https://github.com/flutter/flutter/issues/127030
2023-06-02 21:53:47 +00:00
Michael Goderbauer
298dad2e13 MultiView changes for dart:ui (flutter/engine#42493)
Fixes https://github.com/flutter/flutter/issues/124991.

Framework tests are failing because I need to do a pre-migration of `flutter_test` for the Object -> int change of viewId. That's in https://github.com/flutter/flutter/pull/128092.
2023-06-02 21:29:48 +00:00
Mouad Debbar
c93d8d82d6 [web] New platform view API to get view by ID (flutter/engine#41784)
In order to make `HtmlElementView` more useful, we need to expose an API for getting the created platform view element. ~~This would allow `HtmlElementView` to set attributes and styles on the element.~~

This would allow us to add a new callback to the `HtmlElementView` that would return the result of calling the registered platformViewFactory to the user, after it's been created and added to the DOM, so the user can do with it as they please.

Required by https://github.com/flutter/flutter/pull/126176
2023-06-02 21:11:29 +00:00
Ashish Myles
a612a1dfd1 [web] Move announcement live elements to the end of the DOM and make them divs instead of labels. (flutter/engine#42432)
- Moving them to the end prevents the screen reader from landing on them before the relevant content.
- Making them `div`s instead of `label`s prevents some screen readers (ChromeVox in particular) from landing on the live elements when the live elements are empty.

Fixes https://github.com/flutter/flutter/issues/127862.
2023-06-02 18:33:24 +00:00
toneyzeng
8c80858576 Support DisposalMethod::kRestorePrevious in MultiFrameCodec and fix the apng problem. (flutter/engine#42153)
Support DisposalMethod::kRestorePrevious in MultiFrameCodec and fix the apng problem.

![image](https://github.com/flutter/engine/assets/5031712/48bb95c1-10b3-4736-a42e-46281d355cd3)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-06-01 20:07:18 +00:00
Mouad Debbar
8c89ed143a Reland "[web] Remove the JS API for url strategy (#42134)" (flutter/engine#42486)
Initially landed in https://github.com/flutter/engine/pull/42134
Then reverted in https://github.com/flutter/engine/pull/42468

It failed because we changed `UrlStrategy` to an `interface` which prevents "extending".

The only change in the reland is the removal of the `interface` keyword.
2023-06-01 18:22:03 +00:00
Jonah Williams
fd5cbcfe04 Revert "[web] Remove the JS API for url strategy" (flutter/engine#42468)
Reverts flutter/engine#42134

This is blocking the engine into framework roller:

See: https://cirrus-ci.com/task/5610586755563520

```
Analyzing 3 items...                                            
  error • The class 'UrlStrategy' can't be extended outside of its library because it's an interface class • dev/integration_tests/web_e2e_tests/test_driver/url_strategy_integration.dart:48:31 • invalid_use_of_type_outside_library
1 issue found. (ran in 321.8s)
  🙙  🙛  
  ```
2023-06-01 01:53:05 +00:00
Mouad Debbar
65b25427f0 [web] Remove the JS API for url strategy (flutter/engine#42134)
Finally, we can remove this JS global function for customizing the url strategy.

Why I think we don't need to go through an official deprecation process:

1. It was initially made for internal use in Google3, and right now there are no references to it.
2. There's no public documentation of this JS function.
3. External users customize their url strategy through `flutter_web_plugins` which has been [migrated](https://github.com/flutter/flutter/pull/123443) already.
2023-05-31 21:37:18 +00:00
Kevin Lubick
16737de589 Replace use of Skia's private GrRectanizer with a copy of the equivalent code (flutter/engine#42430)
Skia would like clients to not use their private types. This ports the
same functionality into Flutter's codebase with tests.

The implementation was copied from
[Skia](fa87b7c5ba/src/gpu/RectanizerSkyline.cpp)
and then modified to match Flutter's style and have a unit test.

## 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].
- [ ] 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 Hixie said 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
[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
2023-05-31 14:10:33 -04:00
Kevin Lubick
88165fc28b Fix bugprone-unchecked-optional-access errors in image_generator_apng (flutter/engine#42450)
Related to #127701

When landing a seemingly unrelated CL, clang-tidy started failing with:

```
 Failures for clang-tidy on /b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:57:10: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
  return images_[image_index].frame_info.value();
         ^
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:154:13: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
    switch (frame.frame_info->blend_mode) {
            ^
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:526:7: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
  if (images_.back().frame_info->disposal_method ==
      ^
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:535:7: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
      images_.back().frame_info->disposal_method ==
      ^
/b/s/w/ir/cache/builder/src/flutter/lib/ui/painting/image_generator_apng.cc:538:5: error: unchecked access to optional value [bugprone-unchecked-optional-access,-warnings-as-errors]
    image->frame_info->required_frame = images_.size() - 1;
    ^
Suppressed 1772 warnings (1772 in non-user code).
```

This addresses those checks by making sure frame_info has a value.

## 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 Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I signed the [CLA].
- [ ] 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
[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
2023-05-31 08:56:59 -07:00
Greg Spencer
a1b365111f Reland: "Adding app lifecycle notification for macOS and Linux, add hidden state." (#40542) (flutter/engine#42418)
## Description

This reverts commit 879917b to re-land #40542 to fix the lint warning which caused the original PR to be reverted (the lint warnings were turned on after the original was landed, which is why it wasn't caught earlier).
2023-05-30 20:45:46 +00:00
Brandon DeRosier
d21cfbb514 Fix lint failure in ImageDecoderImpeller (flutter/engine#42402)
This lint started failing on some builders a few hours ago.

https://ci.chromium.org/p/flutter/builders/prod/Linux%20Host%20clang-tidy
2023-05-29 22:33:31 +00:00
Zachary Anderson
879917b1e6 Revert "Adding app lifecycle notification for macOS and Linux, add hidden state." (flutter/engine#42384) 2023-05-28 00:02:58 -07:00
Greg Spencer
2af9be9d97 Adding app lifecycle notification for macOS and Linux, add hidden state. (flutter/engine#40542)
## Description

This adds app lifecycle notification for macOS and Linux, and adds a new `hidden` state to the `AppLifecycleState` enum.

To be functional, this needs a corresponding framework change: https://github.com/flutter/flutter/pull/123274

## Related Issues
 - https://github.com/flutter/flutter/issues/30735

## Tests
 - Added tests for state changes.
2023-05-26 23:24:33 +00:00
Mouad Debbar
ad6f346f5f [web] Correct JS property name for baseUri (flutter/engine#42357)
Up to this point, whenever users use the `PathUrlStrategy`, they would be using `flutter_web_plugins`'s copy of `BrowserPlatformLocation` which has a [different implementation for `getBaseHref()`](9376a2ac60/packages/flutter_web_plugins/lib/src/navigation/url_strategy.dart (L235)). So we never hit the [implementation in the engine](d73aac2434/lib/web_ui/lib/ui_web/src/ui_web/navigation/platform_location.dart (L138)), meaning the bug was invisible.

Now that we are [removing](https://github.com/flutter/flutter/pull/126851) `BrowserPlatformLocation` from `flutter_web_plugins`, we are hitting the engine's implementation which contains the bug being solved in this PR.
2023-05-26 20:16:59 +00:00
Dan Field
83b6fa4ff7 [Impeller] Avoid encoding metal commands while the GPU is unavailable when decoding images. (flutter/engine#42349)
Fixes https://github.com/flutter/flutter/issues/126878

This disables device private upload on iOS when backgrounded, and disables mipmap generation when backgrounded.

We don't have a good way to test the core problem in this repo because it only reproduces on physical iOS hardware - simulators don't really care if you do this stuff in the background.

I'll write a devicelab test in the framework to capture this. In the mean time it can be reviewed.

We could consider making the IOManager a shared_ptr instead of having an fml::WeakPtr and that'd clean up some of the extra arguments to engine construction - or we could consider vending the sync switch from impeller::Context unconditionally, but it's pretty iOS specific...
2023-05-26 18:46:33 +00:00
Mouad Debbar
8259db4b30 [web] Use the new js_util.callMethod(Object, Object) (flutter/engine#42352)
Now that `js_util.callMethod` can take an `Object` as a method name, we can use it directly for methods that are accessed through a `Symbol`.
2023-05-26 18:31:47 +00:00
Jackson Gardner
30a56394c9 Don't use a factory constructor on the finalization registry. (flutter/engine#42350)
The factory constructor breaks the Google3 build for some reason. See b/284478971
2023-05-26 17:56:05 +00:00
Hassan
f0e2596c5c [web] - Fix autofill group input ordering (flutter/engine#42268)
Ordering of input elements inside of the DOM tree for autofill groups does not reflect the order of the form rendered on screen.  This is causing some issues with password managers and autofill, specifically Bitwarden.

We are currently always appending the currently focused input element to the end of the form. 

This leads to a tree that appears out of order:
<img width="354" alt="Screenshot 2023-05-23 at 2 57 37 PM" src="https://github.com/flutter/engine/assets/110993981/7e90a93f-5522-4482-8fb6-a1607b403d10">

This fix is tracking the position of where the focused input node should be inserted and inserting it there, rather than always at the end of the form.  Once the tree is ordered correctly, Bitwarden's autofill logic works in Flutter forms. 

Tree order after fix:
<img width="502" alt="Screenshot 2023-05-23 at 6 01 05 PM" src="https://github.com/flutter/engine/assets/110993981/bd15a8a1-71f4-4f28-a86e-1903953bf030">

Fixes https://github.com/flutter/flutter/issues/61301
2023-05-26 16:17:18 +00:00
Jason Simmons
6bd25a9256 Apply the drawShadow bounds workaround to the Web HTML backend (flutter/engine#42304)
Previously the Flutter framework had been inflating the rectangle computed for the bounds of a drawShadow operation in order to work around potential inaccuracies in the SkPicture's bounds calculation.

That workaround is now obsolete for most platforms and was removed from the framework (see https://github.com/flutter/flutter/pull/127052). But the Web HTML backend is using different code for computing shadow bounds.  This PR restores the workaround for Web HTML for consistency with the old behavior.
2023-05-26 14:31:26 +00:00
Jackson Gardner
387666e22f Proper memory management in Skwasm (flutter/engine#42328)
This fixes https://github.com/flutter/flutter/issues/127243.

This ensures that native skwasm objects are cleaned up when their associated dart-side objects are garbage collected.
2023-05-26 03:46:26 +00:00
Jackson Gardner
8719978821 [Skwasm] Implement miscellaneous drawing APIs (flutter/engine#42324)
Implements `drawVertices`, `drawPoints`, and `drawAtlas`.

These are the last rendering APIs that are unimplemented in Skwasm! (Although we still need to add platform view support).
2023-05-25 21:53:23 +00:00
Jackson Gardner
23cd1255b9 Implement Web Codecs for Skwasm (flutter/engine#42184)
This implements making images from web browser codecs.

This implements a JS support library as well, which allows both the main thread and the background thread to keep a registry of JS objects that can be referenced by a numeric ID and transferred between each other.
2023-05-25 19:51:06 +00:00
Jackson Gardner
aa7b3fcf98 Only use 8 cores for web test compilation. (flutter/engine#42321) 2023-05-25 19:14:06 +00:00
Dan Field
45c1fe4348 Implement PlatformDispatcher.displays on web (flutter/engine#42297)
I missed this before.
2023-05-25 16:46:58 +00:00
Mouad Debbar
3784b3880f [web] Remove comment about dart:html migration (flutter/engine#42290)
Migration has already happened in [this PR](https://github.com/flutter/engine/pull/33370/files#diff-30cfc07b03caec6d1c915b40a9e50a23d1f1a1c54c670d5996199d805b077daeR213) so the comment is not relevant anymore.
2023-05-24 20:35:15 +00:00
Mouad Debbar
04afaaf25e [web] Hide JS types from dart:ui_web (flutter/engine#42252)
In order to use the exported `PlatformLocation` cross-platform, we need to remove any JS types from the interface. Namely, `DomEventListener`.

Required by https://github.com/flutter/flutter/pull/126851
2023-05-24 20:26:23 +00:00
Ashish Myles
a96b23fa7e [web] Update a11y announcements to append divs instead of setting content. (flutter/engine#42258)
This also removes the appended divs after a short time so that screen readers don't navigate to it, especially when users are entering the DOM to enable accessiblity.

Fixes https://github.com/flutter/flutter/issues/127335.
2023-05-24 20:08:21 +00:00
Mouad Debbar
3a4677a6d7 [web] Cleanup assertionsEnabled (flutter/engine#41829)
For consistency with the rest of the flutter code, this PR explores the possibility of removing our proprietary `assertionsEnabled`.
2023-05-24 15:08:50 +00:00
Brandon DeRosier
58ad391722 [Impeller] Start of Dart GPU prototype (flutter/engine#42228)
I've been slowly hacking on a prototype alongside a doc (public go link [imminent](https://github.com/flutter/website/pull/8716)) for a while (the doc has been changing a lot as a result of prototyping) and I think it's time to start landing parts of this prototype/experiment in-tree.

This initial PR just sets up the main context singleton on the UI thread. After this, I'll land the shader management stuff.

I re-used the existing experimental 3D flag for this, since this is meant to replace what can be done with Impeller Scene anyway.
2023-05-24 04:22:42 +00:00
Jonah Williams
52b5bc5340 Revert "[Impeller] use host image upload path on simulator" (flutter/engine#42212)
Reverts flutter/engine#42161

As reported by uses, this did not help with the issue.
2023-05-23 18:22:47 +00:00
Alexander Aprelev
90ee66eeaa Roll watcher dependency for web_ui to 1.1.0. (flutter/engine#42248)
Incoming dart sdk roll
https://dart.googlesource.com/sdk.git/+log/90b4df96e9dc..4881eadbade6
needs updated version of watcher due to FileSystemEvent becoming sealed.
2023-05-23 09:44:20 -07:00
Mouad Debbar
9aec8c5c62 [web] Move platformViewRegistry to ui_web (flutter/engine#41877)
In this PR, I'm leaving a getter for `platformViewRegistry` in `dart:ui` for backwards compatibility. At some point, we need to properly deprecate it (e.g. print a warning asking users to import it from `dart:ui_web` instead).

Next step is to migrate all call sites in flutter/flutter, flutter/packages and flutter/devtools (anything else?).

Issue: https://github.com/flutter/flutter/issues/126831

Fixes https://github.com/flutter/flutter/issues/41563
2023-05-23 16:17:56 +00:00
Jason Simmons
b4b589148b [Impeller] Return image decoder error messages to the Dart API (flutter/engine#42175)
Fixes https://github.com/flutter/flutter/issues/127061

See https://github.com/flutter/flutter/issues/126768
2023-05-22 20:43:05 +00:00
fzyzcjy
7387859481 Again a two-word super tiny typo (flutter/engine#42181)
Find this when reading source code today...

Btw, what about introducing a spell checker to Flutter source code? ;)

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added new tests to check the change I am making or feature I am
adding, or Hixie said the PR is test-exempt. See [testing the engine]
for instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [ ] 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
[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
2023-05-22 13:28:16 -07:00
Jackson Gardner
8812268345 Implement ImageFilter/ColorFilter/MaskFilter in Skwasm (flutter/engine#42088)
This implements https://github.com/flutter/flutter/issues/126342

This implements `ImageFilter`, `ColorFilter` and `MaskFilter` in Skwasm. This includes support on the `Paint` object, as well as the `SceneBuilder` layers that use these types.
2023-05-20 00:46:10 +00:00
htoor3
1046b076ce [web] Fix event offset for transformed widgets (and text input nodes). (flutter/engine#41870)
Text inputs have moved outside of the shadowDOM and are now using the pointer event offset calculation algorithm that platform views use.  However, transforms (e.g. scaling) applied to the input element aren't currently accounted for, which leads to incorrect offsets and clicks being registered inaccurately.

This PR attempts to transform those offset coordinates using the transform matrix data that is included in the geometry information sent over to `text_editing.dart` from the framework.

## Issues

* Fixes https://github.com/flutter/flutter/issues/125948 (text editing)
* Fixes https://github.com/flutter/flutter/issues/126661 (platform view scaling)
* Fixes https://github.com/flutter/flutter/issues/126754

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-19 19:25:58 +00:00
Jonah Williams
edf62bb82b [Impeller] use host image upload path on simulator (flutter/engine#42161)
This might help with https://github.com/flutter/flutter/issues/126768#issuecomment-1554469333
2023-05-19 16:51:51 +00:00
Mouad Debbar
281dea65ad [web] Cleanup Vector3 (flutter/engine#42096)
We have limited use of `Vector3` in the engine, so I converted it into a record and removed almost all of its methods.

Converting it to a record also means it's not mutable anymore, which is a positive in my book. That required a few minor changes in `Matrix4` but nothing major.
2023-05-19 14:05:29 +00:00
Yegor
1811689d04 [web:a11y] support dialogs described by descendants (flutter/engine#42108)
Add a new `RouteName` semantic role for nodes with `namesRoute` set without a `scopesRoute`. Such nodes provide a description for the nearest ancestor dialog node. The web equivalent of this is when an element `role="dialog"` is described by pointing to one of its children using `aria-labelledby` and `aria-describedby`. Here's an example:

```
<div
  role="dialog"
  aria-labelledby="dialog1Title"
  aria-describedby="dialog1Desc">
  <h2 id="dialog1Title">Your personal details were successfully updated</h2>
  <p id="dialog1Desc">
    You can change your details at any time in the user account section.
  </p>
  <button>Close</button>
</div>
```

([Source](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role))

Flutter currently does not distinguish between "labelled by" and "described by". In my testing, only `aria-describedby` resulted in an announcement of the dialog's description upon opening. `aria-labelledby` required that the dialog element itself be focusable, which is not the case. So I went with `aria-describedby`.

Fixes https://github.com/flutter/flutter/issues/126030
2023-05-19 00:25:19 +00:00
Mouad Debbar
46598122f7 [web] Simplify handling of custom url strategy (flutter/engine#42043)
Issue: https://github.com/flutter/flutter/issues/126831
2023-05-17 18:27:14 +00:00
Jackson Gardner
9d87a21795 Use client ICU data with skwasm. (flutter/engine#42018)
This implements https://github.com/flutter/flutter/issues/126340

For now, I am keeping this implementation simple without any extra caching. I may add caching later based on profiling results.
2023-05-16 22:07:16 +00:00
Jackson Gardner
d159d6cfc8 Initial support for images in Skwasm (flutter/engine#42019)
This partially implements https://github.com/flutter/flutter/issues/126341

It does not implement image codecs, because they are going to get complicated with transferring video frames to the web worker and so on. I am going to deal with image codecs in a subsequent change.
2023-05-16 18:35:17 +00:00
Jackson Gardner
148b626638 Use new unresolvedCodePoints API from skia. (flutter/engine#41991)
NOTE: this works off of a skia CL that is not merged yet, so we shouldn't merge this until it actually lands in skia and rolls into the engine. See https://skia-review.googlesource.com/c/skia/+/695716
2023-05-16 18:33:12 +00:00
Jason Simmons
6d1e5ca312 Convert public API NativeFieldWrapper classes to abstract interfaces (flutter/engine#41945)
See https://github.com/flutter/flutter/issues/123756
2023-05-16 18:13:07 +00:00
Jackson Gardner
4daa0909c2 Compile skwasm at -Oz. (flutter/engine#42002)
We want to start from a place of small size, and optimize from there with skwasm. Since there is no baseline expectation of performance at `-O3`, let's start with the smallest possible binary.
2023-05-15 19:59:14 +00:00
Kevin Lubick
0946d27add Migrate uses of SkSurface factories (flutter/engine#41978)
In http://review.skia.org/687639, many SkSurface static methods were moved and one was deleted (SkSurface::MakeRasterN32Premul). (SkSurface::MakeNull was omitted accidentally and http://review.skia.org/696537glesource.com/c/skia/+/696537 has not rolled into Flutter yet)

This changes the calls in Flutter to match those moved functions. There should be no functional difference and everything was done pretty mechanically (e.g. find and replace)

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-05-15 16:41:10 +00:00
Mouad Debbar
7b3b362623 [web] Cleaner output on LUCI (flutter/engine#41989)
Using ansi colors in LUCI results in output that looks like:
```
00:00 +0: loading flutter_tester_emulation_golden_test.dart                                                                                                                                            
00:01 +0: loading flutter_tester_emulation_golden_test.dart                                                                                                                                            
00:02 +0: loading flutter_tester_emulation_golden_test.dart
```

This PR disables colors on LUCI so that we get clean output that's easily scannable and searchable.
2023-05-12 21:50:22 +00:00
Bruno Leroux
fea415faa0 [Web+Linux] Fix pressing Meta keys throws (flutter/engine#41694)
## Description

This PR fixes Meta keys throwing exception on Chrome Linux.

The assertions throws because the DOM event sent when Meta keys is pressed is not coherent when Meta is the only pressed key.

## Related Issue

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

## Tests

Adds 1 test.
2023-05-12 21:46:17 +00:00
Mouad Debbar
e87d7155d2 [web] Fix crash on old versions of Chrome (Intl.Segmenter missing) (flutter/engine#41986)
`Chrome < v87` have the `v8BreakIterator` API but don't have `Intl.Segmenter`. This caused crashes for some apps (see b/281377168).

This PR enhances our feature detection to take into account this API mismatch.
2023-05-12 19:59:30 +00:00