Skip to content

Conversation

@eseidel
Copy link

@eseidel eseidel commented Nov 9, 2023

This now includes our mixed-mode Dart.

engine-flutter-autoroll and others added 30 commits June 20, 2023 22:37
…lutter#129208)

flutter/engine@06d0c08...6662441

2023-06-20 [email protected] Roll Skia from 9f8b501ca68c to d56841344bbe (5 revisions) (flutter/engine#43016)
2023-06-20 [email protected] Roll Skia from 0b26ffb4efe0 to 9f8b501ca68c (10 revisions) (flutter/engine#43012)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129217)

flutter/engine@6662441...7d4abb8

2023-06-20 [email protected] Roll Skia from d56841344bbe to 0b88d9031cd2 (3 revisions) (flutter/engine#43018)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This is a second attempt to merge flutter#107269. Currently I've fixed two of the issues:
1. Fixed horizontal scrollview by using a switch statement to consider vertical/horizontal case.
2. Fixed issue of `paintExtent` not being the right extent for painting. Rather using a `scrollExtent` for the main axis length of the decoration box and painting it offsetted by the `scrollOffset`.
3. If the sliver child has inifinite scrollExtent, then we only draw the decoration down to the bottom of the `cacheExtent`. The developer is expected to ensure that the border does not creep up above the cache area.

This PR includes a test that checks that the correct rectangle is drawn at a certain scrollOffset for both the horizontal and vertical case which should be sufficient for checking that `SliverDecoration` works properly now.

Fixes flutter#107498.
Fixes a bug when tapping near certain TextFields.
…lutter#129225)

flutter/engine@7d4abb8...adfc3af

2023-06-20 [email protected] Roll Dart SDK from 219b3198373c to 493133372cac (2 revisions) (flutter/engine#43021)
2023-06-20 [email protected] Roll Skia from 0b88d9031cd2 to 13d83a6912ce (4 revisions) (flutter/engine#43020)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129228)

flutter/engine@adfc3af...e5a860c

2023-06-21 [email protected] Implement the APNG_DISPOSE_OP_BACKGROUND disposal method in the animated PNG decoder (flutter/engine#42933)
2023-06-21 [email protected] Roll Skia from 13d83a6912ce to cc164404690f (1 revision) (flutter/engine#43024)
2023-06-20 [email protected] Roll buildroot to 6e71c38443c0bf9d8954c87bf69bb4e019f44f94 (flutter/engine#43019)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes flutter#129025

Also 
- simplifies OverlayPortal code a bit and adds an assert.
-  `Tooltip` shouldn't rebuild when hiding/showing the tooltip
…lutter#129232)

flutter/engine@e5a860c...946f523

2023-06-21 [email protected] Roll Dart SDK from 493133372cac to 178d3d1184cb (1 revision) (flutter/engine#43032)
2023-06-21 [email protected] Roll Skia from cc164404690f to efc045c15fdd (1 revision) (flutter/engine#43027)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129234)

flutter/engine@946f523...5313ca3

2023-06-21 [email protected] Roll Fuchsia Mac SDK from fdtK_FqpscIVvbb_j... to ct6r5YjdG2xpZPhkT... (flutter/engine#43035)
2023-06-21 [email protected] [Android] Return the keyboard pressed state (flutter/engine#42758)

Also rolling transitive DEPS:
  fuchsia/sdk/core/mac-amd64 from fdtK_FqpscIV to ct6r5YjdG2xp

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129240)

flutter/engine@5313ca3...059643d

2023-06-21 [email protected] Roll Skia from efc045c15fdd to a6412350122e (2 revisions) (flutter/engine#43036)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129243)

flutter/engine@059643d...cfbd365

2023-06-21 [email protected] Roll Skia from a6412350122e to 7121db7c6dc2 (3 revisions) (flutter/engine#43037)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129253)

flutter/engine@cfbd365...f973fb4

2023-06-21 [email protected] Roll Fuchsia Linux SDK from 41wcREjd9roHDS1jM... to 4mkuVtlGBaumKSe8x... (flutter/engine#43038)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 41wcREjd9roH to 4mkuVtlGBaum

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…129196)

Refactor the globals getter for `Analytics` to be in the context instead of having a default fallback. The current state of the tool creates a new instance every time `globals.analytics` was called

Addresses issue:
- flutter#128535
Move more test ownership from zanderso to the tools team. This file is used by the flaky issue bot to comment weekly on test shards that flake > 2%. The owner of the shard will be @'d on the issue. It is their responsibility to investigate and triage (potentially re-prioritizing, the bot will initially assign it p1).
flutter/packages@6e1918f...0fdf05f

2023-06-21 [email protected] [image_picker_android] Modify FileUtils.getBaseName to return the whole filename when it contains no period (flutter/packages#4237)
2023-06-21 [email protected] [tools] Add mockito support to update-dependency (flutter/packages#4260)
2023-06-21 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.5.2 to 3.5.3 (flutter/packages#4185)
2023-06-21 49699333+dependabot[bot]@users.noreply.github.com [image_picker]: Bump org.jetbrains.kotlin:kotlin-bom from 1.8.21 to 1.8.22 in /packages/image_picker/image_picker_android/android (flutter/packages#4190)
2023-06-20 49699333+dependabot[bot]@users.noreply.github.com Bump actions/labeler from 4.0.3 to 4.1.0 (flutter/packages#4145)
2023-06-20 [email protected] [ci] Add LUCI version of the analyze tasks (flutter/packages#4253)
2023-06-20 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump org.jetbrains.kotlin:kotlin-bom from 1.8.21 to 1.8.22 in /packages/in_app_purchase/in_app_purchase_android/android (flutter/packages#4193)
2023-06-20 [email protected] [ci] Switch Linux and web build-all to LUCI (flutter/packages#4252)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This change updates `SelectableRegion`s right-click gesture to match native platform behavior.

Before: Right-click gesture selects word at position and opens context menu (All Platforms)
After: 
- Linux, toggles context menu on/off, and collapses selection when click was not on an active selection (uncollapsed).
- Windows, Android, Fuchsia, shows context menu at right-clicked position (unless the click is at an active selection).
- macOS, toggles the context menu if right click was at the same position as the previous / or selects word at position and opens context menu.
- iOS, selects word at position and opens context menu.

This change also prevents the `copy` menu button from being shown when there is a collapsed selection (nothing to copy).

Fixes flutter#117561
…lutter#129293)

flutter/engine@f973fb4...090fae8

2023-06-21 [email protected] Roll Skia from c983b97d03a8 to 7eeb94b1e778 (4 revisions) (flutter/engine#43045)
2023-06-21 [email protected] Move android emulator tests to v2. (flutter/engine#43008)
2023-06-21 [email protected] Roll Skia from 65f30e5804c7 to c983b97d03a8 (2 revisions) (flutter/engine#43044)
2023-06-21 [email protected] Roll Skia from 7121db7c6dc2 to 65f30e5804c7 (3 revisions) (flutter/engine#43043)
2023-06-21 [email protected] Roll Dart SDK from 178d3d1184cb to 88fa9330633e (1 revision) (flutter/engine#43041)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Should fix an unreproducible crash in text editing and track it with an assertion.
This PR was generated by `flutter update-packages --force-upgrade`.
… it (flutter#128366)

## FlutterTimeline

Add a new class `FlutterTimeline` that's a drop-in replacement for `Timeline` from `dart:developer`. In addition to forwarding invocations of `startSync`, `finishSync`, `timeSync`, and `instantSync` to `dart:developer`, provides the following extra methods that make is easy to collect timings for code blocks on a frame-by-frame basis:

* `debugCollect()` - aggregates timings since the last reset, or since the app launched.
* `debugReset()` - forgets all data collected since the previous reset, or since the app launched. This allows clearing data from previous frames so timings can be attributed to the current frame.
* `now` - this was enhanced so that it works on the web by calling `window.performance.now` (in `Timeline` this is a noop in Dart web compilers).
* `collectionEnabled` - a field that controls whether `FlutterTimeline` stores timings in memory. By default this is disabled to avoid unexpected overhead (although the class is designed for minimal and predictable overhead). Specific benchmarks can enable collection to report to Skia Perf.

## Semantics benchmarks

Add `BenchMaterial3Semantics` that benchmarks the cost of semantics when constructing a screen full of Material 3 widgets from nothing. It is expected that semantics will have non-trivial cost in this case, but we should strive to keep it much lower than the rendering cost. This is the case already. This benchmark shows that the cost of semantics is <10%.

Add `BenchMaterial3ScrollSemantics` that benchmarks the cost of scrolling a previously constructed screen full of Material 3 widgets. The expectation should be that semantics will have trivial cost, since we're just shifting some widgets around. As of today, the numbers are not great, with semantics taking >50% of frame time, which is what prompted this PR in the first place. As we optimize this, we want to see this number improve.
…lutter#129306)

flutter/engine@090fae8...08aaa88

2023-06-21 [email protected] Enabling pre-push checks on Windows (flutter/engine#36123)
2023-06-21 [email protected] Document the use of contexts on engine_v2 tests. (flutter/engine#43013)
2023-06-21 [email protected] Generate treemap. (flutter/engine#43029)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Required to fix an analyzer error that is blocking the engine roller
…lutter#129331)

flutter/engine@08aaa88...c6251a6

2023-06-22 [email protected] Remove process-local tempfs (flutter/engine#43056)
2023-06-22 [email protected] Roll Skia from 0185ce148be9 to 076e7c004d20 (2 revisions) (flutter/engine#43069)
2023-06-22 [email protected] Roll Skia from 96d6135e9ee8 to 0185ce148be9 (4 revisions) (flutter/engine#43068)
2023-06-22 [email protected] [Impeller] Uniquely label subpasses and root blit (flutter/engine#43015)
2023-06-22 [email protected] [Impeller] Add Rect::Project (flutter/engine#43026)
2023-06-21 [email protected] Roll Skia from 32e953e71266 to 96d6135e9ee8 (1 revision) (flutter/engine#43067)
2023-06-21 [email protected] Roll Fuchsia Mac SDK from ct6r5YjdG2xpZPhkT... to QtQznuUmHMTyORqxJ... (flutter/engine#43065)
2023-06-21 [email protected] Roll Fuchsia Linux SDK from 4mkuVtlGBaumKSe8x... to 7EZeNE4aGd29VfDly... (flutter/engine#43066)
2023-06-21 [email protected] Roll ANGLE from 3a3a3c655a96 to ac263582dda4 (60 revisions) (flutter/engine#43062)
2023-06-21 [email protected] Roll Skia from 7eeb94b1e778 to 32e953e71266 (17 revisions) (flutter/engine#43064)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from 4mkuVtlGBaum to 7EZeNE4aGd29
  fuchsia/sdk/core/mac-amd64 from ct6r5YjdG2xp to QtQznuUmHMTy

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129334)

flutter/engine@c6251a6...d9530e2

2023-06-22 [email protected] [Impeller] Fix up coverage hints for blending/vertices, fix TiledTextureContents::RenderToSnapshot (flutter/engine#43017)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129337)

flutter/engine@d9530e2...703c9a1

2023-06-22 [email protected] Roll Skia from 076e7c004d20 to 71047dca9f77 (1 revision) (flutter/engine#43071)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#129339)

flutter/engine@703c9a1...8cc6d6d

2023-06-22 [email protected] [Impeller] Correctly compute UVs in texture fill (flutter/engine#43028)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
christopherfujino and others added 25 commits September 1, 2023 00:07
…lutter#133818)

Fixes `flutter upgrade` which would fail with "Unknown flutter tag" because it would call `git` commands in the user's current working directory instead of the Flutter SDK.

Fixes flutter#133819.
…utter#133057)

Cherry picks flutter#132989 which fixes
flutter#132788

Fixes flutter#133058

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [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
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[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
This CP lands PR flutter#129856 into `stable`.

The PR above was part of a engine+framework change that got split in half during the stable cut, so now users are seeing some warnings that they can't act on.

(Those warnings were only intended for people who were using our methods manually, rather than using normal flutter tooling).

## Issues

Fixes flutter#133069
…studio (flutter#133602)

cherry-pick for flutter#133180

## 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], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

<!-- 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
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[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: Xilai Zhang <[email protected]>
…lutter#134157)

cp: flutter#133575

Cirrus tests are removed in favor of the LUCI ones.

context:
flutter#133602 (comment)

Co-authored-by: godofredoc <[email protected]>
…er#134163)

# Flutter stable 3.13.0 Framework

## Scheduled Cherrypicks
Partially cherry picks flutter@3b8f6c4, in particular it only performs the update of `vm_snapshot_analysis` to 0.7.6.

Issues fixed:
* flutter#132695
Rolls engine to: 17a711a7765a198264b20d8c4983f2f6f1271271
…er#134599)

# Flutter stable 3.13.4 Framework

## Scheduled Cherrypicks
…er#135532)

# Flutter stable 3.13.6 Framework

## Scheduled Cherrypicks
…er#137284)

# Flutter stable 3.13.9 Framework

## Scheduled Cherrypicks
@eseidel eseidel closed this Nov 9, 2023
felangel pushed a commit that referenced this pull request Dec 11, 2023
This is a follow up to the following pull requests:
- flutter#124514

I was finally able to reproduce this bug and found out why it was happening. Consider this code:

```dart
GestureDetector(
  behavior: HitTestBehavior.translucent,
  // Note: Make sure onTap is not null to ensure events
  // are captured by `GestureDetector`
  onTap: () {},
  child: _shouldShowSlider
    ? Slider(value: _value, onChanged: _handleSlide)
    : const SizedBox.shrink().
)
```

Runtime exception happens when:

1. User taps and holds the Slider (drag callback captured by `GestureDetector`)
2. `_shouldShowSlider` changes to false, Slider disappears and unmounts, and unregisters `_handleSlide`. But the callback is still registered by `GestureDetector`
3. Users moves finger as if Slider were still there
4. Drag callback is invoked, `_SliderState.showValueIndicator` is called
5. Exception - Slider is already disposed

This pull request fixes it by adding a mounted check inside `_SliderState.showValueIndicator` to ensure the Slider is actually mounted at the time of invoking drag event callback. I've added a unit test that will fail without this change.

The error stack trace is:

```
The following assertion was thrown while handling a gesture:
This widget has been unmounted, so the State no longer has a context (and should be considered
defunct).
Consider canceling any active work during "dispose" or using the "mounted" getter to determine if
the State is still active.

When the exception was thrown, this was the stack:
#0      State.context.<anonymous closure> (package:flutter/src/widgets/framework.dart:950:9)
#1      State.context (package:flutter/src/widgets/framework.dart:956:6)
#2      _SliderState.showValueIndicator (package:flutter/src/material/slider.dart:968:18)
#3      _RenderSlider._startInteraction (package:flutter/src/material/slider.dart:1487:12)
#4      _RenderSlider._handleDragStart (package:flutter/src/material/slider.dart:1541:5)
#5      DragGestureRecognizer._checkStart.<anonymous closure> (package:flutter/src/gestures/monodrag.dart:531:53)
#6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275:24)
#7      DragGestureRecognizer._checkStart (package:flutter/src/gestures/monodrag.dart:531:7)
#8      DragGestureRecognizer._checkDrag (package:flutter/src/gestures/monodrag.dart:498:5)
#9      DragGestureRecognizer.acceptGesture (package:flutter/src/gestures/monodrag.dart:431:7)
#10     _CombiningGestureArenaMember.acceptGesture (package:flutter/src/gestures/team.dart:45:14)
#11     GestureArenaManager._resolveInFavorOf (package:flutter/src/gestures/arena.dart:281:12)
#12     GestureArenaManager._resolve (package:flutter/src/gestures/arena.dart:239:9)
#13     GestureArenaEntry.resolve (package:flutter/src/gestures/arena.dart:53:12)
#14     _CombiningGestureArenaMember._resolve (package:flutter/src/gestures/team.dart:85:15)
#15     _CombiningGestureArenaEntry.resolve (package:flutter/src/gestures/team.dart:19:15)
#16     OneSequenceGestureRecognizer.resolve (package:flutter/src/gestures/recognizer.dart:375:13)
#17     DragGestureRecognizer.handleEvent (package:flutter/src/gestures/monodrag.dart:414:13)
#18     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
#19     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
#20     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
#21     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
#22     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
#23     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:488:19)
#24     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:468:22)
#25     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:439:11)
#26     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:413:7)
#27     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376:5)
#28     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323:7)
#29     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292:9)
#30     _invoke1 (dart:ui/hooks.dart:186:13)
#31     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:433:7)
#32     _dispatchPointerDataPacket (dart:ui/hooks.dart:119:31)

Handler: "onStart"
Recognizer:
  HorizontalDragGestureRecognizer#a5df2
```

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

Internal bug: b/273666179, b/192329942

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.