LibWeb: Explicitly set Document's origin

As part of the effort of removing the default constructor of
Origin, since document has the origin set after construction,
port Document's origin over to an Optional<Origin>.

This exposes that we were never setting the origin of the document
during fragment parsing. For now, to maintain previous behaviour,
let's explicitly set it to an opaque origin.
This commit is contained in:
Shannon Booth 2025-06-15 19:04:02 +12:00 committed by Jelle Raaijmakers
commit 5deb8ba2f8
Notes: github-actions[bot] 2025-06-17 18:55:25 +00:00
3 changed files with 7 additions and 2 deletions

View file

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