mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
Ladybird: Add IPC call for creating a new child tab
This will be used for choosing a navigable that requires opening a new tab or new window. Such as calls to window.open(), or specific WebDriver calls.
This commit is contained in:
parent
7245f6f11c
commit
677bdc2a4f
17 changed files with 144 additions and 19 deletions
|
@ -499,7 +499,7 @@ JS::GCPtr<DOM::Node> BrowsingContext::currently_focused_area()
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name
|
||||
BrowsingContext::ChosenBrowsingContext BrowsingContext::choose_a_browsing_context(StringView name, TokenizedFeature::NoOpener no_opener, ActivateTab activate_tab)
|
||||
BrowsingContext::ChosenBrowsingContext BrowsingContext::choose_a_browsing_context(StringView name, TokenizedFeature::NoOpener no_opener, ActivateTab)
|
||||
{
|
||||
// The rules for choosing a browsing context, given a browsing context name name, a browsing context current, and
|
||||
// a boolean noopener are as follows:
|
||||
|
@ -591,8 +591,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 == TokenizedFeature::NoOpener::Yes) {
|
||||
auto handle = m_page->client().page_did_request_new_tab(activate_tab);
|
||||
chosen = RemoteBrowsingContext::create_a_new_remote_browsing_context(handle);
|
||||
// FIXME: This is completely wrong, but all of this should be removed in favor of choose_a_navigable
|
||||
chosen = this;
|
||||
}
|
||||
|
||||
// 4. Otherwise:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue