mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-20 06:36:16 +00:00
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:
committed by
Andreas Kling
parent
e9dd05b2b5
commit
dc401f49ea
@@ -29,7 +29,7 @@ void WindowEnvironmentSettingsObject::visit_edges(JS::Cell::Visitor& visitor)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#set-up-a-window-environment-settings-object
|
||||
void WindowEnvironmentSettingsObject::setup(Page& page, URL::URL const& creation_url, NonnullOwnPtr<JS::ExecutionContext> execution_context, JS::GCPtr<Environment> reserved_environment, URL::URL top_level_creation_url, Origin top_level_origin)
|
||||
void WindowEnvironmentSettingsObject::setup(Page& page, URL::URL const& creation_url, NonnullOwnPtr<JS::ExecutionContext> execution_context, JS::GCPtr<Environment> reserved_environment, URL::URL top_level_creation_url, URL::Origin top_level_origin)
|
||||
{
|
||||
// 1. Let realm be the value of execution context's Realm component.
|
||||
auto realm = execution_context->realm;
|
||||
@@ -104,7 +104,7 @@ URL::URL WindowEnvironmentSettingsObject::api_base_url()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects:concept-settings-object-origin
|
||||
Origin WindowEnvironmentSettingsObject::origin()
|
||||
URL::Origin WindowEnvironmentSettingsObject::origin()
|
||||
{
|
||||
// Return the origin of window's associated Document.
|
||||
return m_window->associated_document().origin();
|
||||
|
||||
Reference in New Issue
Block a user