Repository: flutter
Issue: [web] ElevatedButton shows artefacts when running in HTML renderer
Labels: engine,platform-windows,platform-web,e: web_html,P3,team-web,triaged-web

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

It's complicated actually. The artifacts will became when complex combination of widgets happens (I did it in my project).
This combination includes `ElevatedButton` (perhaps few) and some else widgets that make a magic.
I created a `bug` project as described and added this complex widgets combinations there. So, **in the attached project artifacts are became**. [elevated_button_bug.zip](https://github.com/flutter/flutter/files/5825421/elevated_button_bug.zip)
So, just open bug project, run it in Chrome window, resize it to 1000x800 +- then move cursor under buttons with `bug` icon.

**Expected results:** <!-- what did you want to see? -->
canvaskit:
![image](https://user-images.githubusercontent.com/36400912/104828886-ee2d4580-587e-11eb-902b-bc6116c15efb.png)

**Actual results:** <!-- what did you see? -->
html:
![image](https://user-images.githubusercontent.com/36400912/104828825-3e57d800-587e-11eb-85f3-028cbcf4c096.png)
![9ldhNbn5gL](https://user-images.githubusercontent.com/36400912/104828871-b1614e80-587e-11eb-849d-914d4cc563b5.gif)

Look at the black squares.

Also here is a picture from my project (it's just insane, they breed):
![IDB3CyDPvr](https://user-images.githubusercontent.com/36400912/104829131-e02cf400-5881-11eb-92dd-5938da9f03b7.gif)

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
[  +56 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +58 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] b9d06fffb2db263ab7021fc39adde7f2bf988a4a
[        ] executing: [C:\src\flutter/] git tag --points-at b9d06fffb2db263ab7021fc39adde7f2bf988a4a
[  +45 ms] Exit code 0 from: git tag --points-at b9d06fffb2db263ab7021fc39adde7f2bf988a4a
[        ] 1.26.0-8.0.pre
[  +33 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +34 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/dev
[        ] executing: [C:\src\flutter/] git ls-remote --get-url origin
[  +30 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +65 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD
[  +32 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] dev
[  +57 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +51 ms] executing: C:\Users\rodio\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +39 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +60 ms] executing: C:\Users\rodio\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +10 ms] Skipping pub get: version match.
[  +84 ms] Found plugin integration_test at C:\src\flutter\packages\integration_test\
[ +110 ms] Found plugin integration_test at C:\src\flutter\packages\integration_test\
[   +4 ms] Generating C:\Users\rodio\AndroidStudioProjects\elevated_button_bug\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +50 ms] List of devices attached
[  +70 ms] Launching lib\main.dart on Chrome in debug mode...
[  +26 ms] List of devices attached
[  +74 ms] Updating assets
Waiting for connection from debug service on Chrome...
[ +140 ms] Found plugin integration_test at C:\src\flutter\packages\integration_test\
[  +37 ms] Found plugin integration_test at C:\src\flutter\packages\integration_test\
[  +40 ms] <- reset
[   +9 ms] C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\src\flutter\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -Dflutter.inspector.structuredErrors=true --output-dill C:\Users\rodio\AppData\Local\Temp\flutter_tools.c596406a\flutter_tool.b05102ef\app.dill --libraries-spec file:///C:/src/flutter/bin/cache/flutter_web_sdk/libraries.json --packages C:\Users\rodio\AndroidStudioProjects\elevated_button_bug\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root C:\Users\rodio\AppData\Local\Temp\flutter_tools.c596406a\flutter_tools.d3b3b110 --filesystem-scheme org-dartlang-app --initialize-from-dill build\96bbd943d26f1ae2e00dac18ba4dd43c.cache.dill.track.dill --platform file:///C:/src/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk.dill --no-sound-null-safety
[   +8 ms] <- compile org-dartlang-app:/web_entrypoint.dart
[+14164 ms] Synced 28.7MB.
[        ] <- accept
[        ] Caching compiled dill
[+20805 ms] Using 
[ +215 ms] [CHROME]:
[   +1 ms] [CHROME]:DevTools listening on ws://127.0.0.1:54144/devtools/browser/039287f3-ad7f-4b79-b9ee-2d45f3076744
[+1207 ms] DwdsInjector: Received request for entrypoint at http://localhost:54091/main_module.bootstrap.js
[   +3 ms] MetadataProvider: Loading debug metadata...
[   +6 ms] MetadataProvider: Loaded debug metadata
[   +4 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:54091/main_module.bootstrap.js
[+4286 ms] DevHandler: Debug service listening on ws://127.0.0.1:54171/bFw_a3L9YTk=/ws

[   +5 ms] Debug service listening on ws://127.0.0.1:54171/bFw_a3L9YTk=/ws
[        ] Running with unsound null safety
[        ] For more information see https://dart.dev/null-safety/unsound-null-safety
Debug service listening on ws://127.0.0.1:54171/bFw_a3L9YTk=/ws
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
info - 'title' is deprecated and shouldn't be used. Use "label" instead, as it allows for an improved text-scaling experience. This feature was deprecated after v1.19.0. - lib\nav_rail.dart:161:18 - deprecated_member_use
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel dev, 1.26.0-8.0.pre, on Microsoft Windows [Version 10.0.19041.746], locale en-US)
    • Flutter version 1.26.0-8.0.pre at C:\src\flutter
    • Framework revision b9d06fffb2 (9 days ago), 2021-01-07 18:36:48 -0800
    • Engine revision 42a8d4c681
    • Dart version 2.12.0 (build 2.12.0-179.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
    • Android SDK at C:\Users\rodio\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.1
    • Java binary at: C:\Program Files\Amazon Corretto\jdk11.0.8_10\bin\java
    • Java version OpenJDK Runtime Environment Corretto-11.0.8.10.1 (build 11.0.8+10-LTS)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] VS Code (version 1.51.1)
    • VS Code at C:\Users\rodio\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.16.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.141
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 87.0.664.75

! Doctor found issues in 2 categories.
```

</details>
This issue is relevant for master channel too.