Propagate page title and favicon into the active tab

Servo already publishes the live page title in every `LiveFrameReport`
but the renderer was dropping it on the floor — tabs that navigated
away from `ely://new-tab` kept showing "New Tab" forever, and there
was no favicon visible anywhere in the sidebar.

Add `BrowserCore::set_tab_title` and switch `set_tab_favicon_key` to
return `Ok(true)` only when the value actually changed; both methods
mirror the new value into the matching history entry so the History
page stays in lockstep. Derive the canonical `/favicon.ico` URL from
the loaded URL on `UrlText` and store it as the tab's `favicon_key`.

In the surface layer, every Ready frame now emits a
`WebSurfacePageMetadata` change alongside any `WebSurfaceUrlChange`,
and the controller applies title + favicon URL together. Render the
sidebar tab row's favicon via GPUI's HTTP image loader (falling
through to the URL-derived glyph for `ely://` pages, file URLs, and
hosts without a /favicon.ico endpoint).
This commit is contained in:
2026-05-15 16:53:32 -04:00
parent 00a8ff1fef
commit 3d2c3ed1bf
10 changed files with 164 additions and 6 deletions
+4
View File
@@ -91,6 +91,10 @@ impl HistoryEntry {
self.favicon_key = None;
}
pub fn set_title(&mut self, title: impl Into<String>) {
self.title = title.into();
}
#[must_use]
pub fn visited_at(&self) -> SystemTime {
self.visited_at