mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Include WebViewId
into EmbedderMsg variants where possible (#35211)
`EmbedderMsg` was previously paired with an implicit `Option<WebViewId>`, even though almost all variants were either always `Some` or always `None`, depending on whether there was a `WebView involved. This patch adds the `WebViewId` to as many `EmbedderMsg` variants as possible, so we can call their associated `WebView` delegate methods without needing to check and unwrap the `Option`. In many cases, this required more changes to plumb through the `WebViewId`. Notably, all `Request`s now explicitly need a `WebView` or not, in order to ensure that it is passed when appropriate. Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
9eeb602f7a
commit
5e9de2cb61
70 changed files with 809 additions and 753 deletions
|
@ -23,7 +23,7 @@ use background_hang_monitor_api::BackgroundHangMonitorRegister;
|
|||
use base::cross_process_instant::CrossProcessInstant;
|
||||
use base::id::{
|
||||
BlobId, BrowsingContextId, HistoryStateId, MessagePortId, PipelineId, PipelineNamespaceId,
|
||||
TopLevelBrowsingContextId,
|
||||
TopLevelBrowsingContextId, WebViewId,
|
||||
};
|
||||
use base::Epoch;
|
||||
use bitflags::bitflags;
|
||||
|
@ -732,7 +732,11 @@ pub enum WebDriverCommandMsg {
|
|||
/// the provided channels to return the top level browsing context id
|
||||
/// associated with the new webview, and a notification when the initial
|
||||
/// load is complete.
|
||||
NewWebView(IpcSender<TopLevelBrowsingContextId>, IpcSender<LoadStatus>),
|
||||
NewWebView(
|
||||
WebViewId,
|
||||
IpcSender<TopLevelBrowsingContextId>,
|
||||
IpcSender<LoadStatus>,
|
||||
),
|
||||
/// Close the webview associated with the provided id.
|
||||
CloseWebView(TopLevelBrowsingContextId),
|
||||
/// Focus the webview associated with the provided id.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue