-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Stop using flutterViewEmbedder for platform views
#46046
[web] Stop using flutterViewEmbedder for platform views
#46046
Conversation
ditman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data from this call must contain the viewId that is the container of the platform view. I guess some of the "handlePlatformViewCall" will need to be moved to the platform_dispatcher, to know what view is being used (at least).
((We can probably have a generic handler that extracts the viewId from any message, and reuse that, but that's for the future!))
| isNotNull, | ||
| reason: 'The container has a single child, the created view.', | ||
| ); | ||
| final DomElement platformView = platformViewsContainer.lastElementChild!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add lastElementChild for this test, right? can this be:
| final DomElement platformView = platformViewsContainer.lastElementChild!; | |
| final DomElement platformView = platformViewsContainer.children.single!; |
?
| _contentHandler?.call(content); | ||
| _platformViewsContainer.append(content); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much simpler, this is fantastic!
Good point. I'm preparing a framework PR that sends
The way I was thinking of doing it was: |
Agree. Also the bit that extracts the Still LGTM! |
|
when will it be merged? |
flutter/engine@cb37ebc...dee90f1 2023-10-12 skia-flutter-autoroll@skia.org Roll Skia from 8b110fd65de9 to bf557aeaaef8 (1 revision) (flutter/engine#46853) 2023-10-12 uysalere@gmail.com [fuchsia] Add fatal error for Vulkan failure (flutter/engine#46831) 2023-10-12 mdebbar@google.com [web] Stop using `flutterViewEmbedder` for platform views (flutter/engine#46046) 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 jsimmons@google.com,rmistry@google.com,zra@google.com 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://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
As of right now, there is an indirect link between `flutter/platform_views` messages and `flutterViewEmbedder`, expressed by the callback that's being passed to the `PlatformViewMessageHandler`. This PR proposed making this relationship clear between `flutter/platform_views` and `implicitView` (i.e. the singleton `window`). This PR also opens the path for each view to have its own `PlatformViewMessageHandler` instance. Depends on #46044 Part of flutter/flutter#134443
As of right now, there is an indirect link between
flutter/platform_viewsmessages andflutterViewEmbedder, expressed by the callback that's being passed to thePlatformViewMessageHandler.This PR proposed making this relationship clear between
flutter/platform_viewsandimplicitView(i.e. the singletonwindow).This PR also opens the path for each view to have its own
PlatformViewMessageHandlerinstance.Depends on #46044
Part of flutter/flutter#134443