Repository: flutter
Issue: [web][html]: Scrolling using scrollbar throws assertion failure
Labels: engine,platform-web,e: web_html,has reproducible steps,P3,team-web,triaged-web,found in release: 3.22,found in release: 3.23

### Steps to reproduce

Having a `SliverList` (or a `Column` inside a `SingleChildSscrollView`) with many chiild Widgets which uses a rounded `Container`. The scrolling down until the error came (on the web, not tested on other platforms).

Rounded container:
```dart
Container(
  clipBehavior: Clip.antiAlias,
  decoration: BoxDecoration(
    borderRadius: BorderRadius.circular(50),
  ),
  child: [...],
)
```

### Expected results

To work fine, without error.

### Actual results

```
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY
╞═════════════════════════════════════════════════════════
The following assertion was thrown during paint():
Assertion failed:
org-dartlang-sdk:///lib/_engine/engine/html/path/path_ref.dar
t:902:12
isValid
is not true

The relevant error-causing widget was:
  Container
  Container:file:///C:/Users/bussl/workspace/FLUTTER/LIBS/bus
  slina-flutter-lightweight-lib/lib/core/extensions/widget.ex
  tension.dart:418:13

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/err
ors.dart 296:3       throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/err
ors.dart 29:3        assertFailed
lib/_engine/engine/html/path/path_ref.dart 902:12
debugValidate
lib/_engine/engine/html/path/path_ref.dart 84:5
shiftedFrom
lib/_engine/engine/html/path/path.dart 37:27
shiftedFrom
lib/_engine/engine/html/path/path.dart 1270:19
shift
packages/flutter/src/rendering/object.dart 618:41
pushClipPath
packages/flutter/src/rendering/proxy_box.dart 1792:24
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/proxy_box.dart 130:12
paint
packages/flutter/src/rendering/proxy_box.dart 2291:11
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/box.dart 3158:14
defaultPaint
packages/flutter/src/rendering/flex.dart 1014:7
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/box.dart 3158:14
defaultPaint
packages/flutter/src/rendering/flex.dart 1014:7
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/proxy_box.dart 130:12
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/box.dart 3158:14
defaultPaint
packages/flutter/src/rendering/flex.dart 1014:7
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/box.dart 3158:14
defaultPaint
packages/flutter/src/rendering/stack.dart 633:5
paintStack
packages/flutter/src/rendering/stack.dart 649:7
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/shifted_box.dart 74:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/widgets/basic.dart 7826:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/shifted_box.dart 74:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/proxy_box.dart 130:12
paint
packages/flutter/src/rendering/object.dart 627:81
<fn>
packages/flutter/src/painting/clip.dart 25:5
[_clipAndPaint]
packages/flutter/src/painting/clip.dart 37:5
clipPathAndPaint
packages/flutter/src/rendering/object.dart 627:7
pushClipPath
packages/flutter/src/rendering/proxy_box.dart 1792:24
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/proxy_box.dart 130:12
paint
packages/flutter/src/rendering/proxy_box.dart 2291:11
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/shifted_box.dart 74:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/widgets/basic.dart 7826:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/shifted_box.dart 74:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/proxy_box.dart 130:12
paint
packages/flutter/src/rendering/object.dart 627:81
<fn>
packages/flutter/src/painting/clip.dart 25:5
[_clipAndPaint]
packages/flutter/src/painting/clip.dart 37:5
clipPathAndPaint
packages/flutter/src/rendering/object.dart 627:7
pushClipPath
packages/flutter/src/rendering/proxy_box.dart 1792:24
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/proxy_box.dart 130:12
paint
packages/flutter/src/rendering/proxy_box.dart 2291:11
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/widgets/layout_builder.dart 356:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/proxy_box.dart 130:12
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/shifted_box.dart 74:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/shifted_box.dart 74:14
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 250:12
paintChild
packages/flutter/src/rendering/proxy_box.dart 130:12
paint
packages/flutter/src/rendering/object.dart 3239:7
[_paintWithContext]
packages/flutter/src/rendering/object.dart 166:10
_repaintCompositedChild
packages/flutter/src/rendering/object.dart 109:5
repaintCompositedChild
packages/flutter/src/rendering/object.dart 1182:31
flushPaint
packages/flutter/src/rendering/object.dart 1192:14
flushPaint
packages/flutter/src/rendering/binding.dart 579:5
drawFrame
packages/flutter/src/widgets/binding.dart 1138:13
drawFrame
packages/flutter/src/rendering/binding.dart 443:5
[_handlePersistentFrameCallback]
packages/flutter/src/scheduler/binding.dart 1392:7
[_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1313:9
handleDrawFrame
packages/flutter/src/scheduler/binding.dart 1171:5
[_handleDrawFrame]
lib/_engine/engine/platform_dispatcher.dart 1404:5
invoke
lib/_engine/engine/platform_dispatcher.dart 307:5
invokeOnDrawFrame
lib/_engine/engine/initialization.dart 187:36
<fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/ope
rations.dart 426:37  _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/ope
rations.dart 431:39  dcall

The following RenderObject was being processed when the
exception was fired: RenderClipPath#29ea7
relayoutBoundary=up24:
  creator: ClipPath ← DecoratedBox ← Container ←
  Container-[<'8'>] ← Column ← Column ← SizedBox ←
    Column ← Stack ← Padding ← Container ← ColoredBox ← ⋯
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=942.2,
  0.0<=h<=Infinity)
  size: Size(420.0, 470.7)
This RenderObject had the following descendants (showing up
to depth 5):
    child: RenderPadding#f8638 relayoutBoundary=up25
    NEEDS-PAINT
      child: _RenderColoredBox#85414 relayoutBoundary=up26
      NEEDS-PAINT
        child: RenderPadding#b6ae3 relayoutBoundary=up27
        NEEDS-PAINT
          child: RenderFlex#c5792 relayoutBoundary=up28
          NEEDS-PAINT
            child 1: RenderPadding#9173c
            relayoutBoundary=up29
            child 2: RenderConstrainedBox#0f9c0
            relayoutBoundary=up29 NEEDS-PAINT
═════════════════════════════════════════════════════════════
═══════════════════════════════════════
```

### Code sample

```dart
return Column(
      mainAxisSize: MainAxisSize.min,
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        // Create post button
        if (debugInfo.postCreate || auth.isRoot)
          ElevatedButton(
            onPressed: () => context.beamToNamed(Routes.postsCreate),
            child: Label(
              lang.createNewPost.firstUpper,
              color: Colors.black,
            ),
          ),

        // Posts
        Expanded(
          child: ScrollConfiguration(
            behavior:
                ScrollConfiguration.of(context).copyWith(scrollbars: false),
            child: CustomScrollView(
              controller: scrollController,
              scrollDirection: Axis.vertical,
              slivers: [
                SliverList.list(
                  addAutomaticKeepAlives: false,
                  // addAutomaticKeepAlives: true,
                  children: posts
                      .map(
                        (post) => PostWidget(
                          post: post,
                          parentHeight: parentConstraints.maxHeight,
                        )
                            .withSizeConstraints(postConstraints)
                            .withMargin(
                              const EdgeInsets.symmetric(vertical: 30),
                            )
                            .centered(key: Key(post.id)),
                      )
                      .toList(),
                ),
              ],
            ).withRawScrollbar(controller: scrollController, active: false),
          ),
        ),

        // Posts loading indicator
        if (!postsDataState.loaded)
          const CircularProgressIndicator().marginBottom(20).centered(),

        // Load more button
        if (postsDataState.loaded &&
            !postsController.reachedLastPost() &&
            isScrollAtBottom.value)
          ElevatedButton(
            onPressed: () => postsController.load(),
            child: Label(
              lang.loadMore.firstUpper,
              color: Colors.black,
            ),
          ),
      ],
    ).sized(width: double.infinity);
```

### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

```
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Versi¢n 10.0.19045.4529], locale es-ES)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.5)
[!] Android Studio (version 2021.1)
    ✗ Unable to determine bundled Java version.
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.90.1)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 1 category.
```