summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Fetch/Request.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/Location.cpp2
-rw-r--r--Userland/Libraries/LibWeb/HTML/WorkerLocation.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Loader/FrameLoader.cpp2
-rw-r--r--Userland/Libraries/LibWeb/Loader/Resource.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp4
-rw-r--r--Userland/Libraries/LibWeb/URL/URL.cpp2
11 files changed, 13 insertions, 13 deletions
diff --git a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp
index 3cb82cf048..0caffb16b0 100644
--- a/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp
+++ b/Userland/Libraries/LibWeb/Fetch/Fetching/Fetching.cpp
@@ -680,7 +680,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> scheme_fetch(JS::Realm& r
// a body.
// NOTE: URLs such as "about:config" are handled during navigation and result in a network error in the context
// of fetching.
- if (request->current_url().path() == "blank"sv) {
+ if (request->current_url().serialize_path() == "blank"sv) {
auto response = Infrastructure::Response::create(vm);
response->set_status_message(MUST(ByteBuffer::copy("OK"sv.bytes())));
auto header = MUST(Infrastructure::Header::from_string_pair("Content-Type"sv, "text/html;charset=utf-8"sv));
diff --git a/Userland/Libraries/LibWeb/Fetch/Request.cpp b/Userland/Libraries/LibWeb/Fetch/Request.cpp
index 3a894739ff..7a53304df3 100644
--- a/Userland/Libraries/LibWeb/Fetch/Request.cpp
+++ b/Userland/Libraries/LibWeb/Fetch/Request.cpp
@@ -310,7 +310,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Request>> Request::construct_impl(JS::Realm
// - parsedReferrer’s origin is not same origin with origin
// then set request’s referrer to "client".
// FIXME: Actually use the given origin once we have https://url.spec.whatwg.org/#concept-url-origin.
- if ((parsed_referrer.scheme() == "about"sv && parsed_referrer.path() == "client"sv) || !HTML::Origin().is_same_origin(origin)) {
+ if ((parsed_referrer.scheme() == "about"sv && parsed_referrer.serialize_path() == "client"sv) || !HTML::Origin().is_same_origin(origin)) {
request->set_referrer(Infrastructure::Request::Referrer::Client);
}
// 4. Otherwise, set request’s referrer to parsedReferrer.
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
index 53b3aa1f4a..fb7f09953a 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
@@ -39,7 +39,7 @@ static bool url_matches_about_blank(AK::URL const& url)
{
// A URL matches about:blank if its scheme is "about", its path contains a single string "blank", its username and password are the empty string, and its host is null.
return url.scheme() == "about"sv
- && url.path() == "blank"sv
+ && url.serialize_path() == "blank"sv
&& url.username().is_empty()
&& url.password().is_empty()
&& url.host().is_null();
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp
index 483515b582..8caf538fe7 100644
--- a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp
+++ b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp
@@ -121,7 +121,7 @@ static bool url_matches_about_blank(AK::URL const& url)
{
// A URL matches about:blank if its scheme is "about", its path contains a single string "blank", its username and password are the empty string, and its host is null.
return url.scheme() == "about"sv
- && url.path() == "blank"sv
+ && url.serialize_path() == "blank"sv
&& url.username().is_empty()
&& url.password().is_empty()
&& url.host().is_null();
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp b/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp
index 3ebdf72248..6da33dd473 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLHyperlinkElementUtils.cpp
@@ -293,7 +293,7 @@ DeprecatedString HTMLHyperlinkElementUtils::pathname() const
// 4. If url's cannot-be-a-base-URL is true, then return url's path[0].
// 5. If url's path is empty, then return the empty string.
// 6. Return "/", followed by the strings in url's path (including empty strings), separated from each other by "/".
- return m_url->path();
+ return m_url->serialize_path();
}
// https://html.spec.whatwg.org/multipage/links.html#dom-hyperlink-pathname
diff --git a/Userland/Libraries/LibWeb/HTML/Location.cpp b/Userland/Libraries/LibWeb/HTML/Location.cpp
index 0c0247ee4a..21223b1c61 100644
--- a/Userland/Libraries/LibWeb/HTML/Location.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Location.cpp
@@ -233,7 +233,7 @@ WebIDL::ExceptionOr<String> Location::pathname() const
return WebIDL::SecurityError::create(realm(), "Location's relevant document is not same origin-domain with the entry settings object's origin"sv);
// 2. Return the result of URL path serializing this Location object's url.
- return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(url().path()));
+ return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(url().serialize_path()));
}
WebIDL::ExceptionOr<void> Location::set_pathname(String const&)
diff --git a/Userland/Libraries/LibWeb/HTML/WorkerLocation.cpp b/Userland/Libraries/LibWeb/HTML/WorkerLocation.cpp
index 2fcca48565..7ac70edf6b 100644
--- a/Userland/Libraries/LibWeb/HTML/WorkerLocation.cpp
+++ b/Userland/Libraries/LibWeb/HTML/WorkerLocation.cpp
@@ -92,7 +92,7 @@ WebIDL::ExceptionOr<String> WorkerLocation::pathname() const
{
auto& vm = realm().vm();
// The pathname getter steps are to return the result of URL path serializing this's WorkerGlobalScope object's url.
- return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_global_scope->url().path()));
+ return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_global_scope->url().serialize_path()));
}
// https://html.spec.whatwg.org/multipage/workers.html#dom-workerlocation-search
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
index ff4b9c7554..e1e8cd3a39 100644
--- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
@@ -144,7 +144,7 @@ static bool build_image_document(DOM::Document& document, ByteBuffer const& data
auto title_element = DOM::create_element(document, HTML::TagNames::title, Namespace::HTML).release_value_but_fixme_should_propagate_errors();
MUST(head_element->append_child(title_element));
- auto basename = LexicalPath::basename(document.url().path());
+ auto basename = LexicalPath::basename(document.url().serialize_path());
auto title_text = document.heap().allocate<DOM::Text>(document.realm(), document, DeprecatedString::formatted("{} [{}x{}]", basename, bitmap->width(), bitmap->height())).release_allocated_value_but_fixme_should_propagate_errors();
MUST(title_element->append_child(*title_text));
diff --git a/Userland/Libraries/LibWeb/Loader/Resource.cpp b/Userland/Libraries/LibWeb/Loader/Resource.cpp
index 7f6cdcaa1c..71ef8cf9a0 100644
--- a/Userland/Libraries/LibWeb/Loader/Resource.cpp
+++ b/Userland/Libraries/LibWeb/Loader/Resource.cpp
@@ -103,7 +103,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<Depre
// FIXME: "The Quite OK Image Format" doesn't have an official mime type yet,
// and servers like nginx will send a generic octet-stream mime type instead.
// Let's use image/x-qoi for now, which is also what our Core::MimeData uses & would guess.
- if (m_mime_type == "application/octet-stream" && url().path().ends_with(".qoi"sv))
+ if (m_mime_type == "application/octet-stream" && url().serialize_path().ends_with(".qoi"sv))
m_mime_type = "image/x-qoi";
} else if (url().scheme() == "data" && !url().data_mime_type().is_empty()) {
dbgln_if(RESOURCE_DEBUG, "This is a data URL with mime-type _{}_", url().data_mime_type());
@@ -113,7 +113,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<Depre
if (content_type_options.value_or("").equals_ignoring_ascii_case("nosniff"sv)) {
m_mime_type = "text/plain";
} else {
- m_mime_type = Core::guess_mime_type_based_on_filename(url().path());
+ m_mime_type = Core::guess_mime_type_based_on_filename(url().serialize_path());
}
}
diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
index fffc0fff11..3c7c8cbdef 100644
--- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp
@@ -237,7 +237,7 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, Has
if (!m_page.has_value())
return;
- FileRequest file_request(url.path(), [this, success_callback = move(success_callback), error_callback = move(error_callback), log_success, log_failure, request](ErrorOr<i32> file_or_error) {
+ FileRequest file_request(url.serialize_path(), [this, success_callback = move(success_callback), error_callback = move(error_callback), log_success, log_failure, request](ErrorOr<i32> file_or_error) {
--m_pending_loads;
if (on_load_counter_change)
on_load_counter_change();
@@ -275,7 +275,7 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, Has
// NOTE: For file:// URLs, we have to guess the MIME type, since there's no HTTP header to tell us what this is.
// We insert a fake Content-Type header here, so that clients can use it to learn the MIME type.
HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> response_headers;
- auto mime_type = Core::guess_mime_type_based_on_filename(request.url().path());
+ auto mime_type = Core::guess_mime_type_based_on_filename(request.url().serialize_path());
response_headers.set("Content-Type"sv, mime_type);
success_callback(data, response_headers, {});
diff --git a/Userland/Libraries/LibWeb/URL/URL.cpp b/Userland/Libraries/LibWeb/URL/URL.cpp
index 42d1ea372b..43f58442e1 100644
--- a/Userland/Libraries/LibWeb/URL/URL.cpp
+++ b/Userland/Libraries/LibWeb/URL/URL.cpp
@@ -323,7 +323,7 @@ WebIDL::ExceptionOr<String> URL::pathname() const
auto& vm = realm().vm();
// The pathname getter steps are to return the result of URL path serializing this’s URL.
- return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_url.path()));
+ return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_url.serialize_path()));
}
// https://url.spec.whatwg.org/#ref-for-dom-url-pathname%E2%91%A0