LibWeb: Make document origin opaque by default

This aligns our behavior with the specification, which says the default
value for a Document's origin is opaque unless otherwise specified
This commit is contained in:
Tim Ledbetter 2025-07-05 06:35:36 +01:00 committed by Shannon Booth
commit d7deb6d58f
Notes: github-actions[bot] 2025-07-06 01:41:03 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -850,7 +850,7 @@ GC::Ptr<HTML::WindowProxy const> Document::default_view() const
URL::Origin const& Document::origin() const
{
return m_origin.value();
return m_origin;
}
void Document::set_origin(URL::Origin const& origin)

View file

@ -1088,7 +1088,7 @@ private:
String m_referrer;
// https://dom.spec.whatwg.org/#concept-document-origin
Optional<URL::Origin> m_origin;
URL::Origin m_origin { URL::Origin::create_opaque() };
GC::Ptr<HTMLCollection> m_applets;
GC::Ptr<HTMLCollection> m_anchors;