mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -3238,13 +3238,14 @@ impl ScriptThread {
|
|||
.unwrap();
|
||||
|
||||
// Notify devtools that a new script global exists.
|
||||
if incomplete.top_level_browsing_context_id.0 == incomplete.browsing_context_id {
|
||||
self.notify_devtools(
|
||||
document.Title(),
|
||||
final_url.clone(),
|
||||
(incomplete.browsing_context_id, incomplete.pipeline_id, None),
|
||||
);
|
||||
}
|
||||
let is_top_level_global =
|
||||
incomplete.top_level_browsing_context_id.0 == incomplete.browsing_context_id;
|
||||
self.notify_devtools(
|
||||
document.Title(),
|
||||
final_url.clone(),
|
||||
is_top_level_global,
|
||||
(incomplete.browsing_context_id, incomplete.pipeline_id, None),
|
||||
);
|
||||
|
||||
document.set_https_state(metadata.https_state);
|
||||
document.set_navigation_start(incomplete.navigation_start);
|
||||
|
@ -3272,12 +3273,14 @@ impl ScriptThread {
|
|||
&self,
|
||||
title: DOMString,
|
||||
url: ServoUrl,
|
||||
is_top_level_global: bool,
|
||||
(bc, p, w): (BrowsingContextId, PipelineId, Option<WorkerId>),
|
||||
) {
|
||||
if let Some(ref chan) = self.senders.devtools_server_sender {
|
||||
let page_info = DevtoolsPageInfo {
|
||||
title: String::from(title),
|
||||
url,
|
||||
is_top_level_global,
|
||||
};
|
||||
chan.send(ScriptToDevtoolsControlMsg::NewGlobal(
|
||||
(bc, p, w),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue