ladybird/Userland/Libraries/LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicyEnforcementResult.h
Shannon Booth e800605ad3 AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of
the system, as LibCore depends on LibURL.

This change has two main benefits:
 * Moving AK back more towards being an agnostic library that can
   be used between the kernel and userspace. URL has never really fit
   that description - and is not used in the kernel.
 * URL _should_ depend on LibUnicode, as it needs punnycode support.
   However, it's not really possible to do this inside of AK as it can't
   depend on any external library. This change brings us a little closer
   to being able to do that, but unfortunately we aren't there quite
   yet, as the code generators depend on LibCore.
2024-03-18 14:06:28 -04:00

36 lines
1 KiB
C++

/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibURL/URL.h>
#include <LibWeb/HTML/CrossOrigin/CrossOriginOpenerPolicy.h>
#include <LibWeb/HTML/Origin.h>
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/origin.html#coop-enforcement-result
struct CrossOriginOpenerPolicyEnforcementResult {
// A boolean needs a browsing context group switch, initially false.
bool needs_a_browsing_context_group_switch { false };
// A boolean would need a browsing context group switch due to report-only, initially false.
bool would_need_a_browsing_context_group_switch_due_to_report_only { false };
// A URL url.
URL::URL url;
// An origin origin.
Origin origin;
// A cross-origin opener policy cross-origin opener policy.
CrossOriginOpenerPolicy cross_origin_opener_policy;
// A boolean current context is navigation source.
bool current_context_is_navigation_source { false };
};
}