1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

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.
This commit is contained in:
Aliaksandr Kalenik 2023-03-14 13:46:55 +03:00 committed by Tim Flynn
parent 8026c63e10
commit 7061322606

View file

@ -17,6 +17,7 @@
#include <LibWeb/HTML/EventLoop/EventLoop.h>
#include <LibWeb/HTML/HTMLAnchorElement.h>
#include <LibWeb/HTML/HTMLInputElement.h>
#include <LibWeb/HTML/RemoteBrowsingContext.h>
#include <LibWeb/HTML/SandboxingFlagSet.h>
#include <LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h>
#include <LibWeb/HTML/Window.h>
@ -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: