mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +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:
parent
f9e5b43b7a
commit
9ce8189f21
156 changed files with 471 additions and 471 deletions
|
@ -312,8 +312,8 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Document>> Document::create_and_initialize(
|
|||
auto const& referrer = navigation_params.request->referrer();
|
||||
|
||||
// 3. If referrer is a URL record, then set document's referrer to the serialization of referrer.
|
||||
if (referrer.has<AK::URL>()) {
|
||||
document->m_referrer = MUST(String::from_byte_string(referrer.get<AK::URL>().serialize()));
|
||||
if (referrer.has<URL>()) {
|
||||
document->m_referrer = MUST(String::from_byte_string(referrer.get<URL>().serialize()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,12 +337,12 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Document>> Document::construct_impl(JS::Rea
|
|||
return Document::create(realm);
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<Document> Document::create(JS::Realm& realm, AK::URL const& url)
|
||||
JS::NonnullGCPtr<Document> Document::create(JS::Realm& realm, URL const& url)
|
||||
{
|
||||
return realm.heap().allocate<Document>(realm, realm, url);
|
||||
}
|
||||
|
||||
Document::Document(JS::Realm& realm, const AK::URL& url)
|
||||
Document::Document(JS::Realm& realm, const URL& url)
|
||||
: ParentNode(realm, *this, NodeType::DOCUMENT_NODE)
|
||||
, m_page(Bindings::host_defined_page(realm))
|
||||
, m_style_computer(make<CSS::StyleComputer>(*this))
|
||||
|
@ -938,7 +938,7 @@ JS::GCPtr<HTML::HTMLBaseElement const> Document::first_base_element_with_href_in
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#fallback-base-url
|
||||
AK::URL Document::fallback_base_url() const
|
||||
URL Document::fallback_base_url() const
|
||||
{
|
||||
// 1. If document is an iframe srcdoc document, then:
|
||||
if (HTML::url_matches_about_srcdoc(m_url)) {
|
||||
|
@ -958,7 +958,7 @@ AK::URL Document::fallback_base_url() const
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#document-base-url
|
||||
AK::URL Document::base_url() const
|
||||
URL Document::base_url() const
|
||||
{
|
||||
// 1. If there is no base element that has an href attribute in the Document, then return the Document's fallback base URL.
|
||||
auto base_element = first_base_element_with_href_in_tree_order();
|
||||
|
@ -970,7 +970,7 @@ AK::URL Document::base_url() const
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#parse-a-url
|
||||
AK::URL Document::parse_url(StringView url) const
|
||||
URL Document::parse_url(StringView url) const
|
||||
{
|
||||
// FIXME: Pass in document's character encoding.
|
||||
return base_url().complete_url(url);
|
||||
|
@ -1855,7 +1855,7 @@ Document::IndicatedPart Document::determine_the_indicated_part() const
|
|||
|
||||
// 5. Let fragmentBytes be the result of percent-decoding fragment.
|
||||
// 6. Let decodedFragment be the result of running UTF-8 decode without BOM on fragmentBytes.
|
||||
auto decoded_fragment = AK::URL::percent_decode(*fragment);
|
||||
auto decoded_fragment = URL::percent_decode(*fragment);
|
||||
|
||||
// 7. Set potentialIndicatedElement to the result of finding a potential indicated element given document and decodedFragment.
|
||||
potential_indicated_element = find_a_potential_indicated_element(MUST(FlyString::from_deprecated_fly_string(decoded_fragment)));
|
||||
|
@ -3768,7 +3768,7 @@ void Document::update_for_history_step_application(JS::NonnullGCPtr<HTML::Sessio
|
|||
// The doNotReactivate argument distinguishes between these two cases.
|
||||
if (documents_entry_changed) {
|
||||
// 1. Let oldURL be document's latest entry's URL.
|
||||
auto old_url = m_latest_entry ? m_latest_entry->url : AK::URL {};
|
||||
auto old_url = m_latest_entry ? m_latest_entry->url : URL {};
|
||||
|
||||
// 2. Set document's latest entry to entry.
|
||||
m_latest_entry = entry;
|
||||
|
@ -3831,7 +3831,7 @@ void Document::update_for_history_step_application(JS::NonnullGCPtr<HTML::Sessio
|
|||
}
|
||||
}
|
||||
|
||||
HashMap<AK::URL, JS::GCPtr<HTML::SharedImageRequest>>& Document::shared_image_requests()
|
||||
HashMap<URL, JS::GCPtr<HTML::SharedImageRequest>>& Document::shared_image_requests()
|
||||
{
|
||||
return m_shared_image_requests;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue