LibWeb/DOM: Return Document's Origin by reference

We don't want to have to copy these unnecessarily.
This commit is contained in:
Sam Atkins 2025-01-05 16:18:33 +00:00 committed by Alexander Kalenik
parent 85b424464a
commit c073127b99
Notes: github-actions[bot] 2025-01-21 17:18:43 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -763,7 +763,7 @@ GC::Ptr<HTML::WindowProxy const> Document::default_view() const
return const_cast<Document*>(this)->default_view();
}
URL::Origin Document::origin() const
URL::Origin const& Document::origin() const
{
return m_origin;
}

View file

@ -151,7 +151,7 @@ public:
String url_string() const { return m_url.to_string(); }
String document_uri() const { return url_string(); }
URL::Origin origin() const;
URL::Origin const& origin() const;
void set_origin(URL::Origin const& origin);
HTML::OpenerPolicy const& opener_policy() const { return m_opener_policy; }