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:
webbeef 2024-08-27 13:17:33 -07:00 committed by GitHub
parent a0ff57cea1
commit 1b48bd18aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 455 additions and 72 deletions

View file

@ -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()
}