LibWebView: Persist page metadata in history

Record visits as soon as a page produces useful metadata such as a
title or favicon so pages that never finish loading still become
autocomplete candidates.

Store favicons in the history schema from the start instead of
introducing an upgrade path inside this series, and cover persisted
metadata behavior in TestHistoryStore.
This commit is contained in:
Andreas Kling
2026-04-12 00:33:00 +02:00
committed by Andreas Kling
parent fe2cab9270
commit 87b6703054
Notes: github-actions[bot] 2026-04-16 19:03:22 +00:00
6 changed files with 116 additions and 7 deletions

View File

@@ -18,6 +18,7 @@
#include <LibWebView/Application.h>
#include <LibWebView/BookmarkStore.h>
#include <LibWebView/HelperProcess.h>
#include <LibWebView/HistoryStore.h>
#include <LibWebView/Menu.h>
#include <LibWebView/URL.h>
#include <LibWebView/UserAgent.h>
@@ -111,8 +112,10 @@ void ViewImplementation::set_favicon(Badge<WebContentClient>, Gfx::Bitmap const&
m_favicon_base64_png = favicon_base64_png.release_value();
}
if (m_favicon_base64_png.has_value())
if (m_favicon_base64_png.has_value()) {
Application::bookmark_store().update_favicon(m_url, *m_favicon_base64_png);
Application::history_store().update_favicon(m_url, *m_favicon_base64_png);
}
if (on_favicon_change)
on_favicon_change(favicon);