فهرست منبع

AK: Fix URL's operator<<() and use it

Linus Groh 5 سال پیش
والد
کامیت
ad3871b64e
3فایلهای تغییر یافته به همراه6 افزوده شده و 8 حذف شده
  1. 2 4
      AK/URL.h
  2. 1 1
      Libraries/LibWeb/DOM/HTMLScriptElement.cpp
  3. 3 3
      Libraries/LibWeb/HtmlView.cpp

+ 2 - 4
AK/URL.h

@@ -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();
 }
+
+}

+ 1 - 1
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;
     }
 

+ 3 - 3
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();