From 7061322606321b856cbd95e7972c8c712d8fbce1 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Tue, 14 Mar 2023 13:46:55 +0300 Subject: [PATCH] LibWeb: Create new tab if a new top level BC is requested With current process architecture where every top level browsing context lives in a separate WebContent process we need to request a browser to spawn new WebContent process if new top level BC is requested. --- Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index 3ea3c63635..affa174a7c 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -698,7 +699,8 @@ BrowsingContext::ChosenBrowsingContext BrowsingContext::choose_a_browsing_contex // 3. If noopener is true, then set chosen to the result of creating a new top-level browsing context. if (no_opener) { - chosen = HTML::BrowsingContext::create_a_new_top_level_browsing_context(*m_page); + auto handle = m_page->client().page_did_request_new_tab(); + chosen = RemoteBrowsingContext::create_a_new_remote_browsing_context(handle); } // 4. Otherwise: