From 0e2036d6c28059fd32b0f1ca21c99f2b8c9cd97e Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 26 Apr 2025 07:46:48 -0400 Subject: [PATCH] LibWeb: Temporarily disable site isolation for subframes We don't yet support out-of-process subframes. Explicitly disable even attempting to isolate subframes. Otherwise, navigating a subframe to a non-same-site URL would actually cause the top-level frame to navigate with our current implementation. --- Libraries/LibWeb/HTML/Navigable.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Libraries/LibWeb/HTML/Navigable.cpp b/Libraries/LibWeb/HTML/Navigable.cpp index 902b146993b..d9b46a22984 100644 --- a/Libraries/LibWeb/HTML/Navigable.cpp +++ b/Libraries/LibWeb/HTML/Navigable.cpp @@ -1402,12 +1402,14 @@ WebIDL::ExceptionOr Navigable::navigate(NavigateParams params) auto source_document = params.source_document; auto exceptions_enabled = params.exceptions_enabled; + auto& active_document = *this->active_document(); auto& realm = active_document.realm(); + auto& page_client = active_document.page().client(); // AD-HOC: If we are not able to continue in this process, request a new process from the UI. - if (!active_document.page().client().is_url_suitable_for_same_process_navigation(active_document.url(), params.url)) { - active_document.page().client().request_new_process_for_navigation(params.url); + if (is_top_level_traversable() && !page_client.is_url_suitable_for_same_process_navigation(active_document.url(), params.url)) { + page_client.request_new_process_for_navigation(params.url); return {}; }