David Iglesias d9ef3e2551 [web] Do not wipe the PlatformViewManager when disposing of a view. (flutter/engine#49991)
When a view gets disposed of, its rasterizer completely clears up the singleton `PlatformViewManager`. Particularly, it removes all registered platform view factories.

This is wrong because the remaining PlatformViews on the page cannot be re-rendered, and the default Platform View factories (used by `pointer_interceptor`, for example), disappear.

This PR attempts to preserve the `dispose` logic of the canvaskit rasterizer, without using the `debugClear` method of the `PlatformViewManager` (which is supposedly test-only).

## Issues

* Fixes https://github.com/flutter/flutter/issues/142094

## Tests

* Added unit-test
* Deployed demo app: https://dit-maps-tests.web.app

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-01-26 20:23:26 +00:00
..