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.
Closes https://github.com/flutter/flutter/issues/135057.
This is a fair bit more involved than previous changes, just due to the sheer number of implicit conversions.
Highlights:
- Made `public uint32_t argb` `private uint32_t argb_`, and added `argb()` instead.
- Added `ToSk(DlColor)` instead of using implicit conversions.
There were a bunch of places where I had to make a judgement call (particularly in tests) to keep the code a bit "messy", i.e. `DlColor(SK_RED)`, just to make the diff as small as possible and to prevent silly copy and paste bugs. I'd be open to filing a follow-up issue to reduce unnecessary wrapping.
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
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.
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).
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?
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
`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
The `@pragma('vm:entry-point')` annotation serves as an annotation
telling our AOT compiler that the member is needed and cannot be
tree-shaken because it may be accessed from the outside (i.e. C++).
There are seemingly entry-point annotations on members that aren't
actually used from C++.
=> We remove the annotation from those members in this CL.
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).
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 />
[](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>
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<String, dynamic></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<String, dynamic></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 "Made fromByteList and fromList match" - 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 />
[](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>
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 />
[](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>
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 />
[](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>
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 <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 />
[](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>
<**_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
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`
This PR enforces the rules as documented in `FlutterView.Render`, where
calls in illegal situations should be ignored - but have never been
enforced.
```
/// This function must be called within the scope of the
/// [PlatformDispatcher.onBeginFrame] or [PlatformDispatcher.onDrawFrame]
/// callbacks being invoked.
///
/// If this function is called a second time during a single
/// [PlatformDispatcher.onBeginFrame]/[PlatformDispatcher.onDrawFrame]
/// callback sequence or called outside the scope of those callbacks, the call
/// will be ignored.
```
This rule is very important to implementing multi-view without having to
introduce new APIs. However, currently these illegal calls are not
ignored, and historically many tests (especially integration tests) were
unknowingly running based on this fact. @goderbauer did great work by
eliminating these cases in g3, and it's time for us to make sure these
calls are ignored.
Most effort of this PR goes to unit testing the changes. Some part of
`Shell::Create` is extracted into a static function to avoid duplicate
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
Update: Blocked on https://github.com/flutter/engine/pull/44912 landing,
and merging into google3.
---
Partial work towards https://github.com/flutter/flutter/issues/112498.
_**tl;dr**: In Impeller's backend we intend to _always_ dither
gradients, and never allow any changes long-term (i.e., write your own
shader if you want different behavior) with the assumption that dithered
gradients look better most of the time, and don't typically hurt
elsewhere._
Note that, at the time of this writing, I couldn't find a single case of
this being set explicitly to `true` inside Google, and there are between
[100 and 200 publicly accessible on
GitHub](https://github.com/search?q=%22Paint.enableDithering%22+language%3ADart&type=code&l=Dart),
of which virtually all are setting it explicitly to `true`.
There are some (valid) concerns this would cause a lot of golden-file
image diffs, so I'm going to seek explicit approval from the Google
testing team as well as someone from the framework team before landing
this commit.
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
Relands https://github.com/flutter/engine/pull/45131
Fixes https://github.com/flutter/flutter/issues/132416
Differences from last time:
- Some minor merge conflict fixes
- Use the RTree to get the bounds instead of recalculating the bounds
- Make the iOS platform view controller implementation use the impeller-aware slices instead of the display list ones. This has been fixed for Android and the desktop embedding, but I missed iOS. The unit tests weren't actually running before I branched for my PR, @zanderso fixed them up separately and this resulted in catching the failures on post submit last time.
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.
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`.
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)