From 022a49e9ac559f55a8afbd5b03e0b65f338b2e45 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 25 Sep 2022 12:28:40 +0200 Subject: [PATCH] LibWeb: Only notify PageClient about top-level browsing context loads We don't need to notify the web views that some deeply nested iframe has started loading a new URL (and we don't want it showing up in the browser location bar either!) --- Userland/Libraries/LibWeb/Loader/FrameLoader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index ce6cdec8c1..3022a3b350 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -172,8 +172,10 @@ bool FrameLoader::load(LoadRequest& request, Type type) auto& url = request.url(); if (type == Type::Navigation || type == Type::Reload) { - if (auto* page = browsing_context().page()) - page->client().page_did_start_loading(url); + if (auto* page = browsing_context().page()) { + if (&page->top_level_browsing_context() == &m_browsing_context) + page->client().page_did_start_loading(url); + } } // https://fetch.spec.whatwg.org/#concept-fetch