Skip to content
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

Can't show multiple views because of compositor webviews are not in sync #32162

Closed
wusyong opened this issue Apr 27, 2024 · 0 comments · Fixed by #32163
Closed

Can't show multiple views because of compositor webviews are not in sync #32162

wusyong opened this issue Apr 27, 2024 · 0 comments · Fixed by #32163
Labels
C-untriaged New issues that haven't been triaged yet

Comments

@wusyong
Copy link
Contributor

wusyong commented Apr 27, 2024

Describe the bug:
I've been experimenting with multiview features like #31545 recently. For my use case, I want to display two views in the window at the same time. I noticed the other webview usually won't show when I send EmbedderEvent::ShowWebView or EmbedderEvent::FocusWebView during EmbedderMsg::WebViewOpened message. It didn't always happen, but it feels like 80% of chance.

This is because constellation and compositor have their own webview managers. The other webviews aren't immediately added to the compositor's webview manager when NewWebView is received. So, when the compositor is handling ShowWebView, it might not have added the webview yet.

To Reproduce:
Servoshell hasn't supported multiview yet. But the whole workflow is like the following:

  • Embedder sends an EmbedderEvent::NewWebView to create a second view.
  • Constellation receives the event, send EmbedderMsg::WebViewOpened back to embedder, but it doesn't send any event to compositor to add this webview yet.
  • Embedder receives the message and sends EmbedderEvent::FocusWebView, constellation receives the event and sends EmbedderEvent::WebViewFocused, and finally embedder sends EmbedderEvent::ShowWebView in hope to see the webview eventually.
  • Compositor received the event, which was redirected by constellation. But now, compositor's webview manager doesn't have this webview yet. Hence, it can't show the webview.
  • After a few more iterations, constellation finally called update_webview_in_compositor to add this webview because it needs to traverse history or change session.

Platform:
I've tested on Windows and mac. It should apply to all other platforms.

@wusyong wusyong added the C-untriaged New issues that haven't been triaged yet label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-untriaged New issues that haven't been triaged yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant