Register iframes with the devtools (#35874)

Previously, the devtools didn't know about
<iframe>s. They either ignored messages coming from
iframes or crashed.

This reverts https://github.com/servo/servo/pull/34032
and then filters out non-tab globals in the "listTabs"
message to the root actor.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-03-09 21:42:39 +01:00 committed by GitHub
parent 4d73de3dde
commit 48aacc43b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 34 additions and 13 deletions

View file

@ -65,6 +65,7 @@ struct GetWatcherReply {
pub struct TabDescriptorActor {
name: String,
browsing_context_actor: String,
is_top_level_global: bool,
}
impl Actor for TabDescriptorActor {
@ -125,6 +126,7 @@ impl TabDescriptorActor {
pub(crate) fn new(
actors: &mut ActorRegistry,
browsing_context_actor: String,
is_top_level_global: bool,
) -> TabDescriptorActor {
let name = actors.new_name("tab-description");
let root = actors.find_mut::<RootActor>("root");
@ -132,6 +134,7 @@ impl TabDescriptorActor {
TabDescriptorActor {
name,
browsing_context_actor,
is_top_level_global,
}
}
@ -157,4 +160,8 @@ impl TabDescriptorActor {
url,
}
}
pub(crate) fn is_top_level_global(&self) -> bool {
self.is_top_level_global
}
}