mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
libservo: Add WebView
immediately to the Compositor (#35662)
When creating a `WebView`, let the Compositor know synchronously that it exists. This allows the embedder to immediately call methods like `WebView::focus()`. In addition remove messages associated with the `WebViewDelegate::notify_ready_to_show()` method (and the method itself), as now `WebView`s can be shown immediately. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
de66f72197
commit
9d5171f3c5
12 changed files with 46 additions and 89 deletions
|
@ -1370,12 +1370,6 @@ where
|
|||
None,
|
||||
);
|
||||
},
|
||||
// A top level browsing context is created and opened in both constellation and
|
||||
// compositor.
|
||||
FromCompositorMsg::WebViewOpened(top_level_browsing_context_id) => {
|
||||
self.embedder_proxy
|
||||
.send(EmbedderMsg::WebViewOpened(top_level_browsing_context_id));
|
||||
},
|
||||
// Close a top level browsing context.
|
||||
FromCompositorMsg::CloseWebView(top_level_browsing_context_id) => {
|
||||
self.handle_close_top_level_browsing_context(top_level_browsing_context_id);
|
||||
|
|
|
@ -78,7 +78,6 @@ mod from_compositor {
|
|||
Self::Reload(..) => target!("Reload"),
|
||||
Self::LogEntry(..) => target!("LogEntry"),
|
||||
Self::NewWebView(..) => target!("NewWebView"),
|
||||
Self::WebViewOpened(..) => target!("WebViewOpened"),
|
||||
Self::CloseWebView(..) => target!("CloseWebView"),
|
||||
Self::SendError(..) => target!("SendError"),
|
||||
Self::FocusWebView(..) => target!("FocusWebView"),
|
||||
|
@ -207,7 +206,6 @@ mod from_script {
|
|||
Self::ShowContextMenu(..) => target_variant!("ShowContextMenu"),
|
||||
Self::AllowNavigationRequest(..) => target_variant!("AllowNavigationRequest"),
|
||||
Self::AllowOpeningWebView(..) => target_variant!("AllowOpeningWebView"),
|
||||
Self::WebViewOpened(..) => target_variant!("WebViewOpened"),
|
||||
Self::WebViewClosed(..) => target_variant!("WebViewClosed"),
|
||||
Self::WebViewFocused(..) => target_variant!("WebViewFocused"),
|
||||
Self::WebViewBlurred => target_variant!("WebViewBlurred"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue