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:
Martin Robinson 2025-02-26 17:16:48 +01:00 committed by GitHub
parent de66f72197
commit 9d5171f3c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 46 additions and 89 deletions

View file

@ -197,8 +197,6 @@ pub enum EmbedderMsg {
AllowNavigationRequest(WebViewId, PipelineId, ServoUrl),
/// Whether or not to allow script to open a new tab/browser
AllowOpeningWebView(WebViewId, IpcSender<Option<WebViewId>>),
/// A webview was created.
WebViewOpened(WebViewId),
/// A webview was destroyed.
WebViewClosed(WebViewId),
/// A webview gained focus for keyboard events.
@ -307,7 +305,6 @@ impl Debug for EmbedderMsg {
EmbedderMsg::ShowIME(..) => write!(f, "ShowIME"),
EmbedderMsg::HideIME(..) => write!(f, "HideIME"),
EmbedderMsg::AllowOpeningWebView(..) => write!(f, "AllowOpeningWebView"),
EmbedderMsg::WebViewOpened(..) => write!(f, "WebViewOpened"),
EmbedderMsg::WebViewClosed(..) => write!(f, "WebViewClosed"),
EmbedderMsg::WebViewFocused(..) => write!(f, "WebViewFocused"),
EmbedderMsg::WebViewBlurred => write!(f, "WebViewBlurred"),