Skip to content

Bump cocoapods from 1.10.1 to 1.12.1 in /dev/ci/mac #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Apr 24, 2023

Bumps cocoapods from 1.10.1 to 1.12.1.

Release notes

Sourced from cocoapods's releases.

1.12.1

Enhancements
  • None.
Bug Fixes

1.12.0

Enhancements

... (truncated)

Changelog

Sourced from cocoapods's changelog.

1.12.1 (2023-04-18)

Enhancements
  • None.
Bug Fixes

1.12.0 (2023-02-27)

Enhancements

... (truncated)

Commits

Dependabot compatibility score

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.


Dependabot commands and options

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 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)

Bumps [cocoapods](https://github.com/CocoaPods/CocoaPods) from 1.10.1 to 1.12.1.
- [Release notes](https://github.com/CocoaPods/CocoaPods/releases)
- [Changelog](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md)
- [Commits](CocoaPods/CocoaPods@1.10.1...1.12.1)

---
updated-dependencies:
- dependency-name: cocoapods
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Apr 24, 2023

Dependabot tried to add @jmagman, @keyonghan and @yusufm as reviewers to this PR, but received the following error from GitHub:

POST https://api.github.com/repos/fluttergithubbot/flutter/pulls/3/requested_reviewers: 422 - Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the fluttergithubbot/flutter repository. // See: https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request

@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Apr 24, 2023

The following labels could not be found: team, team: infra, waiting for tree to go green.

Hixie pushed a commit that referenced this pull request Sep 12, 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)
flutter#4      _RenderSlider._handleDragStart (package:flutter/src/material/slider.dart:1541:5)
flutter#5      DragGestureRecognizer._checkStart.<anonymous closure> (package:flutter/src/gestures/monodrag.dart:531:53)
flutter#6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275:24)
flutter#7      DragGestureRecognizer._checkStart (package:flutter/src/gestures/monodrag.dart:531:7)
flutter#8      DragGestureRecognizer._checkDrag (package:flutter/src/gestures/monodrag.dart:498:5)
flutter#9      DragGestureRecognizer.acceptGesture (package:flutter/src/gestures/monodrag.dart:431:7)
flutter#10     _CombiningGestureArenaMember.acceptGesture (package:flutter/src/gestures/team.dart:45:14)
flutter#11     GestureArenaManager._resolveInFavorOf (package:flutter/src/gestures/arena.dart:281:12)
flutter#12     GestureArenaManager._resolve (package:flutter/src/gestures/arena.dart:239:9)
flutter#13     GestureArenaEntry.resolve (package:flutter/src/gestures/arena.dart:53:12)
flutter#14     _CombiningGestureArenaMember._resolve (package:flutter/src/gestures/team.dart:85:15)
flutter#15     _CombiningGestureArenaEntry.resolve (package:flutter/src/gestures/team.dart:19:15)
flutter#16     OneSequenceGestureRecognizer.resolve (package:flutter/src/gestures/recognizer.dart:375:13)
flutter#17     DragGestureRecognizer.handleEvent (package:flutter/src/gestures/monodrag.dart:414:13)
flutter#18     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
flutter#19     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
flutter#20     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
flutter#21     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
flutter#22     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
flutter#23     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:488:19)
flutter#24     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:468:22)
flutter#25     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:439:11)
flutter#26     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:413:7)
flutter#27     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376:5)
flutter#28     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323:7)
flutter#29     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292:9)
flutter#30     _invoke1 (dart:ui/hooks.dart:186:13)
flutter#31     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:433:7)
flutter#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].*
fluttergithubbot pushed a commit that referenced this pull request Aug 21, 2024
When attempting to release the Flutter 3.24.1 hotfix, Flutter framework post submits failed due to the following error:

```
���ERROR #1���������������������������������������������������������������������
� UNEXPECTED ERROR!
� Exception: Found unexpected binary in cache: /Volumes/Work/s/w/ir/x/w/flutter/bin/cache/artifacts/engine/ios-release/extension_safe/Flutter.xcframework/ios-arm64_x86_64-simulator/dSYMs/Flutter.framework.dSYM/Contents/Resources/DWARF/Flutter
� #0      verifyExist (file:///Volumes/Work/s/w/ir/x/w/flutter/dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart:150:12)
� <asynchronous suspension>
� #1      verifyCodesignedTestRunner (file:///Volumes/Work/s/w/ir/x/w/flutter/dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart:28:3)
� <asynchronous suspension>
� #2      _runFromList (file:///Volumes/Work/s/w/ir/x/w/flutter/dev/bots/utils.dart:601:5)
� <asynchronous suspension>
� #3      main (file:///Volumes/Work/s/w/ir/x/w/flutter/dev/bots/test.dart:125:5)
� <asynchronous suspension>
� 
� The test.dart script should be corrected to catch this error and call foundError().
� Some tests are likely to have been skipped.
��������������������������������������������������������������������������������
```

I've updated the tests to include the listed artifact.  

### Open questions
1. Is it possible that the test failed only on the first binary?
2. Do we expect a need to add the remainder of the [entitlement changes](flutter/engine@c9b9d57)?
3. I am under the assumption that the bots pull from master and are not branch specific, is this a correct assumption?

CC @christopherfujino @cbracken
fluttergithubbot pushed a commit that referenced this pull request Feb 19, 2025
The crash indicates that FlutterJNI is returning a nullptr
SurfaceControl.Transaction. That likely indicates that we're trying to
rasterize a frame before the platform view controller is setup.
Potentially a startup race?

At any rate, if the PVC is null that means there is no platform views -
so it should be safe to create a tx on the fly. Interestingly I cannot
repro this locally even on the same device.

```
[2025-02-11 21:50:37.462356] [STDOUT] stdout: [ +173 ms] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[2025-02-11 21:50:37.462539] [STDOUT] stdout: [        ] Build fingerprint: 'google/cheetah/cheetah:13/TQ3A.230901.001/10750268:user/release-keys'
[2025-02-11 21:50:37.462564] [STDOUT] stdout: [        ] Revision: 'MP1.0'
[2025-02-11 21:50:37.463914] [STDOUT] stdout: [   +1 ms] ABI: 'arm64'
[2025-02-11 21:50:37.463946] [STDOUT] stdout: [        ] Timestamp: 2025-02-11 21:57:42.183302140-0800
[2025-02-11 21:50:37.463959] [STDOUT] stdout: [        ] Process uptime: 3s
[2025-02-11 21:50:37.464054] [STDOUT] stdout: [        ] Cmdline: dev.benchmarks.platform_views_layout
[2025-02-11 21:50:37.464174] [STDOUT] stdout: [        ] pid: 15185, tid: 15246, name: 1.raster  >>> dev.benchmarks.platform_views_layout <<<
[2025-02-11 21:50:37.464354] [STDOUT] stdout: [        ] uid: 10250
[2025-02-11 21:50:37.464398] [STDOUT] stdout: [        ] tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
[2025-02-11 21:50:37.464440] [STDOUT] stdout: [        ] signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000000
[2025-02-11 21:50:37.464602] [STDOUT] stdout: [        ] Cause: null pointer dereference
[2025-02-11 21:50:37.464651] [STDOUT] stdout: [        ]     x0  b400007b82ff2e70  x1  000000000000002d  x2  b400007c3309f370  x3  0000007abbcc6a23
[2025-02-11 21:50:37.464745] [STDOUT] stdout: [        ]     x4  0000007a30d286b0  x5  0000007a4f6dd47b  x6  0000000000000000  x7  61686b4b11ff3a78
[2025-02-11 21:50:37.464831] [STDOUT] stdout: [        ]     x8  0000000000000000  x9  1417c2bd490e1f78  x10 0000000000000010  x11 000000000000009c
[2025-02-11 21:50:37.464933] [STDOUT] stdout: [        ]     x12 0000000000000adb  x13 b400007ba2fe9510  x14 0000000000000e6b  x15 b400007ba2fe9510
[2025-02-11 21:50:37.465012] [STDOUT] stdout: [        ]     x16 0000000000000001  x17 0000000000000067  x18 0000007a2f996000  x19 b400007b82ff2e70
[2025-02-11 21:50:37.465082] [STDOUT] stdout: [        ]     x20 000000000000002d  x21 b400007ae3064b60  x22 b400007af30d0fa8  x23 0000000000000001
[2025-02-11 21:50:37.465155] [STDOUT] stdout: [        ]     x24 0000007a30d2a000  x25 b400007b73028fb0  x26 0000007a3a22da20  x27 000000003b9bf6c8
[2025-02-11 21:50:37.465235] [STDOUT] stdout: [        ]     x28 b400007af30d0fa8  x29 b400007ad3022cd0
[2025-02-11 21:50:37.465318] [STDOUT] stdout: [        ]     lr  0000007a3a8c7918  sp  0000007a30d28940  pc  0000000000000000  pst 0000000040001000
[2025-02-11 21:50:37.465401] [STDOUT] stdout: [        ] backtrace:
[2025-02-11 21:50:37.465491] [STDOUT] stdout: [        ]       #00 pc 0000000000000000  <unknown>
[2025-02-11 21:50:37.465596] [STDOUT] stdout: [        ]       #1 pc 000000000088b914  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (flutter::PlatformViewAndroidJNIImpl::createTransaction()+104) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.465688] [STDOUT] stdout: [        ]       #2 pc 000000000087f738  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (std::_fl::__function::__func<flutter::AndroidSurfaceVKImpeller::SetNativeWindow(fml::RefPtr<flutter::AndroidNativeWindow>, std::_fl::shared_ptr<flutter::PlatformViewAndroidJNI> const&)::$_0, std::_fl::allocator<flutter::AndroidSurfaceVKImpeller::SetNativeWindow(fml::RefPtr<flutter::AndroidNativeWindow>, std::_fl::shared_ptr<flutter::PlatformViewAndroidJNI> const&)::$_0>, impeller::android::SurfaceTransaction ()>::operator()()+16) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.465785] [STDOUT] stdout: [        ]       #3 pc 0000000000bdbf1c  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (std::_fl::__function::__func<impeller::AHBSwapchainImplVK::AcquireNextDrawable()::$_0, std::_fl::allocator<impeller::AHBSwapchainImplVK::AcquireNextDrawable()::$_0>, bool ()>::operator()()+1716) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.465874] [STDOUT] stdout: [        ]       flutter#4 pc 0000000000b1d180  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (flutter::SurfaceFrame::Submit()+148) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.465989] [STDOUT] stdout: [        ]       flutter#5 pc 0000000000beb2b4  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (flutter::Rasterizer::DrawToSurfacesUnsafe(flutter::FrameTimingsRecorder&, std::_fl::vector<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask> >, std::_fl::allocator<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask> > > >)+1284) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466400] [STDOUT] stdout: [        ]       flutter#6 pc 0000000000beac58  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (flutter::Rasterizer::DrawToSurfaces(flutter::FrameTimingsRecorder&, std::_fl::vector<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask> >, std::_fl::allocator<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask> > > >)+112) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466444] [STDOUT] stdout: [        ]       flutter#7 pc 0000000000bec144  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (std::_fl::__function::__func<flutter::Rasterizer::Draw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem> > const&)::$_0, std::_fl::allocator<flutter::Rasterizer::Draw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem> > const&)::$_0>, void (std::_fl::unique_ptr<flutter::FrameItem, std::_fl::default_delete<flutter::FrameItem> >)>::operator()(std::_fl::unique_ptr<flutter::FrameItem, std::_fl::default_delete<flutter::FrameItem> >&&)+192) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466468] [STDOUT] stdout: [        ]       flutter#8 pc 0000000000bebc48  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (flutter::Rasterizer::Draw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem> > const&)+360) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466521] [STDOUT] stdout: [        ]       flutter#9 pc 0000000000bf9f7c  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (std::_fl::__function::__func<fml::internal::CopyableLambda<flutter::Shell::OnAnimatorDraw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem> >)::$_0>, std::_fl::allocator<fml::internal::CopyableLambda<flutter::Shell::OnAnimatorDraw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem> >)::$_0> >, void ()>::operator()()+84) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466543] [STDOUT] stdout: [        ]       flutter#10 pc 00000000008a09ec  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (fml::MessageLoopImpl::RunExpiredTasksNow()+728) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466667] [STDOUT] stdout: [        ]       flutter#11 pc 00000000008a4600  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (fml::MessageLoopAndroid::MessageLoopAndroid()::$_0::__invoke(int, int, void*)+84) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466746] [STDOUT] stdout: [        ]       flutter#12 pc 0000000000011178  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+808) (BuildId: 0b4a793fa8045c04066d988c68bac8bb)
[2025-02-11 21:50:37.466784] [STDOUT] stdout: [        ]       flutter#13 pc 00000000000185e4  /system/lib64/libandroid.so (ALooper_pollOnce+100) (BuildId: 682dab490c18361d5d6527bcdd86cdfa)
[2025-02-11 21:50:37.466865] [STDOUT] stdout: [        ]       flutter#14 pc 00000000008a470c  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (fml::MessageLoopAndroid::Run()+28) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466903] [STDOUT] stdout: [        ]       flutter#15 pc 00000000008a283c  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (std::_fl::__function::__func<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::_fl::allocator<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()()+116) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.466943] [STDOUT] stdout: [        ]       flutter#16 pc 00000000008a2670  /data/app/~~u9nRjz4bI1GoKFecw6gtbg==/dev.benchmarks.platform_views_layout-RoPBoOldhc38L7sINb2Vgg==/lib/arm64/libflutter.so (fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)::$_0::__invoke(void*)+8) (BuildId: 8fab16f9507483301ef418db2c91ed06689696b1)
[2025-02-11 21:50:37.467002] [STDOUT] stdout: [        ]       flutter#17 pc 00000000000c226c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204) (BuildId: dc4001c2ef2dfc23467040797a96840c)
[2025-02-11 21:50:37.467058] [STDOUT] stdout: [        ]       flutter#18 pc 0000000000054a30  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: dc4001c2ef2dfc23467040797a96840c)
[2025-02-11 21:50:37.525275] [STDOUT] stdout: [  +57 ms] 00:00 �[32m+0�[0m�[31m -1�[0m: scrolling performance test (setUpAll) �[1m�[31m[E]�[0m�[0m
```
fluttergithubbot pushed a commit that referenced this pull request Apr 16, 2025
Currently when using a `CustomScrollView`, screen readers cannot list or
move focus to elements that are outside the current Viewport and cache
extent because we do not create semantic nodes for these elements.

This change introduces `SliverEnsureSemantics` which ensures its sliver
child is included in the semantics tree, whether or not it is currently
visible on the screen or within the cache extent. This way screen
readers are aware the elements are there and can navigate to them /
create accessibility traversal menus with this information.
* Under the hood a new flag has been added to `RenderSliver` called
`ensureSemantics`. `RenderViewportBase` uses this in its
`visitChildrenForSemantics` to ensure a sliver is visited when creating
the semantics tree. Previously a sliver was not visited if it was not
visible or within the cache extent. `RenderViewportBase` also uses this
in `describeSemanticsClip` and `describeApproximatePaintClip` to ensure
a sliver child that wants to "ensure semantics" is not clipped out if it
is not currently visible in the viewport or outside the cache extent.
* `RenderSliverMultiBoxAdaptor.semanticBounds` now leverages its first
child as an anchor for assistive technologies to be able to reach it if
the Sliver is a child of `SliverEnsureSemantics`. If not it will still
be dropped from the semantics tree.
* `RenderProxySliver` now considers child overrides of `semanticBounds`.

On the engine side we move from using a joystick method to scroll with
`SemanticsAction.scrollUp` and `SemanticsAction.scrollDown` to using
`SemanticsAction.scrollToOffset` completely letting the browser drive
the scrolling with its current dom scroll position "scrollTop" or
"scrollLeft". This is possible by calculating the total quantity of
content under the scrollable and sizing the scroll element based on
that.

<details open><summary>Code sample</summary>

```dart
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

/// Flutter code sample for [SliverEnsureSemantics].

void main() => runApp(const SliverEnsureSemanticsExampleApp());

class SliverEnsureSemanticsExampleApp extends StatelessWidget {
  const SliverEnsureSemanticsExampleApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return const MaterialApp(home: SliverEnsureSemanticsExample());
  }
}

class SliverEnsureSemanticsExample extends StatefulWidget {
  const SliverEnsureSemanticsExample({super.key});

  @OverRide
  State<SliverEnsureSemanticsExample> createState() =>
      _SliverEnsureSemanticsExampleState();
}

class _SliverEnsureSemanticsExampleState
    extends State<SliverEnsureSemanticsExample> {
  @OverRide
  Widget build(BuildContext context) {
    final ThemeData theme = Theme.of(context);
    return Scaffold(
      appBar: AppBar(
        backgroundColor: theme.colorScheme.inversePrimary,
        title: const Text('SliverEnsureSemantics Demo'),
      ),
      body: Center(
        child: CustomScrollView(
          semanticChildCount: 106,
          slivers: <Widget>[
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 0,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: <Widget>[
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Steps to reproduce',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          const Text('Issue description'),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Expected Results',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Actual Results',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Code Sample',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Screenshots',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Logs',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                ),
              ),
            ),
            SliverFixedExtentList(
              itemExtent: 44.0,
              delegate: SliverChildBuilderDelegate(
                (BuildContext context, int index) {
                  return Card(
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Text('Item $index'),
                    ),
                  );
                },
                childCount: 50,
                semanticIndexOffset: 1,
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 51,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Semantics(
                        header: true,
                        child: const Text('Footer 1'),
                      ),
                    ),
                  ),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 52,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Semantics(
                        header: true,
                        child: const Text('Footer 2'),
                      ),
                    ),
                  ),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 53,
                  child: Semantics(link: true, child: const Text('Link #1')),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 54,
                  child: OverflowBar(
                    children: <Widget>[
                      TextButton(
                        onPressed: () {},
                        child: const Text('Button 1'),
                      ),
                      TextButton(
                        onPressed: () {},
                        child: const Text('Button 2'),
                      ),
                    ],
                  ),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 55,
                  child: Semantics(link: true, child: const Text('Link #2')),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverSemanticsList(
                sliver: SliverFixedExtentList(
                  itemExtent: 44.0,
                  delegate: SliverChildBuilderDelegate(
                    (BuildContext context, int index) {
                      return Semantics(
                        role: SemanticsRole.listItem,
                        child: Card(
                          child: Padding(
                            padding: const EdgeInsets.all(8.0),
                            child: Text('Second List Item $index'),
                          ),
                        ),
                      );
                    },
                    childCount: 50,
                    semanticIndexOffset: 56,
                  ),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 107,
                  child: Semantics(link: true, child: const Text('Link #3')),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

// A sliver that assigns the role of SemanticsRole.list to its sliver child.
class SliverSemanticsList extends SingleChildRenderObjectWidget {
  const SliverSemanticsList({super.key, required Widget sliver})
    : super(child: sliver);

  @OverRide
  RenderSliverSemanticsList createRenderObject(BuildContext context) =>
      RenderSliverSemanticsList();
}

class RenderSliverSemanticsList extends RenderProxySliver {
  @OverRide
  void describeSemanticsConfiguration(SemanticsConfiguration config) {
    super.describeSemanticsConfiguration(config);
    config.role = SemanticsRole.list;
  }
}
```
</details>

Fixes: flutter#160217

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

---------

Co-authored-by: Renzo Olivares <[email protected]>
fluttergithubbot pushed a commit that referenced this pull request Apr 16, 2025
<!-- start_original_pr_link -->
Reverts: flutter#165589
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: Renzo-Olivares
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: breaking internal tests
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: Renzo-Olivares
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {Piinks}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Currently when using a `CustomScrollView`, screen readers cannot list or
move focus to elements that are outside the current Viewport and cache
extent because we do not create semantic nodes for these elements.

This change introduces `SliverEnsureSemantics` which ensures its sliver
child is included in the semantics tree, whether or not it is currently
visible on the screen or within the cache extent. This way screen
readers are aware the elements are there and can navigate to them /
create accessibility traversal menus with this information.
* Under the hood a new flag has been added to `RenderSliver` called
`ensureSemantics`. `RenderViewportBase` uses this in its
`visitChildrenForSemantics` to ensure a sliver is visited when creating
the semantics tree. Previously a sliver was not visited if it was not
visible or within the cache extent. `RenderViewportBase` also uses this
in `describeSemanticsClip` and `describeApproximatePaintClip` to ensure
a sliver child that wants to "ensure semantics" is not clipped out if it
is not currently visible in the viewport or outside the cache extent.
* `RenderSliverMultiBoxAdaptor.semanticBounds` now leverages its first
child as an anchor for assistive technologies to be able to reach it if
the Sliver is a child of `SliverEnsureSemantics`. If not it will still
be dropped from the semantics tree.
* `RenderProxySliver` now considers child overrides of `semanticBounds`.

On the engine side we move from using a joystick method to scroll with
`SemanticsAction.scrollUp` and `SemanticsAction.scrollDown` to using
`SemanticsAction.scrollToOffset` completely letting the browser drive
the scrolling with its current dom scroll position "scrollTop" or
"scrollLeft". This is possible by calculating the total quantity of
content under the scrollable and sizing the scroll element based on
that.

<details open><summary>Code sample</summary>

```dart
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

/// Flutter code sample for [SliverEnsureSemantics].

void main() => runApp(const SliverEnsureSemanticsExampleApp());

class SliverEnsureSemanticsExampleApp extends StatelessWidget {
  const SliverEnsureSemanticsExampleApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return const MaterialApp(home: SliverEnsureSemanticsExample());
  }
}

class SliverEnsureSemanticsExample extends StatefulWidget {
  const SliverEnsureSemanticsExample({super.key});

  @OverRide
  State<SliverEnsureSemanticsExample> createState() =>
      _SliverEnsureSemanticsExampleState();
}

class _SliverEnsureSemanticsExampleState
    extends State<SliverEnsureSemanticsExample> {
  @OverRide
  Widget build(BuildContext context) {
    final ThemeData theme = Theme.of(context);
    return Scaffold(
      appBar: AppBar(
        backgroundColor: theme.colorScheme.inversePrimary,
        title: const Text('SliverEnsureSemantics Demo'),
      ),
      body: Center(
        child: CustomScrollView(
          semanticChildCount: 106,
          slivers: <Widget>[
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 0,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: <Widget>[
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Steps to reproduce',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          const Text('Issue description'),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Expected Results',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Actual Results',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Code Sample',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Screenshots',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                          Semantics(
                            header: true,
                            headingLevel: 3,
                            child: Text(
                              'Logs',
                              style: theme.textTheme.headlineSmall,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                ),
              ),
            ),
            SliverFixedExtentList(
              itemExtent: 44.0,
              delegate: SliverChildBuilderDelegate(
                (BuildContext context, int index) {
                  return Card(
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Text('Item $index'),
                    ),
                  );
                },
                childCount: 50,
                semanticIndexOffset: 1,
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 51,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Semantics(
                        header: true,
                        child: const Text('Footer 1'),
                      ),
                    ),
                  ),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 52,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Semantics(
                        header: true,
                        child: const Text('Footer 2'),
                      ),
                    ),
                  ),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 53,
                  child: Semantics(link: true, child: const Text('Link #1')),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 54,
                  child: OverflowBar(
                    children: <Widget>[
                      TextButton(
                        onPressed: () {},
                        child: const Text('Button 1'),
                      ),
                      TextButton(
                        onPressed: () {},
                        child: const Text('Button 2'),
                      ),
                    ],
                  ),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 55,
                  child: Semantics(link: true, child: const Text('Link #2')),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverSemanticsList(
                sliver: SliverFixedExtentList(
                  itemExtent: 44.0,
                  delegate: SliverChildBuilderDelegate(
                    (BuildContext context, int index) {
                      return Semantics(
                        role: SemanticsRole.listItem,
                        child: Card(
                          child: Padding(
                            padding: const EdgeInsets.all(8.0),
                            child: Text('Second List Item $index'),
                          ),
                        ),
                      );
                    },
                    childCount: 50,
                    semanticIndexOffset: 56,
                  ),
                ),
              ),
            ),
            SliverEnsureSemantics(
              sliver: SliverToBoxAdapter(
                child: IndexedSemantics(
                  index: 107,
                  child: Semantics(link: true, child: const Text('Link #3')),
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

// A sliver that assigns the role of SemanticsRole.list to its sliver child.
class SliverSemanticsList extends SingleChildRenderObjectWidget {
  const SliverSemanticsList({super.key, required Widget sliver})
    : super(child: sliver);

  @OverRide
  RenderSliverSemanticsList createRenderObject(BuildContext context) =>
      RenderSliverSemanticsList();
}

class RenderSliverSemanticsList extends RenderProxySliver {
  @OverRide
  void describeSemanticsConfiguration(SemanticsConfiguration config) {
    super.describeSemanticsConfiguration(config);
    config.role = SemanticsRole.list;
  }
}
```
</details>

Fixes: flutter#160217

## 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
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.

0 participants