From 7576e9dcd2827e419d0d186a6b85a72f26079296 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Fri, 3 Nov 2023 19:00:42 -0600 Subject: [PATCH] LibWeb: Set the UserNavigationInvolvement for UI initiated navigations --- Userland/Libraries/LibWeb/Page/Page.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Page/Page.cpp b/Userland/Libraries/LibWeb/Page/Page.cpp index 4f3f250163..05b3fdbefd 100644 --- a/Userland/Libraries/LibWeb/Page/Page.cpp +++ b/Userland/Libraries/LibWeb/Page/Page.cpp @@ -57,14 +57,16 @@ void Page::set_focused_browsing_context(Badge, HTML::BrowsingConte void Page::load(const AK::URL& url) { - (void)top_level_traversable()->navigate({ .url = url, .source_document = *top_level_traversable()->active_document() }); + (void)top_level_traversable()->navigate({ .url = url, .source_document = *top_level_traversable()->active_document(), .user_involvement = HTML::UserNavigationInvolvement::BrowserUI }); } void Page::load_html(StringView html) { + (void)top_level_traversable()->navigate({ .url = "about:srcdoc"sv, .source_document = *top_level_traversable()->active_document(), - .document_resource = String::from_utf8(html).release_value_but_fixme_should_propagate_errors() }); + .document_resource = String::from_utf8(html).release_value_but_fixme_should_propagate_errors(), + .user_involvement = HTML::UserNavigationInvolvement::BrowserUI }); } Gfx::Palette Page::palette() const