mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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:
parent
1d6be62454
commit
74897c3851
4 changed files with 21 additions and 63 deletions
|
@ -369,6 +369,10 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
},
|
||||
)
|
||||
.expect("Infallible with a new WebViewManager");
|
||||
let msg = ConstellationMsg::WebViewOpened(top_level_browsing_context_id);
|
||||
if let Err(e) = state.constellation_chan.send(msg) {
|
||||
warn!("Sending event to constellation failed ({:?}).", e);
|
||||
}
|
||||
webviews
|
||||
.show(top_level_browsing_context_id)
|
||||
.expect("Infallible due to add");
|
||||
|
@ -1183,6 +1187,10 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
error!("{webview_id}: Creating webview that already exists");
|
||||
return;
|
||||
}
|
||||
let msg = ConstellationMsg::WebViewOpened(top_level_browsing_context_id);
|
||||
if let Err(e) = self.constellation_chan.send(msg) {
|
||||
warn!("Sending event to constellation failed ({:?}).", e);
|
||||
}
|
||||
}
|
||||
|
||||
self.send_root_pipeline_display_list();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue