mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Basic tab strip for the minibrowser (#33100)
This implements a simple tab system for servoshell: - The egui part uses the built-in SelectableLabels components and display the full tab title on hover. - WebView structs now hold all the state for each WebView. When we need "global" state, we return the focused WebView state, eg. for the load status since it's still global in the UI. - New keyboard shortcut: [Cmd-or-Ctrl]+[W] to close the current tab. - New keyboard shortcut: [Cmd-or-Ctrl]+[T] to create a new tab. - The new tab content is loaded from the 'servo:newtab' url using a couple of custom protocol handlers. Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
a0ff57cea1
commit
1b48bd18aa
14 changed files with 455 additions and 72 deletions
|
@ -184,6 +184,10 @@ impl Response {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn network_internal_error<T: Into<String>>(msg: T) -> Response {
|
||||
Self::network_error(NetworkError::Internal(msg.into()))
|
||||
}
|
||||
|
||||
pub fn url(&self) -> Option<&ServoUrl> {
|
||||
self.url.as_ref()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue