mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -53,8 +53,6 @@ pub enum ConstellationMsg {
|
|||
LogEntry(Option<TopLevelBrowsingContextId>, Option<String>, LogEntry),
|
||||
/// Create a new top level browsing context.
|
||||
NewWebView(ServoUrl, TopLevelBrowsingContextId),
|
||||
/// A top level browsing context is created in both constellation and compositor.
|
||||
WebViewOpened(TopLevelBrowsingContextId),
|
||||
/// Close a top level browsing context.
|
||||
CloseWebView(TopLevelBrowsingContextId),
|
||||
/// Panic a top level browsing context.
|
||||
|
@ -103,7 +101,6 @@ impl ConstellationMsg {
|
|||
Reload(..) => "Reload",
|
||||
LogEntry(..) => "LogEntry",
|
||||
NewWebView(..) => "NewWebView",
|
||||
WebViewOpened(..) => "WebViewOpened",
|
||||
CloseWebView(..) => "CloseWebView",
|
||||
FocusWebView(..) => "FocusWebView",
|
||||
BlurWebView => "BlurWebView",
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue