diff options
author | Linus Groh <mail@linusgroh.de> | 2020-05-16 18:35:39 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-16 21:47:16 +0200 |
commit | ad3871b64eb3fdc58f59c306db65261776f5be93 (patch) | |
tree | 537d711463a72f73d6415c72d18c4c6b9101eba3 | |
parent | b299c75d4559aa2aa14e42210a64e523a0e9c813 (diff) | |
download | serenity-ad3871b64eb3fdc58f59c306db65261776f5be93.zip |
AK: Fix URL's operator<<() and use it
-rw-r--r-- | AK/URL.h | 6 | ||||
-rw-r--r-- | Libraries/LibWeb/DOM/HTMLScriptElement.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibWeb/HtmlView.cpp | 6 |
3 files changed, 6 insertions, 8 deletions
@@ -89,11 +89,9 @@ private: String m_data_payload; }; -} - -using AK::URL; - inline const LogStream& operator<<(const LogStream& stream, const URL& value) { return stream << value.to_string(); } + +} diff --git a/Libraries/LibWeb/DOM/HTMLScriptElement.cpp b/Libraries/LibWeb/DOM/HTMLScriptElement.cpp index d2030dddd2..137135f8df 100644 --- a/Libraries/LibWeb/DOM/HTMLScriptElement.cpp +++ b/Libraries/LibWeb/DOM/HTMLScriptElement.cpp @@ -78,7 +78,7 @@ void HTMLScriptElement::inserted_into(Node& new_parent) URL src_url = document().complete_url(src); if (src_url.protocol() == "file" && document().url().protocol() != src_url.protocol()) { - dbg() << "HTMLScriptElement: Forbidden to load " << src_url.to_string() << " from " << document().url().to_string(); + dbg() << "HTMLScriptElement: Forbidden to load " << src_url << " from " << document().url(); return; } diff --git a/Libraries/LibWeb/HtmlView.cpp b/Libraries/LibWeb/HtmlView.cpp index f731580315..95a3f1a5f7 100644 --- a/Libraries/LibWeb/HtmlView.cpp +++ b/Libraries/LibWeb/HtmlView.cpp @@ -433,7 +433,7 @@ static RefPtr<Document> create_document_from_mime_type(const ByteBuffer& data, c void HtmlView::load(const URL& url) { - dbg() << "HtmlView::load: " << url.to_string(); + dbg() << "HtmlView::load: " << url; if (!url.is_valid()) { load_error_page(url, "Invalid URL"); @@ -495,11 +495,11 @@ void HtmlView::load(const URL& url) ResourceLoader::the().load( favicon_url, [this, favicon_url](auto data, auto&) { - dbg() << "Favicon downloaded, " << data.size() << " bytes from " << favicon_url.to_string(); + dbg() << "Favicon downloaded, " << data.size() << " bytes from " << favicon_url; auto decoder = Gfx::ImageDecoder::create(data.data(), data.size()); auto bitmap = decoder->bitmap(); if (!bitmap) { - dbg() << "Could not decode favicon " << favicon_url.to_string(); + dbg() << "Could not decode favicon " << favicon_url; return; } dbg() << "Decoded favicon, " << bitmap->size(); |