Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
pewsheen committed Dec 19, 2024
1 parent 7173eb3 commit a1c0c69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
6 changes: 2 additions & 4 deletions resources/components/panel.html

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/webview/webview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ impl Window {

// save prompt in window to keep prompt_sender alive
// so that we can send the result back to the prompt after user clicked the button
// self.prompt = Some(prompt);
self.tab_manager.set_prompt(webview_id, prompt);
} else {
log::error!("Failed to get WebView {webview_id:?} in this window.");
Expand Down Expand Up @@ -239,7 +238,6 @@ impl Window {
PromptSender::PermissionSender(prompt_sender),
);
self.tab_manager.set_prompt(webview_id, prompt);
// self.prompt = Some(prompt);
} else {
log::error!("Failed to get WebView {webview_id:?} in this window.");
}
Expand Down Expand Up @@ -333,7 +331,6 @@ impl Window {
compositor.send_root_pipeline_display_list(self);
}

// TODO: return new active id
let _ = prompt_sender.send(None);
return false;
} else if msg == "NEW_TAB" {
Expand Down Expand Up @@ -524,7 +521,6 @@ impl Window {
return false;
}
let prompt = prompt.unwrap();
// let prompt = self.prompt.as_ref().unwrap();
let prompt_sender = prompt.sender().unwrap();

match prompt_sender {
Expand Down
4 changes: 1 addition & 3 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ impl Window {
window,
surface,
panel: None,
// webview: None,
mouse_position: Default::default(),
modifiers_state: Cell::new(ModifiersState::default()),
resizing: false,
Expand Down Expand Up @@ -214,8 +213,7 @@ impl Window {
},
});

// let url = ServoUrl::parse("verso://resources/components/panel.html").unwrap();
let url = ServoUrl::parse("http://localhost:5173/").unwrap();
let url = ServoUrl::parse("verso://resources/components/panel.html").unwrap();
send_to_constellation(
constellation_sender,
ConstellationMsg::NewWebView(url, panel_id),
Expand Down

0 comments on commit a1c0c69

Please sign in to comment.