mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
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:
committed by
Andreas Kling
parent
fe2cab9270
commit
87b6703054
Notes:
github-actions[bot]
2026-04-16 19:03:22 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/87b6703054c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8933 Reviewed-by: https://github.com/trflynn89
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user