mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
devtools: Use webview_id
as browser_id
(#35956)
* use `webview_id` as `browser_id` Signed-off-by: atbrakhi <atbrakhi@igalia.com> * use correct webview id Signed-off-by: atbrakhi <atbrakhi@igalia.com> * fmt Signed-off-by: atbrakhi <atbrakhi@igalia.com> * review fix Signed-off-by: atbrakhi <atbrakhi@igalia.com> --------- Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
4acaa08cf5
commit
2362e4c134
7 changed files with 43 additions and 17 deletions
|
@ -25,6 +25,8 @@ use crate::protocol::JsonPacketStream;
|
|||
#[serde(rename_all = "camelCase")]
|
||||
pub struct TabDescriptorActorMsg {
|
||||
actor: String,
|
||||
/// This correspond to webview_id
|
||||
#[serde(rename = "browserId")]
|
||||
browser_id: u32,
|
||||
#[serde(rename = "browsingContextID")]
|
||||
browsing_context_id: u32,
|
||||
|
@ -38,7 +40,7 @@ pub struct TabDescriptorActorMsg {
|
|||
}
|
||||
|
||||
impl TabDescriptorActorMsg {
|
||||
pub fn id(&self) -> u32 {
|
||||
pub fn browser_id(&self) -> u32 {
|
||||
self.browser_id
|
||||
}
|
||||
}
|
||||
|
@ -140,16 +142,16 @@ impl TabDescriptorActor {
|
|||
|
||||
pub fn encodable(&self, registry: &ActorRegistry, selected: bool) -> TabDescriptorActorMsg {
|
||||
let ctx_actor = registry.find::<BrowsingContextActor>(&self.browsing_context_actor);
|
||||
let browser_id = ctx_actor.browsing_context_id.index.0.get();
|
||||
let outer_window_id = ctx_actor.active_pipeline.get().index.0.get();
|
||||
let browser_id = ctx_actor.browser_id.0.index.0.get();
|
||||
let browsing_context_id = ctx_actor.browsing_context_id.index.0.get();
|
||||
let outer_window_id = ctx_actor.active_pipeline.get().index.0.get();
|
||||
let title = ctx_actor.title.borrow().clone();
|
||||
let url = ctx_actor.url.borrow().clone();
|
||||
|
||||
TabDescriptorActorMsg {
|
||||
actor: self.name(),
|
||||
browsing_context_id,
|
||||
browser_id,
|
||||
browsing_context_id,
|
||||
is_zombie_tab: false,
|
||||
outer_window_id,
|
||||
selected,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue