LibWeb+LibURL: Move HTML::Origin to URL::Origin

While Origin is defined in the HTML spec - this leaves us with quite an
awkward relationship as the URL spec makes use of AO's from what is
defined in the HTML spec.

To simplify this factoring, relocate Origin into LibURL.
This commit is contained in:
Shannon Booth 2024-10-05 15:33:34 +13:00 committed by Andreas Kling
commit dc401f49ea
Notes: github-actions[bot] 2024-10-05 08:47:56 +00:00
55 changed files with 143 additions and 157 deletions

View file

@ -6,15 +6,15 @@
#include <AK/IPv4Address.h>
#include <AK/IPv6Address.h>
#include <LibURL/Origin.h>
#include <LibURL/URL.h>
#include <LibWeb/DOMURL/DOMURL.h>
#include <LibWeb/HTML/Origin.h>
#include <LibWeb/SecureContexts/AbstractOperations.h>
namespace Web::SecureContexts {
// https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy
Trustworthiness is_origin_potentially_trustworthy(HTML::Origin const& origin)
Trustworthiness is_origin_potentially_trustworthy(URL::Origin const& origin)
{
// 1. If origin is an opaque origin, return "Not Trustworthy".
if (origin.is_opaque())