Update WebView variants of ConstellationMsg (#32163)

* Add ConstellationMsg::WebViewOpened

* Remove unused variants

* Send the message on first webview as well
This commit is contained in:
Ngo Iok Ui (Wu Yu Wei) 2024-04-29 16:59:52 +09:00 committed by GitHub
parent 1d6be62454
commit 74897c3851
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 63 deletions

View file

@ -57,18 +57,12 @@ 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.
SendError(Option<TopLevelBrowsingContextId>, String),
/// Move and/or resize a webview to the given rect.
MoveResizeWebView(TopLevelBrowsingContextId, DeviceRect),
/// Start painting a webview, and optionally stop painting all others.
ShowWebView(TopLevelBrowsingContextId, bool),
/// Stop painting a webview.
HideWebView(TopLevelBrowsingContextId),
/// Start painting a webview on top of all others, and optionally stop painting all others.
RaiseWebViewToTop(TopLevelBrowsingContextId, bool),
/// Make a webview focused.
FocusWebView(TopLevelBrowsingContextId),
/// Make none of the webviews focused.
@ -121,11 +115,8 @@ impl ConstellationMsg {
Reload(..) => "Reload",
LogEntry(..) => "LogEntry",
NewWebView(..) => "NewWebView",
WebViewOpened(..) => "WebViewOpened",
CloseWebView(..) => "CloseWebView",
MoveResizeWebView(..) => "MoveResizeWebView",
ShowWebView(..) => "ShowWebView",
HideWebView(..) => "HideWebView",
RaiseWebViewToTop(..) => "RaiseWebViewToTop",
FocusWebView(..) => "FocusWebView",
BlurWebView => "BlurWebView",
SendError(..) => "SendError",