From a5c62b953f8c8633aeef2489c53eb9a2f2dd4984 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 26 Apr 2024 18:10:05 +0200 Subject: [PATCH] LibWeb: Take care of some FIXMEs in auxiliary browsing context creation --- Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index 2bac4c04ab0..eb5dd25fb0e 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -101,7 +101,8 @@ WebIDL::ExceptionOr BrowsingContext // 4. Set browsingContext and document be the result of creating a new browsing context and document with opener's active document, null, and group. auto [browsing_context, document] = TRY(create_a_new_browsing_context_and_document(page, opener->active_document(), nullptr, *group)); - // FIXME: 5. Set browsingContext's is auxiliary to true. + // 5. Set browsingContext's is auxiliary to true. + browsing_context->m_is_auxiliary = true; // 6. Append browsingContext to group. group->append(browsing_context); @@ -109,9 +110,11 @@ WebIDL::ExceptionOr BrowsingContext // 7. Set browsingContext's opener browsing context to opener. browsing_context->set_opener_browsing_context(opener); - // FIXME: 8. Set browsingContext's virtual browsing context group ID to openerTopLevelBrowsingContext's virtual browsing context group ID. + // 8. Set browsingContext's virtual browsing context group ID to openerTopLevelBrowsingContext's virtual browsing context group ID. + browsing_context->m_virtual_browsing_context_group_id = opener_top_level_browsing_context->m_virtual_browsing_context_group_id; - // FIXME: 9. Set browsingContext's opener origin at creation to opener's active document's origin. + // 9. Set browsingContext's opener origin at creation to opener's active document's origin. + browsing_context->m_opener_origin_at_creation = opener->active_document()->origin(); // 10. Return browsingContext and document. return BrowsingContext::BrowsingContextAndDocument { browsing_context, document };