1769 Commits

Author SHA1 Message Date
Yegor
df462f2b6e Revert "[web] fix clicks on merged semantic nodes (#43620)" (flutter/engine#46067)
This reverts commit 6dee3dd14ebb7e0834d4e533847c05fc3e5a8145.

The commit caused https://github.com/flutter/flutter/issues/134842. I'm going to try again, this time accounting for nested clickables/tappables.
2023-09-21 19:57:55 +00:00
Mouad Debbar
b827183108 [web] Move context menu handling to its own class (flutter/engine#46042)
Remove all `contextmenu` responsibilities out of `FlutterViewEmbedder`/`EmbeddingStrategy`, and into its own `ContextMenu` class that's instantiated and managed by the view.

There's one major difference that this PR brings: the `contextmenu` event listener is now attached to the `<flutter-view>` element instead of `window`. Since the entire app is contained within `<flutter-view>`, I expect no issues with this change.

Part of https://github.com/flutter/flutter/issues/134443
2023-09-20 18:35:03 +00:00
Mouad Debbar
c8363b0127 [web] Make PlatformViewManager a clear singleton (flutter/engine#46044)
Make it clear that `PlatformViewManager` is a singleton and follow the patterns that we use for other singleton classes.

Part of https://github.com/flutter/flutter/issues/134443
2023-09-20 18:28:53 +00:00
Jackson Gardner
566eaa9d21 Properly transfer objects between the main thread and web worker. (flutter/engine#46061)
We need to make sure to add objects to the transfer list when we send them across the ui thread/web worker boundary. Otherwise, they get copied, which is very expensive.

On my M1 MacBook Pro, I took measurements of scrolling in the material 3 demo. Before this change, the work on the web worker thread was taking about 25-40ms per frame. After the change, it's around 2ms.
2023-09-19 22:23:40 +00:00
Michael Goderbauer
f98560e895 Enable strict-inference (flutter/engine#46062)
Avoids that dynamic accidentally sneaks in, see https://dart.dev/tools/analysis#enabling-additional-type-checks
2023-09-19 21:17:16 +00:00
Srujan Gaddam
978165ed7d Implement JSObject instead of extending (flutter/engine#46070)
JSObject will have a factory constructor to create an object literal, so
you can't extend it as it will no longer have a generative constructor
(@staticInterop types can't have generative constructors).
2023-09-19 14:14:16 -07:00
Jackson Gardner
7f3c15c543 Update CI to Chrome 117 (flutter/engine#45842) 2023-09-19 16:27:49 +00:00
Mouad Debbar
2c66a531e9 [web] DOM objects implement JS object (flutter/engine#46047)
Instead of doing `as JSAny` for DOM objects that are defined in static JS interop, let's make them `implements JSObject`?

cc @eyebrowsoffire @srujzs thoughts?
2023-09-19 15:53:16 +00:00
Kevin Lubick
114d818f47 Add missing include of SkPath (flutter/engine#45996)
This is needed as Skia refactors its #includes internally.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-18 23:49:17 +00:00
Mouad Debbar
b470cd2ab1 [web] ScreenOrientation singleton (flutter/engine#45304)
One more piece moving out of `FlutterViewEmbedder`.

`ScreenOrientation` is a singleton class that can be used to control the screen orientation of the browser.

Part of https://github.com/flutter/flutter/issues/134443
2023-09-18 15:43:08 +00:00
Mouad Debbar
3ef852f5de [web] De-singletonize MouseCursor for multi-view (flutter/engine#45295)
`MouseCursor` is a singleton that works by accessing `flutterViewEmbedder` directly. After this PR, `MouseCursor` becomes a non-singleton that takes a `FlutterView` and controls the mouse cursor for said view.

Part of https://github.com/flutter/flutter/issues/134443
2023-09-18 15:35:58 +00:00
Kevin Lubick
7da278b05b Migrate GrMipmapped->skgpu::Mipmapped (flutter/engine#45881)
Skia's Graphite and Ganesh backend coalesced two enums regarding mipmaps
into one and deprecated the public Ganesh version. This migrates Flutter
to use the preferred type.

No functional changes expected. See also
https://skia-review.googlesource.com/c/skia/+/753567

## 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 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].
- [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
2023-09-15 11:48:20 -04:00
Michael Goderbauer
efc22ee283 Enable private field promotion (flutter/engine#45722)
New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020. Feature is enabled by bumping the min SDK version to 3.2.

Part of https://github.com/flutter/flutter/issues/134476.
2023-09-14 21:02:03 +00:00
Jackson Gardner
67ce410bd6 Declare the js context as nullable in skwasm surface callback (flutter/engine#45810)
Declaring this as non-nullable causes breakage with an incoming JS interop change from the SDK. Marking this as nullable fixes the issue.

This doesn't actually change any behavior. The breakages were in `test/ui/image_golden_test.dart`. No changes to the test are required (they did catch the issue when the dart roll happened).
2023-09-14 18:50:48 +00:00
godofredoc
c9ce9f7fd5 Update webdriver imports. (flutter/engine#45816)
This is to be able to update the webdriver dependency.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-14 18:26:42 +00:00
dependabot[bot]
2d9f35348b Bump html from 0.15.0 to 0.15.4 in /lib/web_ui (flutter/engine#45819)
Bumps [html](https://github.com/dart-lang/html) from 0.15.0 to 0.15.4.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/dart-lang/html/blob/main/CHANGELOG.md">html's changelog</a>.</em></p>
<blockquote>
<h2>0.15.4</h2>
<ul>
<li>Widen the dependency on <code>package:csslib</code>.</li>
<li>Require Dart <code>2.19</code>.</li>
</ul>
<h2>0.15.3</h2>
<ul>
<li>Added package topics to the pubspec file.</li>
</ul>
<h2>0.15.2</h2>
<ul>
<li>Add additional types at the API boundary (in <code>lib/parser.dart</code> and others).</li>
<li>Adopted the <code>package:dart_flutter_team_lints</code> linting rules.</li>
<li>Fixed an issue with <code>querySelector</code> where it would fail in some cases with
descendant or sibling combinators (<a href="https://redirect.github.com/dart-lang/html/issues/157">#157</a>).</li>
<li>Add an API example in <code>example/</code>.</li>
</ul>
<h2>0.15.1</h2>
<ul>
<li>Move <code>htmlSerializeEscape</code> to its own library,
<code>package:html/html_escape.dart</code>, which is exported from
<code>package:html/dom_parsing.dart</code>.</li>
<li>Use more non-growable lists, and type annotations on List literals.</li>
<li>Switch analysis option <code>implicit-casts: false</code> to <code>strict-casts: true</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b3b820bc36"><code>b3b820b</code></a> widen the dependency on 'package:csslib' (<a href="https://redirect.github.com/dart-lang/html/issues/217">#217</a>)</li>
<li><a href="92eacabadf"><code>92eacab</code></a> blast_repo fixes (<a href="https://redirect.github.com/dart-lang/html/issues/216">#216</a>)</li>
<li><a href="593d6f67ef"><code>593d6f6</code></a> Bump actions/checkout from 3.5.0 to 3.5.2 (<a href="https://redirect.github.com/dart-lang/html/issues/214">#214</a>)</li>
<li><a href="5d87dc8a06"><code>5d87dc8</code></a> added package topics to the pubspec file (<a href="https://redirect.github.com/dart-lang/html/issues/215">#215</a>)</li>
<li><a href="0438b26b90"><code>0438b26</code></a> Dart 3 compatibility: turn classes into mixins (<a href="https://redirect.github.com/dart-lang/html/issues/208">#208</a>)</li>
<li><a href="57b747d705"><code>57b747d</code></a> Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (<a href="https://redirect.github.com/dart-lang/html/issues/209">#209</a>)</li>
<li><a href="51c9910bec"><code>51c9910</code></a> Bump actions/checkout from 3.3.0 to 3.5.0 (<a href="https://redirect.github.com/dart-lang/html/issues/210">#210</a>)</li>
<li><a href="08643e9e2b"><code>08643e9</code></a> prep for publishing 0.15.2 (<a href="https://redirect.github.com/dart-lang/html/issues/205">#205</a>)</li>
<li><a href="0b8025c16e"><code>0b8025c</code></a> add an api example (<a href="https://redirect.github.com/dart-lang/html/issues/204">#204</a>)</li>
<li><a href="f118e004df"><code>f118e00</code></a> lint with dart_flutter_team_lints (<a href="https://redirect.github.com/dart-lang/html/issues/201">#201</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/dart-lang/html/compare/0.15.0...v0.15.4">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=html&package-manager=pub&previous-version=0.15.0&new-version=0.15.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2023-09-14 09:02:21 +00:00
dependabot[bot]
3b69f18bda Bump uuid from 3.0.6 to 4.0.0 in /lib/web_ui (flutter/engine#45794)
Bumps [uuid](https://github.com/Daegalus/dart-uuid) from 3.0.6 to 4.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/Daegalus/dart-uuid/releases">uuid's releases</a>.</em></p>
<blockquote>
<h2>4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Provide constants for RFC4122 namespaces in UuidValue by <a href="https://github.com/SpencerC"><code>@​SpencerC</code></a> in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/85">daegalus/dart-uuid#85</a></li>
<li>Fix classes to be properly const by <a href="https://github.com/daegalus"><code>@​daegalus</code></a> in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/88">daegalus/dart-uuid#88</a></li>
<li>Fix <a href="https://redirect.github.com/Daegalus/dart-uuid/issues/89">#89</a> v7: Uint64List not supported by dart2js. and v6: Uint64 accessor not supported by dart2js. by <a href="https://github.com/hambergerpls"><code>@​hambergerpls</code></a> in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/90">daegalus/dart-uuid#90</a></li>
<li>check the length of the Uint8list returned by the custom RNG by <a href="https://github.com/wph144"><code>@​wph144</code></a> in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/91">daegalus/dart-uuid#91</a></li>
<li>toBytes no longer validates by <a href="https://github.com/Erhannis"><code>@​Erhannis</code></a> in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/92">daegalus/dart-uuid#92</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/SpencerC"><code>@​SpencerC</code></a> made their first contribution in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/85">daegalus/dart-uuid#85</a></li>
<li><a href="https://github.com/hambergerpls"><code>@​hambergerpls</code></a> made their first contribution in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/90">daegalus/dart-uuid#90</a></li>
<li><a href="https://github.com/wph144"><code>@​wph144</code></a> made their first contribution in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/91">daegalus/dart-uuid#91</a></li>
<li><a href="https://github.com/Erhannis"><code>@​Erhannis</code></a> made their first contribution in <a href="https://redirect.github.com/daegalus/dart-uuid/pull/92">daegalus/dart-uuid#92</a></li>
</ul>
<h2>All changes since v3.0.7</h2>
<h3>v4.0.0</h3>
<ul>
<li>toBytes on UuidValue now does not validate by default, but has the option <code>validate</code> that can be set to true if you need validation when calling it. (Thanks <a href="https://github.com/Erhannis"><code>@​Erhannis</code></a>)</li>
</ul>
<h3>v4.0.0-beta3-1</h3>
<ul>
<li>Ensure that any custom RNG implementation produces Uint8Lists of length 16. (Thanks <a href="https://github.com/wph144"><code>@​wph144</code></a>)</li>
</ul>
<h3>v4.0.0-beta3</h3>
<ul>
<li><strong>[BREAKING CHANGE]</strong> Replacing UuidUtil rng functions with RNG classes.
<ul>
<li>UuidUtil.mathRNG() is replaced with MathRNG().generate().</li>
<li>UuidUtil.cryptoRNG() is replaced with CryptoRNG().generate().</li>
<li>Custom crypto implementations just need to implement the <code>RNG</code> abstract class.</li>
<li>namedArgs and positionalArgs have been removed from GlobalOptions</li>
<li>You may use LegacyRNG() if you need to use the old function style RNG.</li>
</ul>
</li>
<li>Fix a bug with the usage of Uint64List in Dart2js by not using it. (Thanks <a href="https://github.com/hambergerpls"><code>@​hambergerpls</code></a>)</li>
</ul>
<h3>v4.0.0-beta2</h3>
<ul>
<li><strong>[BREAKING CHANGE]</strong> The <code>Uuid</code> class now takes a <code>GlobalOptions</code> class instead of a <code>Map&lt;String, dynamic&gt;</code>.</li>
<li>Added options classes to eventually replace the Map parameter.</li>
<li><strong>[BREAKING CHANGE]</strong> Since v6,v7,v8 are new for 4.0, I have made it so they only take the new options class.</li>
<li>Reworked the constructors, and moved state out of the classes. Const is now supported properly again</li>
<li>Switched tests to use const Uuid to catch regressions.</li>
<li>Set the <code>options</code> parameter in v1, v4, and v5 to deprecated.</li>
<li><strong>[BREAKING CHANGE]</strong> Make UuidValue properly const also
<ul>
<li>Can no longer run validation on the const variant.</li>
<li>Added UuidValue.withValidation() to handle this usecase, it can't be const.</li>
<li>If you need const and validation. Create the UuidValue with the UUID, then call the <code>validate()</code> function on it.</li>
</ul>
</li>
</ul>
<h3>v4.0.0-beta1-1</h3>
<ul>
<li>Mostly cleanup, linting, updating depedencies, etc.</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/daegalus/dart-uuid/blob/main/CHANGELOG.md">uuid's changelog</a>.</em></p>
<blockquote>
<p>v4.0.0</p>
<ul>
<li>toBytes on UuidValue now does not validate by default, but has the option <code>validate</code> that can be set to true if you need validation when calling it. (Thanks <a href="https://github.com/Erhannis"><code>@​Erhannis</code></a>)</li>
</ul>
<p>v4.0.0-beta3-1</p>
<ul>
<li>Ensure that any custom RNG implementation produces Uint8Lists of length 16. (Thanks <a href="https://github.com/wph44"><code>@​wph44</code></a>)</li>
</ul>
<p>v4.0.0-beta3</p>
<ul>
<li><strong>[BREAKING CHANGE]</strong> Replacing UuidUtil rng functions with RNG classes.
<ul>
<li>UuidUtil.mathRNG() is replaced with MathRNG().generate().</li>
<li>UuidUtil.cryptoRNG() is replaced with CryptoRNG().generate().</li>
<li>Custom crypto implementations just need to implement the <code>RNG</code> abstract class.</li>
<li>namedArgs and positionalArgs have been removed from GlobalOptions</li>
<li>You may use LegacyRNG() if you need to use the old function style RNG.</li>
</ul>
</li>
<li>Fix a bug with the usage of Uint64List in Dart2js by not using it. (Thanks <a href="https://github.com/hambergerpls"><code>@​hambergerpls</code></a>)</li>
</ul>
<p>v4.0.0-beta2</p>
<ul>
<li><strong>[BREAKING CHANGE]</strong> The <code>Uuid</code> class now takes a <code>GlobalOptions</code> class instead of a <code>Map&lt;String, dynamic&gt;</code>.</li>
<li>Added options classes to eventually replace the Map parameter.</li>
<li><strong>[BREAKING CHANGE]</strong> Since v6,v7,v8 are new for 4.0, I have made it so they only take the new options class.</li>
<li>Reworked the constructors, and moved state out of the classes. Const is now supported properly again</li>
<li>Switched tests to use const Uuid to catch regressions.</li>
<li>Set the <code>options</code> parameter in v1, v4, and v5 to deprecated.</li>
<li><strong>[BREAKING CHANGE]</strong> Make UuidValue properly const also
<ul>
<li>Can no longer run validation on the const variant.</li>
<li>Added UuidValue.withValidation() to handle this usecase, it can't be const.</li>
<li>If you need const and validation. Create the UuidValue with the UUID, then call the <code>validate()</code> function on it.</li>
</ul>
</li>
</ul>
<p>v4.0.0-beta1-1</p>
<ul>
<li>Mostly cleanup, linting, updating depedencies, etc.</li>
</ul>
<p>v4.0.0-beta1</p>
<ul>
<li>Break up versions into individual objects that can be used standalone.</li>
<li>No more colliding global states between versions</li>
<li>Added UUID v6, v7, v8 from the new RFC.</li>
<li>Add <code>time</code>, <code>version</code>, and <code>variant</code> functions to UuidValue</li>
</ul>
<p>v3.0.7</p>
<ul>
<li>Fixed parse to allow buffers larger than 16 bytes to be used. [Thanks <a href="https://github.com/hoylen"><code>@​hoylen</code></a>]</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e67b968010"><code>e67b968</code></a> Fix SDK constraints</li>
<li><a href="13da889a55"><code>13da889</code></a> Update docs</li>
<li><a href="8b0ada22b8"><code>8b0ada2</code></a> Prep for 4.0.0 release</li>
<li><a href="3416381ba2"><code>3416381</code></a> Added validate option to toBytes.  Also ran dart format, because of git CI fail.</li>
<li><a href="8a49c14951"><code>8a49c14</code></a> Revert &quot;Made fromByteList and fromList match&quot; - turns out it wasn't</li>
<li><a href="c2dd584014"><code>c2dd584</code></a> Made fromByteList and fromList match</li>
<li><a href="14cb91c44d"><code>14cb91c</code></a> toBytes no longer validates</li>
<li><a href="54ccdce893"><code>54ccdce</code></a> Cleanup and regenerate docs</li>
<li><a href="06e425a21d"><code>06e425a</code></a> Cleanup and version bump</li>
<li><a href="ca2bf53b32"><code>ca2bf53</code></a> check the length of the Uint8list returned by the custom RNG</li>
<li>Additional commits viewable in <a href="https://github.com/Daegalus/dart-uuid/compare/3.0.6...4.0.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uuid&package-manager=pub&previous-version=3.0.6&new-version=4.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2023-09-14 00:44:47 +00:00
dependabot[bot]
17d55538a2 Bump quiver from 3.0.0 to 3.2.1 in /lib/web_ui (flutter/engine#45792)
Bumps [quiver](https://github.com/google/quiver-dart) from 3.0.0 to 3.2.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/google/quiver-dart/blob/master/CHANGELOG.md">quiver's changelog</a>.</em></p>
<blockquote>
<h2>3.2.1 - 2022-12-20</h2>
<ul>
<li>Un-deprecate <code>Optional</code>. Causing breaks with hints internally at Google.
Need to remove all usages before we try to land again.</li>
</ul>
<h2>3.2.0 - 2022-12-20 (Retracted)</h2>
<ul>
<li>Deprecate <code>Optional</code>. With the introduction of non-null by default in Dart SDK
2.12, existing users should migrate to non-nullable types. This type will be
removed in Quiver 4.0.0.</li>
<li>Make <code>TreeIterator</code> not implement deprecated <code>BidirectionalIterator</code>. The
<code>movePrevious</code> method still exists on <code>TreeIterator</code>.</li>
<li>Require Dart 2.17</li>
</ul>
<h2>3.1.0 - 2022-05-03</h2>
<ul>
<li>Fix: Make Cache.get ifAbsent parameter nullable. The parameter was always
optional; this just corrects the type.</li>
<li>Fix: Remove documentation links to the (previously removed) mirrors library.</li>
</ul>
<h2>3.0.1+2 - 2022-03-09</h2>
<ul>
<li>Remove broken references to the defunct mirrors library.</li>
</ul>
<h2>3.0.1+1 - 2021-10-14</h2>
<ul>
<li>Add documentation to <code>Optional</code> suggesting that adding new uses be avoided and
existing uses should be migrated to nullable types in codebases where non-null
by default has been enabled.</li>
</ul>
<h2>3.0.1 - 2021-04-06</h2>
<ul>
<li>Fix: Eliminate null check error on removal of root node of <code>AVLTree</code>.</li>
<li>Fix: Eliminate null check in partition internal iterator <code>current</code> getter.</li>
<li>Minor documentation typo corrections.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="90b92bee89"><code>90b92be</code></a> Un-deprecate Optional to fix Flutter things (<a href="https://redirect.github.com/google/quiver-dart/issues/717">#717</a>)</li>
<li><a href="63296a00e2"><code>63296a0</code></a> Prepare to release v3.2.0 (<a href="https://redirect.github.com/google/quiver-dart/issues/716">#716</a>)</li>
<li><a href="f68896fbed"><code>f68896f</code></a> Stop implementing deprecated <code>BidirectionalIterator</code>. (<a href="https://redirect.github.com/google/quiver-dart/issues/714">#714</a>)</li>
<li><a href="83c1717d2b"><code>83c1717</code></a> docs: rename IsochronousStream to Metronome (<a href="https://redirect.github.com/google/quiver-dart/issues/706">#706</a>)</li>
<li><a href="d0fe5a21e3"><code>d0fe5a2</code></a> Deprecate Optional (<a href="https://redirect.github.com/google/quiver-dart/issues/672">#672</a>)</li>
<li><a href="1fb9dfd47f"><code>1fb9dfd</code></a> Revert change to Optional (<a href="https://redirect.github.com/google/quiver-dart/issues/712">#712</a>)</li>
<li><a href="2f342a8c5c"><code>2f342a8</code></a> wip (<a href="https://redirect.github.com/google/quiver-dart/issues/711">#711</a>)</li>
<li><a href="79619bf4ef"><code>79619bf</code></a> blast_repo fixes (<a href="https://redirect.github.com/google/quiver-dart/issues/707">#707</a>)</li>
<li><a href="85dbe1d488"><code>85dbe1d</code></a> chore: drop everything related to travis-CI (<a href="https://redirect.github.com/google/quiver-dart/issues/709">#709</a>)</li>
<li><a href="5dfa014ee6"><code>5dfa014</code></a> Update to latest lints, require Dart 2.17, fix deprecation (<a href="https://redirect.github.com/google/quiver-dart/issues/708">#708</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/google/quiver-dart/compare/3.0.0...3.2.1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=quiver&package-manager=pub&previous-version=3.0.0&new-version=3.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2023-09-13 21:24:05 +00:00
dependabot[bot]
300b7dcb7e Bump http from 0.13.5 to 1.1.0 in /lib/web_ui (flutter/engine#45791)
Bumps [http](https://github.com/dart-lang/http/tree/master/pkgs) from 0.13.5 to 1.1.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/dart-lang/http/commits/http-v1.1.0/pkgs">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=http&package-manager=pub&previous-version=0.13.5&new-version=1.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2023-09-13 21:14:39 +00:00
dependabot[bot]
d01e83c6f3 Bump archive from 3.1.2 to 3.3.9 in /lib/web_ui (flutter/engine#45795)
Bumps [archive](https://github.com/brendan-duncan/archive) from 3.1.2 to 3.3.9.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/brendan-duncan/archive/blob/main/CHANGELOG.md">archive's changelog</a>.</em></p>
<blockquote>
<h2>3.3.9 - September 10, 2023</h2>
<ul>
<li>Fix for extractFileToDisk causing corrupt files by closing a file stream before it finished writing.</li>
</ul>
<h2>3.3.8 - September 02, 2023</h2>
<ul>
<li>Fix for zip security issue with symlinks, <a href="https://redirect.github.com/brendan-duncan/archive/issues/265">brendan-duncan/archive#265</a>. <a href="https://osv.dev/vulnerability/GHSA-9v85-q87q-g4vg">https://osv.dev/vulnerability/GHSA-9v85-q87q-g4vg</a>.</li>
<li>Fix for zip security issue with file paths, <a href="https://redirect.github.com/brendan-duncan/archive/issues/266">brendan-duncan/archive#266</a>. <a href="https://osv.dev/vulnerability/GHSA-r285-q736-9v95">https://osv.dev/vulnerability/GHSA-r285-q736-9v95</a>.</li>
<li>Add progress callback for decoding zip files.</li>
<li>Don't allow tar files to include absolute paths.</li>
<li>Fix error decoding AES-192.</li>
</ul>
<h2>3.3.7 - April 01, 2023</h2>
<ul>
<li>Add Zip AES-256 decryption</li>
<li>Fix symlink encoding for tar files</li>
</ul>
<h2>3.3.6 - January 27, 2023</h2>
<ul>
<li>Fix errors decoding XZ files.</li>
</ul>
<h2>3.3.5 - November 22, 2022</h2>
<ul>
<li>Fix file content when decoding zips</li>
</ul>
<h2>3.3.4 - November 11, 2022</h2>
<ul>
<li>Fix analysis errors.</li>
</ul>
<h2>3.3.3 - November 11, 2022</h2>
<ul>
<li>Support symlinks in ZIP archives</li>
<li>Fix ZIP decryption for ZipCrypto format</li>
</ul>
<h2>3.3.2 - October 16, 2022</h2>
<ul>
<li>Fix for UTF-8 file name caused problem on Windows.</li>
</ul>
<h2>3.3.1 - July 19, 2022</h2>
<ul>
<li>Fix for Inflate crashing on some compressed files.</li>
</ul>
<h2>3.3.0 - March 25, 2022</h2>
<ul>
<li>IO encoders (ZipFileEncoder, TarFileEncoder), will now include directories and empty directories.</li>
<li>Fix for ZipEncoder file lastModTime.</li>
<li>Fix for ArchiveFile.string.</li>
<li>Add PAX format to tar decoder.</li>
<li>Make more file operations async.</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="53e1773d8e"><code>53e1773</code></a> Update to 3.3.9</li>
<li><a href="2912496861"><code>2912496</code></a> Fix analyzer error</li>
<li><a href="674522a9f8"><code>674522a</code></a> Make sure input file isn't closed until after the archive has been extracted ...</li>
<li><a href="bbd1b6d1f7"><code>bbd1b6d</code></a> Update CHANGELOG.md</li>
<li><a href="21fe8e66cc"><code>21fe8e6</code></a> Update pubspec sdk version to &lt;4.0.0</li>
<li><a href="01110f00e0"><code>01110f0</code></a> Update to 3.3.8</li>
<li><a href="0d17b270a3"><code>0d17b27</code></a> Use central directory filename instead of local file name when extracting zip...</li>
<li><a href="6de492385d"><code>6de4923</code></a> improve symlink validation check</li>
<li><a href="edb0d48073"><code>edb0d48</code></a> don't create symlinks to files outside of the extracted path</li>
<li><a href="85ac8df7f8"><code>85ac8df</code></a> Merge pull request <a href="https://redirect.github.com/brendan-duncan/archive/issues/272">#272</a> from Mastbau-FN/main</li>
<li>Additional commits viewable in <a href="https://github.com/brendan-duncan/archive/compare/3.1.2...3.3.9">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=archive&package-manager=pub&previous-version=3.1.2&new-version=3.3.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2023-09-13 21:14:37 +00:00
Mouad Debbar
5579e6a2de [web] Use DOM to render paragraphs with letter spacing (flutter/engine#45651)
<**_Only applies to the HTML renderer_**>

When a paragraph has letter spacing that's greater than 0, we attempt to render each character individually on the canvas, while adding extra gaps between the characters (because the browser's canvas API doesn't support letter spacing).

This works well-ish in English but causes issues with international text. It also makes text rendering very slow.

With this PR, the idea is to force all paragraphs with letter spacing to be rendered to a DOM element.

Fixes https://github.com/flutter/flutter/issues/51234
Fixes https://github.com/flutter/flutter/issues/71220
2023-09-13 21:13:05 +00:00
Harry Terkelsen
6e786534e3 Revert "Use a single OffscreenCanvas for rendering in CanvasKit" (flutter/engine#45744)
Reverts flutter/engine#42672

This is causing breakages in the Framework roller on golden tests: https://github.com/flutter/flutter/pull/134583
2023-09-12 23:42:48 +00:00
Harry Terkelsen
9832541563 Use a single OffscreenCanvas for rendering in CanvasKit (flutter/engine#42672)
This changes CanvasKit's rendering model. Previously, each overlay
canvas induced a new WebGL context and SkSurface. Now, there is only
ever one SkSurface (backed by an OffscreenCanvas), and the overlays are
HTML canvases with a bitmaprenderer context. The content is rendered
using the SkSurface and passed to the overlays using
`transferToImageBitmap`. This way, there is only one WebGL context in
the lifetime of the app.

## 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.
- [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-09-12 13:07:48 -07:00
Jackson Gardner
b11ff71dd3 Fix JS interop signatures to use only JS types. (flutter/engine#45668)
This prepares for some upcoming changes to dart2js which will be more strict about what types can be used in a JS interop declaration.
2023-09-12 19:03:08 +00:00
Matej Knopp
e295cca68f [Web] Properly report inverted selection (flutter/engine#44806)
Fixes https://github.com/flutter/flutter/issues/131906

*List which issues are fixed by this PR. You must list at least one issue.*

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-12 01:23:21 +00:00
Jackson Gardner
167013fb08 Revert "Remove some of our hacks around JSPromise now that we have better APIs." (flutter/engine#45660)
Reverts flutter/engine#45591

This is somehow causing some issues with the hot reload tests and blocking engine -> framework rolls. See https://github.com/flutter/flutter/pull/134455
2023-09-11 20:43:59 +00:00
Kevin Lubick
b353c1fbe4 Update skwasm build to use safer flush call (flutter/engine#45652)
Follow-up to https://github.com/flutter/engine/pull/45644

## 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 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].
- [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
2023-09-11 13:55:05 -04:00
Jackson Gardner
58d43efa4c Remove some of our hacks around JSPromise now that we have better APIs. (flutter/engine#45591)
Our JSPromise hackery is causing some issues with the new dart roll. We should just use the `JSPromise` and `JSFunction` support to simplify this. Note that I still have to do *some* hackery to construct `JSPromise` objects and to invoke `JSFunction` objects, and eventually we'll probably be able to simplify this even more once those APIs are baked into `dart:js_interop`
2023-09-11 17:43:19 +00:00
Greg Spencer
528ab0c90b Remove usage of the Jazzy document formatter for Objective C, in favor of Doxygen. (flutter/engine#45561)
## Description

This removes references to Jazzy, and removes the `gen_objcdoc.py` script, since that is now handled by `gen_docs.py`

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

## Related PRs
 - https://github.com/flutter/flutter/pull/134246
2023-09-08 17:45:06 +00:00
Renzo Olivares
31768e6ea4 [Web] Fix insertions/deletions at inverted selection for TextEditingDeltas (flutter/engine#44693)
Fixes issue where the delta range would be calculated wrong when the selection is inverted.
2023-09-08 14:52:51 +00:00
Stephen Adams
182847ec84 [web] More efficient fallback font selection (flutter/engine#44526)
The PR improves the code size and runtime performance of fallback font selection.

### Performance improvements

Initialization of the data structures to support fallback font selection has been moved from creating the FallbackFontManager (first frame) to the first use, i.e. the first frame actually needing a fallback font.

The numbers reported below are for a lightly edited version of the counter demo that appends to the counter about ~300 missing code points that need ~25 fallback fonts to cover the missing code points. Timings taken from a few profiles on my performance workstation.

|  |  Before | After  | 
| --- | ---: | ---: |
| FallbackFontManager() |~100ms | <2ms |
| First need | 0ms | 12ms |
| Subsequent need | 20-30ms | <1ms |

### Size improvements

|  |  Before | After  | Δ |
| --- | ---: | ---: | ---: |
| main.dart.js | 1586405 | 1477319 | -109086 (-6.87%) |
| brotli -9 | 427304 | 401611 | -25693 (-6.01%) |

### Algorithm notes

#### Startup

The old algorithm built an interval tree from the code point ranges of the ~140 fallback fonts and uses the interval tree to build a list of fonts that support each missing code point. The new algorithm uses a binary search map that directly produces the list of fonts. There are fewer binary search ranges (~22k) than the aggregate ranges for all the fonts (~26k).
Most of the startup time gain comes from using a data unpacks directly into a useful form rather than needing processing to build an interval tree (~12ms vs ~100ms).

#### Running

The runtime for font selection is greatly improved for several reasons

- The code point space is partitioned into components so that code point counting can be batched.
- When a font is selected, the counts are updated incrementally rather than being recomputed.
- The counts are held in fields of the NotoFont and component objects rather than in Maps or Sets.

Batching, incremental update and avoiding hash tables are roughly multiplicative in effect.

## Issues

- https://github.com/flutter/flutter/issues/131440

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-31 22:42:20 +00:00
Jackson Gardner
e9d2afd7d5 [web] Roll to most recent fallback font data (flutter/engine#45301) 2023-08-30 22:03:46 +00:00
Jackson Gardner
c46824a2fa Add an API in ui_web to create a ui.Image from an ImageBitmap (flutter/engine#45256)
This API will help with situations in which the user has a browser
resource that they want to transform into a `ui.Image` and render
directly into the layer tree. Most browser resources can be converted to
an `ImageBitmap` via the `createImageBitmap` API.
2023-08-30 13:01:22 -07:00
yaakovschectman
e2908808b6 Add callback to Embedder API to respond to new channel listeners, and use for Windows lifecycle (flutter/engine#44827)
Supplant the temporary solution
https://github.com/flutter/engine/pull/44238 with a more elegant
solution with am embedder API callback. The windows engine provides a
callback that enables graceful exit and app lifecycle when the platform
and lifecycle channels are listened to, respectively.

https://github.com/flutter/flutter/issues/131616

## 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.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] 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

---------

Co-authored-by: Chris Bracken <chris@bracken.jp>
2023-08-29 16:12:35 -04:00
Mouad Debbar
e2e1b979c4 [web] Make devicePixelRatio ready for multi-view (flutter/engine#44783)
This PR moves the source of truth for`devicePixelRatio` to the `EngineFlutterDisplay` singleton.

Main things that this PR is trying to do:
- `EngineFlutterDisplay` is a singleton that represents information about the display.
  - The `devicePixelRatio` can be overriden in tests.
  - The `browserDevicePixelRatio` gets the value directly from the browser and can't be overriden.
- Remove `EngineSingletonFlutterWindow` and incorporate it into `EngineFlutterWindow`.
2023-08-29 15:51:05 +00:00
Jackson Gardner
4552f351b3 Fix scene view canvas/platform view placement. (flutter/engine#45199)
I wasn't adjusting the `left` and `top` css styles based on the device pixel ratio. This fixes that and also sets up unit tests for `SceneView`.
2023-08-29 01:43:07 +00:00
Jackson Gardner
fd9e7e8e8f [skwasm] encode PNGs using browser APIs (flutter/engine#45187)
This allows us to remove libpng from skia entirely, which saves us about 25kb brotli compressed.

Note, this should not change any functionality. The existing functionality is covered by the unit tests here: bfcb9d08e8/lib/web_ui/test/ui/image_golden_test.dart (L197-L197)
2023-08-28 23:08:46 +00:00
Jackson Gardner
69b2747ca3 Skwasm platform views (flutter/engine#43011)
This implements platform views in Skwasm. There are a number of substantial changes rolled up in this change, including:
* Reworked the rendering system to use multiple canvases with a single WebGL context, via ImageBitmap rendering.
* Reworked our object management and bindings to use the `__externref_t` construct in C code.
* Upgraded emscripten to a much newer version
* Generified skwasm's scene builder to be able to work with any renderer that can produce `ImageBitmap` objects from Pictures, and whose `Canvas`, `Picture` and `ImageFilter` objects conform to `SceneCanvas`/`ScenePicture`/`SceneImageFilter`

For platform views themselves, most stuff is implemented except for clipping. I plan on doing that in a subsequent change.
2023-08-28 16:29:14 +00:00
Ian Hickson
f9a5c26a42 FontVariation.lerp, custom FontVariation constructors, and more documentation (flutter/engine#45030)
This should aid with implementing the framework side of https://github.com/flutter/flutter/issues/105120.
This should also address https://github.com/flutter/flutter/issues/28543.

Original commit in https://github.com/flutter/engine/pull/43750 was reverted in https://github.com/flutter/engine/pull/44993.
Second attempt in https://github.com/flutter/engine/pull/44996 was reverted in https://github.com/flutter/engine/pull/45023.
2023-08-25 05:54:08 +00:00
Zachary Anderson
ad1a04dea2 Revert "FontVariation.lerp, custom FontVariation constructors, and more documentation" (flutter/engine#45023)
Reverts flutter/engine#44996

Analysis failures on rolling to the framework
https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/62884/overview
2023-08-23 14:36:08 -07:00
Mouad Debbar
8dfbed3af4 [web] Remove some unused functions (flutter/engine#44505) 2023-08-23 19:18:54 +00:00
Ian Hickson
190343a2bb FontVariation.lerp, custom FontVariation constructors, and more documentation (flutter/engine#44996)
This should aid with implementing the framework side of https://github.com/flutter/flutter/issues/105120.
This should also address https://github.com/flutter/flutter/issues/28543.

This is a reland of https://github.com/flutter/engine/pull/43750 with two changes, one to fix a typo mentioned in https://github.com/flutter/engine/pull/43750#issuecomment-1689299114, and one to fix the analysis error found when rolling this to the framework (https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/62845/overview). The latter change is temporary and can be relaxed when FontVariations is reexported from dart:ui. I plan to do that when fixing https://github.com/flutter/flutter/issues/105120.
2023-08-23 18:05:53 +00:00
Zachary Anderson
c187b9fcfd Revert "FontVariation.lerp, custom FontVariation constructors, and more documentation" (flutter/engine#44993)
Reverts flutter/engine#43750

Looks like this is having trouble rolling into the framework: https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/62845/overview
2023-08-23 05:55:13 +00:00
Ian Hickson
2a18cbd604 FontVariation.lerp, custom FontVariation constructors, and more documentation (flutter/engine#43750)
This should aid with implementing the framework side of https://github.com/flutter/flutter/issues/105120 This should also address https://github.com/flutter/flutter/issues/28543.
2023-08-23 03:35:20 +00:00
Ian Hickson
9881f4846b Make web tests start with an empty title (flutter/engine#43846)
Fixes https://github.com/flutter/flutter/issues/39159
2023-08-23 03:22:59 +00:00
Mouad Debbar
a7f0c0c789 [web] Move remaining web-only APIs to dart:ui_web (flutter/engine#44516)
- Warn on `webOnlyInitializePlatform` and replace all usages with `ui_web.bootstrapEngine`.
- Remove unused `webOnlyPaintedBy` parameter.
- `webOnlyDebugPhysicalSizeOverride` => `ui_web.debugPhysicalSizeOverride`.
- `webOnlyInstantiateImageCodecFromUrl` => `ui_web.createImageCodecFromUrl`.
- `WebOnlyImageCodecChunkCallback` => `ui_web.ImageCodecChunkCallback`.
- `_webOnlyDidWarnAboutPerformanceOverlay` => `_didWarnAboutPerformanceOverlay`.
- Remove unnecessary usage of `futurize`.

Part of https://github.com/flutter/flutter/issues/126831
2023-08-22 19:17:16 +00:00
LongCatIsLooong
649a1e181c Reland "Implementing TextScaler for nonlinear text scaling (#42062)" (flutter/engine#44907)
The original PR crashes because of a JNI signature mismatch (`(FJ)F` -> `(FI)F`). Update the signature in a415da5619

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-21 23:16:10 +00:00
Jonah Williams
6f3b341232 Revert "Implementing TextScaler for nonlinear text scaling" (flutter/engine#44882)
Reverts flutter/engine#42062

Failing due to:

>>>>>>>> 08-18 15:59:41.350 3439 3484 E flutter :
[ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(902)]
Could not locate FlutterJNI#getScaledFontSize method
>>>>>>>> 08-18 15:59:41.350 3439 3484 F flutter :
[FATAL:flutter/shell/platform/android/library_loader.cc(26)] Check
failed: result.
2023-08-20 14:10:13 -07:00
LongCatIsLooong
7d07749fdd Implementing TextScaler for nonlinear text scaling (flutter/engine#42062)
`platformTextScaler` doesn't need to be per window, assuming the SP -> DiP mapping is always the same on the same device (unless the user changes the preference), and does not depend on the display device's pixel density (it's confirmed).

Design doc: https://docs.google.com/document/d/1-DlElw3zWRDlqoc9z4YfkU9PbBwRTnc7NhLM97ljGwk/edit#

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-18 22:22:16 +00:00
Amir Panahandeh
e9f54512c8 Add more tests for CompositionAwareMixin (flutter/engine#44717)
Adds missing tests for `CompositionAwareMixin`. Check https://github.com/flutter/engine/pull/44139#discussion_r1288733128 and https://github.com/flutter/engine/pull/44139#discussion_r1288009016

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-08-16 00:08:42 +00:00