1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 17:54:57 +00:00

Everywhere: Use unqualified AK::URL

Now possible in LibWeb now that there is no longer a Web::URL.
This commit is contained in:
Shannon Booth 2024-02-11 20:15:39 +13:00 committed by Andreas Kling
parent f9e5b43b7a
commit 9ce8189f21
156 changed files with 471 additions and 471 deletions

View file

@ -77,11 +77,11 @@ ByteString module_type_from_module_request(JS::ModuleRequest const& module_reque
}
// https://html.spec.whatwg.org/multipage/webappapis.html#resolve-a-module-specifier
WebIDL::ExceptionOr<AK::URL> resolve_module_specifier(Optional<Script&> referring_script, ByteString const& specifier)
WebIDL::ExceptionOr<URL> resolve_module_specifier(Optional<Script&> referring_script, ByteString const& specifier)
{
// 1. Let settingsObject and baseURL be null.
Optional<EnvironmentSettingsObject&> settings_object;
Optional<AK::URL const&> base_url;
Optional<URL const&> base_url;
// 2. If referringScript is not null, then:
if (referring_script.has_value()) {
@ -153,7 +153,7 @@ WebIDL::ExceptionOr<AK::URL> resolve_module_specifier(Optional<Script&> referrin
}
// https://html.spec.whatwg.org/multipage/webappapis.html#resolving-an-imports-match
WebIDL::ExceptionOr<Optional<AK::URL>> resolve_imports_match(ByteString const& normalized_specifier, Optional<AK::URL> as_url, ModuleSpecifierMap const& specifier_map)
WebIDL::ExceptionOr<Optional<URL>> resolve_imports_match(ByteString const& normalized_specifier, Optional<URL> as_url, ModuleSpecifierMap const& specifier_map)
{
// 1. For each specifierKey → resolutionResult of specifierMap:
for (auto const& [specifier_key, resolution_result] : specifier_map) {
@ -216,11 +216,11 @@ WebIDL::ExceptionOr<Optional<AK::URL>> resolve_imports_match(ByteString const& n
}
// 2. Return null.
return Optional<AK::URL> {};
return Optional<URL> {};
}
// https://html.spec.whatwg.org/multipage/webappapis.html#resolving-a-url-like-module-specifier
Optional<AK::URL> resolve_url_like_module_specifier(ByteString const& specifier, AK::URL const& base_url)
Optional<URL> resolve_url_like_module_specifier(ByteString const& specifier, URL const& base_url)
{
// 1. If specifier starts with "/", "./", or "../", then:
if (specifier.starts_with("/"sv) || specifier.starts_with("./"sv) || specifier.starts_with("../"sv)) {
@ -277,7 +277,7 @@ static void set_up_module_script_request(Fetch::Infrastructure::Request& request
}
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-script
WebIDL::ExceptionOr<void> fetch_classic_script(JS::NonnullGCPtr<HTMLScriptElement> element, AK::URL const& url, EnvironmentSettingsObject& settings_object, ScriptFetchOptions options, CORSSettingAttribute cors_setting, String character_encoding, OnFetchScriptComplete on_complete)
WebIDL::ExceptionOr<void> fetch_classic_script(JS::NonnullGCPtr<HTMLScriptElement> element, URL const& url, EnvironmentSettingsObject& settings_object, ScriptFetchOptions options, CORSSettingAttribute cors_setting, String character_encoding, OnFetchScriptComplete on_complete)
{
auto& realm = element->realm();
auto& vm = realm.vm();
@ -342,7 +342,7 @@ WebIDL::ExceptionOr<void> fetch_classic_script(JS::NonnullGCPtr<HTMLScriptElemen
}
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-classic-worker-script
WebIDL::ExceptionOr<void> fetch_classic_worker_script(AK::URL const& url, EnvironmentSettingsObject& fetch_client, Fetch::Infrastructure::Request::Destination destination, EnvironmentSettingsObject& settings_object, PerformTheFetchHook perform_fetch, OnFetchScriptComplete on_complete)
WebIDL::ExceptionOr<void> fetch_classic_worker_script(URL const& url, EnvironmentSettingsObject& fetch_client, Fetch::Infrastructure::Request::Destination destination, EnvironmentSettingsObject& settings_object, PerformTheFetchHook perform_fetch, OnFetchScriptComplete on_complete)
{
auto& realm = settings_object.realm();
auto& vm = realm.vm();
@ -551,7 +551,7 @@ void fetch_descendants_of_a_module_script(JS::Realm& realm, JavaScriptModuleScri
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script
void fetch_single_module_script(JS::Realm& realm,
AK::URL const& url,
URL const& url,
EnvironmentSettingsObject& fetch_client,
Fetch::Infrastructure::Request::Destination destination,
ScriptFetchOptions const& options,
@ -666,7 +666,7 @@ void fetch_single_module_script(JS::Realm& realm,
}
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-script-tree
void fetch_external_module_script_graph(JS::Realm& realm, AK::URL const& url, EnvironmentSettingsObject& settings_object, ScriptFetchOptions const& options, OnFetchScriptComplete on_complete)
void fetch_external_module_script_graph(JS::Realm& realm, URL const& url, EnvironmentSettingsObject& settings_object, ScriptFetchOptions const& options, OnFetchScriptComplete on_complete)
{
// 1. Disallow further import maps given settingsObject.
settings_object.disallow_further_import_maps();
@ -688,7 +688,7 @@ void fetch_external_module_script_graph(JS::Realm& realm, AK::URL const& url, En
}
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-an-inline-module-script-graph
void fetch_inline_module_script_graph(JS::Realm& realm, ByteString const& filename, ByteString const& source_text, AK::URL const& base_url, EnvironmentSettingsObject& settings_object, OnFetchScriptComplete on_complete)
void fetch_inline_module_script_graph(JS::Realm& realm, ByteString const& filename, ByteString const& source_text, URL const& base_url, EnvironmentSettingsObject& settings_object, OnFetchScriptComplete on_complete)
{
// 1. Disallow further import maps given settingsObject.
settings_object.disallow_further_import_maps();
@ -708,7 +708,7 @@ void fetch_inline_module_script_graph(JS::Realm& realm, ByteString const& filena
// https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-imported-module-script
void fetch_single_imported_module_script(JS::Realm& realm,
AK::URL const& url,
URL const& url,
EnvironmentSettingsObject& fetch_client,
Fetch::Infrastructure::Request::Destination destination,
ScriptFetchOptions const& options,