From 1d90a290d2f376d4a15a53582c0a7d34abcfb009 Mon Sep 17 00:00:00 2001 From: Julius Elshoff Date: Sat, 14 Sep 2024 16:31:21 +0200 Subject: [PATCH] LibWeb: Rename 'cross-origin opener policy' to 'opener policy' --- Userland/Libraries/LibWeb/DOM/Document.cpp | 12 ++-- Userland/Libraries/LibWeb/DOM/Document.h | 8 +-- .../Libraries/LibWeb/DOM/DocumentLoading.h | 16 ++--- Userland/Libraries/LibWeb/Forward.h | 4 +- .../Libraries/LibWeb/HTML/BrowsingContext.cpp | 6 +- ...ossOriginOpenerPolicy.h => OpenerPolicy.h} | 12 ++-- ...sult.h => OpenerPolicyEnforcementResult.h} | 8 +-- .../LibWeb/HTML/CrossOrigin/Reporting.cpp | 2 +- Userland/Libraries/LibWeb/HTML/Navigable.cpp | 68 +++++++++---------- .../Libraries/LibWeb/HTML/NavigationParams.h | 12 ++-- .../LibWeb/SVG/SVGDecodedImageData.cpp | 2 +- 11 files changed, 75 insertions(+), 75 deletions(-) rename Userland/Libraries/LibWeb/HTML/CrossOrigin/{CrossOriginOpenerPolicy.h => OpenerPolicy.h} (60%) rename Userland/Libraries/LibWeb/HTML/CrossOrigin/{CrossOriginOpenerPolicyEnforcementResult.h => OpenerPolicyEnforcementResult.h} (77%) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 23546bcafee0..70e70f37fd51 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -141,8 +141,8 @@ JS_DEFINE_ALLOCATOR(Document); static JS::NonnullGCPtr obtain_a_browsing_context_to_use_for_a_navigation_response( HTML::BrowsingContext& browsing_context, HTML::SandboxingFlagSet sandbox_flags, - HTML::CrossOriginOpenerPolicy navigation_coop, - HTML::CrossOriginOpenerPolicyEnforcementResult coop_enforcement_result) + HTML::OpenerPolicy navigation_coop, + HTML::OpenerPolicyEnforcementResult coop_enforcement_result) { // 1. If browsingContext is not a top-level browsing context, return browsingContext. if (!browsing_context.is_top_level()) @@ -167,7 +167,7 @@ static JS::NonnullGCPtr obtain_a_browsing_context_to_use_ // 5. If sandboxFlags is not empty, then: if (!is_empty(sandbox_flags)) { // 1. Assert navigationCOOP's value is "unsafe-none". - VERIFY(navigation_coop.value == HTML::CrossOriginOpenerPolicyValue::UnsafeNone); + VERIFY(navigation_coop.value == HTML::OpenerPolicyValue::UnsafeNone); // 2. Assert: newBrowsingContext's popup sandboxing flag set is empty. @@ -185,11 +185,11 @@ WebIDL::ExceptionOr> Document::create_and_initialize( auto browsing_context = navigation_params.navigable->active_browsing_context(); // 2. Set browsingContext to the result of the obtaining a browsing context to use for a navigation response given browsingContext, navigationParams's final sandboxing flag set, - // navigationParams's cross-origin opener policy, and navigationParams's COOP enforcement result. + // navigationParams's opener policy, and navigationParams's COOP enforcement result. browsing_context = obtain_a_browsing_context_to_use_for_a_navigation_response( *browsing_context, navigation_params.final_sandboxing_flag_set, - navigation_params.cross_origin_opener_policy, + navigation_params.opener_policy, navigation_params.coop_enforcement_result); // FIXME: 3. Let permissionsPolicy be the result of creating a permissions policy from a response @@ -287,7 +287,7 @@ WebIDL::ExceptionOr> Document::create_and_initialize( // policy container: navigationParams's policy container // FIXME: permissions policy: permissionsPolicy // active sandboxing flag set: navigationParams's final sandboxing flag set - // FIXME: cross-origin opener policy: navigationParams's cross-origin opener policy + // FIXME: opener policy: navigationParams's opener policy // FIXME: load timing info: loadTimingInfo // FIXME: was created via cross-origin redirects: navigationParams's response's has cross-origin redirects // during-loading navigation ID for WebDriver BiDi: navigationParams's id diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index 9d1f1c72cad8..637fd9ddfae2 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -150,8 +150,8 @@ class Document HTML::Origin origin() const; void set_origin(HTML::Origin const& origin); - HTML::CrossOriginOpenerPolicy const& cross_origin_opener_policy() const { return m_cross_origin_opener_policy; } - void set_cross_origin_opener_policy(HTML::CrossOriginOpenerPolicy policy) { m_cross_origin_opener_policy = move(policy); } + HTML::OpenerPolicy const& opener_policy() const { return m_opener_policy; } + void set_opener_policy(HTML::OpenerPolicy policy) { m_opener_policy = move(policy); } URL::URL parse_url(StringView) const; @@ -862,7 +862,7 @@ class Document Optional m_about_base_url; // https://html.spec.whatwg.org/multipage/dom.html#concept-document-coop - HTML::CrossOriginOpenerPolicy m_cross_origin_opener_policy; + HTML::OpenerPolicy m_opener_policy; // https://html.spec.whatwg.org/multipage/dom.html#the-document's-referrer String m_referrer; diff --git a/Userland/Libraries/LibWeb/DOM/DocumentLoading.h b/Userland/Libraries/LibWeb/DOM/DocumentLoading.h index eccfbc196305..51e36eef770e 100644 --- a/Userland/Libraries/LibWeb/DOM/DocumentLoading.h +++ b/Userland/Libraries/LibWeb/DOM/DocumentLoading.h @@ -25,17 +25,17 @@ JS::NonnullGCPtr create_document_for_inline_content(JS::GCPtr create_document_for_inline_content(JS::GCPtr create_document_for_inline_content(JS::GCPtrorigin = move(origin); navigation_params->policy_container = HTML::PolicyContainer {}; navigation_params->final_sandboxing_flag_set = HTML::SandboxingFlagSet {}; - navigation_params->cross_origin_opener_policy = move(coop); + navigation_params->opener_policy = move(coop); navigation_params->about_base_url = {}; // 5. Let document be the result of creating and initializing a Document object given "html", "text/html", and navigationParams. diff --git a/Userland/Libraries/LibWeb/Forward.h b/Userland/Libraries/LibWeb/Forward.h index 8dc8f191f539..ab6af4304f4f 100644 --- a/Userland/Libraries/LibWeb/Forward.h +++ b/Userland/Libraries/LibWeb/Forward.h @@ -522,8 +522,8 @@ enum class AllowMultipleFiles; enum class MediaSeekMode; enum class SandboxingFlagSet; -struct CrossOriginOpenerPolicy; -struct CrossOriginOpenerPolicyEnforcementResult; +struct OpenerPolicy; +struct OpenerPolicyEnforcementResult; struct Environment; struct EnvironmentSettingsObject; struct NavigationParams; diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index a15a62a8c3b3..3d9d5c868127 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -259,10 +259,10 @@ WebIDL::ExceptionOr BrowsingContext // 3. If creator's origin is same origin with creator's relevant settings object's top-level origin, if (creator->origin().is_same_origin(creator->relevant_settings_object().top_level_origin)) { - // then set document's cross-origin opener policy to creator's browsing context's top-level browsing context's active document's cross-origin opener policy. + // then set document's opener policy to creator's browsing context's top-level browsing context's active document's opener policy. VERIFY(creator->browsing_context()); VERIFY(creator->browsing_context()->top_level_browsing_context()->active_document()); - document->set_cross_origin_opener_policy(creator->browsing_context()->top_level_browsing_context()->active_document()->cross_origin_opener_policy()); + document->set_opener_policy(creator->browsing_context()->top_level_browsing_context()->active_document()->opener_policy()); } } diff --git a/Userland/Libraries/LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h b/Userland/Libraries/LibWeb/HTML/CrossOrigin/OpenerPolicy.h similarity index 60% rename from Userland/Libraries/LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h rename to Userland/Libraries/LibWeb/HTML/CrossOrigin/OpenerPolicy.h index 578ef45a687e..19a3330acb1b 100644 --- a/Userland/Libraries/LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h +++ b/Userland/Libraries/LibWeb/HTML/CrossOrigin/OpenerPolicy.h @@ -11,7 +11,7 @@ namespace Web::HTML { // https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy-value -enum class CrossOriginOpenerPolicyValue { +enum class OpenerPolicyValue { UnsafeNone, SameOriginAllowPopups, SameOrigin, @@ -19,15 +19,15 @@ enum class CrossOriginOpenerPolicyValue { }; // https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy -struct CrossOriginOpenerPolicy { - // A value, which is a cross-origin opener policy value, initially "unsafe-none". - CrossOriginOpenerPolicyValue value { CrossOriginOpenerPolicyValue::UnsafeNone }; +struct OpenerPolicy { + // A value, which is a opener policy value, initially "unsafe-none". + OpenerPolicyValue value { OpenerPolicyValue::UnsafeNone }; // A reporting endpoint, which is string or null, initially null. Optional reporting_endpoint; - // A report-only value, which is a cross-origin opener policy value, initially "unsafe-none". - CrossOriginOpenerPolicyValue report_only_value { CrossOriginOpenerPolicyValue::UnsafeNone }; + // A report-only value, which is a opener policy value, initially "unsafe-none". + OpenerPolicyValue report_only_value { OpenerPolicyValue::UnsafeNone }; // A report-only reporting endpoint, which is a string or null, initially null. Optional report_only_reporting_endpoint; diff --git a/Userland/Libraries/LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicyEnforcementResult.h b/Userland/Libraries/LibWeb/HTML/CrossOrigin/OpenerPolicyEnforcementResult.h similarity index 77% rename from Userland/Libraries/LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicyEnforcementResult.h rename to Userland/Libraries/LibWeb/HTML/CrossOrigin/OpenerPolicyEnforcementResult.h index 14178111e777..cd9da36402e6 100644 --- a/Userland/Libraries/LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicyEnforcementResult.h +++ b/Userland/Libraries/LibWeb/HTML/CrossOrigin/OpenerPolicyEnforcementResult.h @@ -7,13 +7,13 @@ #pragma once #include -#include +#include #include namespace Web::HTML { // https://html.spec.whatwg.org/multipage/origin.html#coop-enforcement-result -struct CrossOriginOpenerPolicyEnforcementResult { +struct OpenerPolicyEnforcementResult { // A boolean needs a browsing context group switch, initially false. bool needs_a_browsing_context_group_switch { false }; @@ -26,8 +26,8 @@ struct CrossOriginOpenerPolicyEnforcementResult { // An origin origin. Origin origin; - // A cross-origin opener policy cross-origin opener policy. - CrossOriginOpenerPolicy cross_origin_opener_policy; + // An opener policy. + OpenerPolicy opener_policy; // A boolean current context is navigation source. bool current_context_is_navigation_source { false }; diff --git a/Userland/Libraries/LibWeb/HTML/CrossOrigin/Reporting.cpp b/Userland/Libraries/LibWeb/HTML/CrossOrigin/Reporting.cpp index c3d335aaa576..ec3477254fc8 100644 --- a/Userland/Libraries/LibWeb/HTML/CrossOrigin/Reporting.cpp +++ b/Userland/Libraries/LibWeb/HTML/CrossOrigin/Reporting.cpp @@ -84,7 +84,7 @@ void check_if_access_between_two_browsing_contexts_should_be_reported( if (accessed->is_ancestor_of(*accessor.top_level_browsing_context()->opener_browsing_context())) accessor_accessed_relationship = AccessorAccessedRelationship::AccessorIsOpener; - // 12. Queue violation reports for accesses, given accessorAccessedRelationship, accessorTopDocument's cross-origin opener policy, accessedTopDocument's cross-origin opener policy, accessor's active document's URL, accessed's active document's URL, accessor's top-level browsing context's initial URL, accessed's top-level browsing context's initial URL, accessor's active document's origin, accessed's active document's origin, accessor's top-level browsing context's opener origin at creation, accessed's top-level browsing context's opener origin at creation, accessorTopDocument's referrer, accessedTopDocument's referrer, propertyKey, and environment. + // 12. Queue violation reports for accesses, given accessorAccessedRelationship, accessorTopDocument's opener policy, accessedTopDocument's opener policy, accessor's active document's URL, accessed's active document's URL, accessor's top-level browsing context's initial URL, accessed's top-level browsing context's initial URL, accessor's active document's origin, accessed's active document's origin, accessor's top-level browsing context's opener origin at creation, accessed's top-level browsing context's opener origin at creation, accessorTopDocument's referrer, accessedTopDocument's referrer, propertyKey, and environment. (void)environment; (void)accessor_accessed_relationship; } diff --git a/Userland/Libraries/LibWeb/HTML/Navigable.cpp b/Userland/Libraries/LibWeb/HTML/Navigable.cpp index c6b09fa6a9fc..629a30daf7cb 100644 --- a/Userland/Libraries/LibWeb/HTML/Navigable.cpp +++ b/Userland/Libraries/LibWeb/HTML/Navigable.cpp @@ -400,9 +400,9 @@ Navigable::ChosenNavigable Navigable::choose_a_navigable(StringView name, Tokeni // 2. Let currentDocument be currentNavigable's active document. auto current_document = active_document(); - // 3. If currentDocument's cross-origin opener policy's value is "same-origin" or "same-origin-plus-COEP", + // 3. If currentDocument's opener policy's value is "same-origin" or "same-origin-plus-COEP", // and currentDocument's origin is not same origin with currentDocument's relevant settings object's top-level origin, then: - if ((current_document->cross_origin_opener_policy().value == CrossOriginOpenerPolicyValue::SameOrigin || current_document->cross_origin_opener_policy().value == CrossOriginOpenerPolicyValue::SameOriginPlusCOEP) + if ((current_document->opener_policy().value == OpenerPolicyValue::SameOrigin || current_document->opener_policy().value == OpenerPolicyValue::SameOriginPlusCOEP) && !current_document->origin().is_same_origin(relevant_settings_object(*current_document).top_level_origin)) { // 1. Set noopener to true. @@ -414,7 +414,7 @@ Navigable::ChosenNavigable Navigable::choose_a_navigable(StringView name, Tokeni // 3. Set windowType to "new with no opener". window_type = WindowType::NewWithNoOpener; } - // NOTE: In the presence of a cross-origin opener policy, + // NOTE: In the presence of an opener policy, // nested documents that are cross-origin with their top-level browsing context's active document always set noopener to true. // 4. Let chosen be null. @@ -549,11 +549,11 @@ static PolicyContainer determine_navigation_params_policy_container(URL::URL con } // https://html.spec.whatwg.org/multipage/browsers.html#obtain-coop -static CrossOriginOpenerPolicy obtain_a_cross_origin_opener_policy(JS::NonnullGCPtr, Fetch::Infrastructure::Request::ReservedClientType const& reserved_client) +static OpenerPolicy obtain_a_opener_policy(JS::NonnullGCPtr, Fetch::Infrastructure::Request::ReservedClientType const& reserved_client) { - // 1. Let policy be a new cross-origin opener policy. - CrossOriginOpenerPolicy policy = {}; + // 1. Let policy be a new opener policy. + OpenerPolicy policy = {}; // AD-HOC: We don't yet setup environments in all cases if (!reserved_client) @@ -610,17 +610,17 @@ static WebIDL::ExceptionOr> create_navigation // 3. Let responseOrigin be the result of determining the origin given response's URL, targetSnapshotParams's sandboxing flags, and entry's document state's origin. auto response_origin = determine_the_origin(*response->url(), target_snapshot_params.sandboxing_flags, entry->document_state()->origin()); - // 4. Let coop be a new cross-origin opener policy. - CrossOriginOpenerPolicy coop = {}; + // 4. Let coop be a new opener policy. + OpenerPolicy coop = {}; - // 5. Let coopEnforcementResult be a new cross-origin opener policy enforcement result with + // 5. Let coopEnforcementResult be a new opener policy enforcement result with // url: response's URL // origin: responseOrigin - // cross-origin opener policy: coop - CrossOriginOpenerPolicyEnforcementResult coop_enforcement_result { + // opener policy: coop + OpenerPolicyEnforcementResult coop_enforcement_result { .url = *response->url(), .origin = response_origin, - .cross_origin_opener_policy = coop + .opener_policy = coop }; // 6. Let policyContainer be the result of determining navigation params policy container given response's URL, @@ -648,7 +648,7 @@ static WebIDL::ExceptionOr> create_navigation // origin: responseOrigin // policy container: policyContainer // final sandboxing flag set: targetSnapshotParams's sandboxing flags - // cross-origin opener policy: coop + // opener policy: coop // FIXME: navigation timing type: navTimingType // about base URL: entry's document state's about base URL auto navigation_params = vm.heap().allocate_without_realm(); @@ -659,7 +659,7 @@ static WebIDL::ExceptionOr> create_navigation navigation_params->origin = move(response_origin); navigation_params->policy_container = policy_container; navigation_params->final_sandboxing_flag_set = target_snapshot_params.sandboxing_flags; - navigation_params->cross_origin_opener_policy = move(coop); + navigation_params->opener_policy = move(coop); navigation_params->about_base_url = entry->document_state()->about_base_url(); return navigation_params; @@ -783,16 +783,16 @@ static WebIDL::ExceptionOr create_navigation // 11. Let fetchController be null. JS::GCPtr fetch_controller = nullptr; - // 12. Let coopEnforcementResult be a new cross-origin opener policy enforcement result, with + // 12. Let coopEnforcementResult be a new opener policy enforcement result, with // - url: navigable's active document's URL // - origin: navigable's active document's origin - // - cross-origin opener policy: navigable's active document's cross-origin opener policy + // - opener policy: navigable's active document's opener policy // - current context is navigation source: true if navigable's active document's origin is same origin with // entry's document state's initiator origin otherwise false - CrossOriginOpenerPolicyEnforcementResult coop_enforcement_result = { + OpenerPolicyEnforcementResult coop_enforcement_result = { .url = active_document.url(), .origin = active_document.origin(), - .cross_origin_opener_policy = active_document.cross_origin_opener_policy(), + .opener_policy = active_document.opener_policy(), .current_context_is_navigation_source = entry->document_state()->initiator_origin().has_value() && active_document.origin().is_same_origin(*entry->document_state()->initiator_origin()) }; @@ -802,8 +802,8 @@ static WebIDL::ExceptionOr create_navigation // 14. Let responsePolicyContainer be null. Optional response_policy_container = {}; - // 15. Let responseCOOP be a new cross-origin opener policy. - CrossOriginOpenerPolicy response_coop = {}; + // 15. Let responseCOOP be a new opener policy. + OpenerPolicy response_coop = {}; // 16. Let locationURL be null. ErrorOr> location_url { OptionalNone {} }; @@ -883,15 +883,15 @@ static WebIDL::ExceptionOr create_navigation // 12. If navigable is a top-level traversable, then: if (navigable->is_top_level_traversable()) { - // 1. Set responseCOOP to the result of obtaining a cross-origin opener policy given response and request's reserved client. - response_coop = obtain_a_cross_origin_opener_policy(*response_holder->response(), request->reserved_client()); + // 1. Set responseCOOP to the result of obtaining a opener policy given response and request's reserved client. + response_coop = obtain_a_opener_policy(*response_holder->response(), request->reserved_client()); - // FIXME: 2. Set coopEnforcementResult to the result of enforcing the response's cross-origin opener policy given navigable's active browsing context, + // FIXME: 2. Set coopEnforcementResult to the result of enforcing the response's opener policy given navigable's active browsing context, // response's URL, responseOrigin, responseCOOP, coopEnforcementResult and request's referrer. // FIXME: 3. If finalSandboxFlags is not empty and responseCOOP's value is not "unsafe-none", then set response to an appropriate network error and break. // NOTE: This results in a network error as one cannot simultaneously provide a clean slate to a response - // using cross-origin opener policy and sandbox the result of navigating to that response. + // using opener policy and sandbox the result of navigating to that response. } // 13. FIXME If response is not a network error, navigable is a child navigable, and the result of performing a cross-origin resource policy check @@ -1008,7 +1008,7 @@ static WebIDL::ExceptionOr create_navigation // response: response // fetch controller: fetchController // commit early hints: commitEarlyHints - // cross-origin opener policy: responseCOOP + // opener policy: responseCOOP // reserved environment: request's reserved client // origin: responseOrigin // policy container: resultPolicyContainer @@ -1028,7 +1028,7 @@ static WebIDL::ExceptionOr create_navigation navigation_params->origin = *response_origin; navigation_params->policy_container = result_policy_container; navigation_params->final_sandboxing_flag_set = final_sandbox_flags; - navigation_params->cross_origin_opener_policy = response_coop; + navigation_params->opener_policy = response_coop; navigation_params->about_base_url = entry->document_state()->about_base_url(); return navigation_params; } @@ -1607,17 +1607,17 @@ WebIDL::ExceptionOr> Navigable::evaluate_javascript_url // FIXME: 13. Let finalSandboxFlags be policyContainer's CSP list's CSP-derived sandboxing flags. auto final_sandbox_flags = SandboxingFlagSet {}; - // 14. Let coop be targetNavigable's active document's cross-origin opener policy. - auto const& coop = active_document()->cross_origin_opener_policy(); + // 14. Let coop be targetNavigable's active document's opener policy. + auto const& coop = active_document()->opener_policy(); - // 15. Let coopEnforcementResult be a new cross-origin opener policy enforcement result with + // 15. Let coopEnforcementResult be a new opener policy enforcement result with // url: url // origin: newDocumentOrigin - // cross-origin opener policy: coop - CrossOriginOpenerPolicyEnforcementResult coop_enforcement_result { + // opener policy: coop + OpenerPolicyEnforcementResult coop_enforcement_result { .url = url, .origin = new_document_origin, - .cross_origin_opener_policy = coop, + .opener_policy = coop, }; // 16. Let navigationParams be a new navigation params, with @@ -1632,7 +1632,7 @@ WebIDL::ExceptionOr> Navigable::evaluate_javascript_url // origin: newDocumentOrigin // policy container: policyContainer // final sandboxing flag set: finalSandboxFlags - // cross-origin opener policy: coop + // opener policy: coop // FIXME: navigation timing type: "navigate" // about base URL: targetNavigable's active document's about base URL auto navigation_params = vm.heap().allocate_without_realm(); @@ -1647,7 +1647,7 @@ WebIDL::ExceptionOr> Navigable::evaluate_javascript_url navigation_params->origin = new_document_origin; navigation_params->policy_container = policy_container; navigation_params->final_sandboxing_flag_set = final_sandbox_flags; - navigation_params->cross_origin_opener_policy = coop; + navigation_params->opener_policy = coop; navigation_params->about_base_url = active_document()->about_base_url(); // 17. Return the result of loading an HTML document given navigationParams. diff --git a/Userland/Libraries/LibWeb/HTML/NavigationParams.h b/Userland/Libraries/LibWeb/HTML/NavigationParams.h index ae624378c063..93365ebffa7a 100644 --- a/Userland/Libraries/LibWeb/HTML/NavigationParams.h +++ b/Userland/Libraries/LibWeb/HTML/NavigationParams.h @@ -12,8 +12,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -43,8 +43,8 @@ struct NavigationParams : JS::Cell { // null or an algorithm accepting a Document, once it has been created Function commit_early_hints { nullptr }; - // a cross-origin opener policy enforcement result, used for reporting and potentially for causing a browsing context group switch - CrossOriginOpenerPolicyEnforcementResult coop_enforcement_result; + // a opener policy enforcement result, used for reporting and potentially for causing a browsing context group switch + OpenerPolicyEnforcementResult coop_enforcement_result; // null or an environment reserved for the new Document Fetch::Infrastructure::Request::ReservedClientType reserved_environment; @@ -58,8 +58,8 @@ struct NavigationParams : JS::Cell { // a sandboxing flag set to impose on the new Document SandboxingFlagSet final_sandboxing_flag_set = {}; - // a cross-origin opener policy to use for the new Document - CrossOriginOpenerPolicy cross_origin_opener_policy; + // a opener policy to use for the new Document + OpenerPolicy opener_policy; // FIXME: a NavigationTimingType used for creating the navigation timing entry for the new Document diff --git a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp index bcad30996014..184bb19b54d8 100644 --- a/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp +++ b/Userland/Libraries/LibWeb/SVG/SVGDecodedImageData.cpp @@ -41,7 +41,7 @@ ErrorOr> SVGDecodedImageData::create(JS::R navigation_params->origin = HTML::Origin {}; navigation_params->policy_container = HTML::PolicyContainer {}; navigation_params->final_sandboxing_flag_set = HTML::SandboxingFlagSet {}; - navigation_params->cross_origin_opener_policy = HTML::CrossOriginOpenerPolicy {}; + navigation_params->opener_policy = HTML::OpenerPolicy {}; // FIXME: Use Navigable::navigate() instead of manually replacing the navigable's document. auto document = DOM::Document::create_and_initialize(DOM::Document::Type::HTML, "text/html"_string, navigation_params).release_value_but_fixme_should_propagate_errors();