mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
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:
parent
4d73de3dde
commit
48aacc43b7
7 changed files with 34 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue