Title: [87623] trunk/Source
Revision
87623
Author
[email protected]
Date
2011-05-28 12:59:16 -0700 (Sat, 28 May 2011)

Log Message

2011-05-28  Adam Barth  <[email protected]>

        Reviewed by Alexey Proskuryakov.

        Audit all uses of KURL::prettyURL
        https://bugs.webkit.org/show_bug.cgi?id=61201

        Update callers of prettyURL to just call string.

        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::mouseDidMoveOverElement):
        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::updateGlobalHistory):
        (WebCore::FrameLoaderClientQt::cancelledError):
        (WebCore::FrameLoaderClientQt::blockedError):
        (WebCore::FrameLoaderClientQt::objectContentType):
        (WebCore::FrameLoaderClientQt::createPlugin):
2011-05-28  Adam Barth  <[email protected]>

        Reviewed by Alexey Proskuryakov.

        Audit all uses of KURL::prettyURL
        https://bugs.webkit.org/show_bug.cgi?id=61201

        Update callers of prettyURL to just call string.

        * WebCoreSupport/ChromeClientGtk.cpp:
        (WebKit::ChromeClient::mouseDidMoveOverElement):
        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::dispatchDidChangeLocationWithinPage):
        (WebKit::FrameLoaderClient::dispatchDidCommitLoad):
        * webkit/webkitwebview.cpp:
        (webkit_web_view_get_icon_uri):
2011-05-28  Adam Barth  <[email protected]>

        Reviewed by Alexey Proskuryakov.

        Audit all uses of KURL::prettyURL
        https://bugs.webkit.org/show_bug.cgi?id=61201

        Update callers of prettyURL to just call string.

        * WebCoreSupport/ChromeClientEfl.cpp:
        (WebCore::ChromeClientEfl::mouseDidMoveOverElement):
        * WebCoreSupport/FrameLoaderClientEfl.cpp:
        (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
        (WebCore::FrameLoaderClientEfl::assignIdentifierToInitialRequest):
        (WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
        (WebCore::FrameLoaderClientEfl::download):
        (WebCore::FrameLoaderClientEfl::cancelledError):
        (WebCore::FrameLoaderClientEfl::blockedError):
        * ewk/ewk_frame.cpp:
        (ewk_frame_hit_test_new):
        (ewk_frame_uri_changed):
        * ewk/ewk_view.cpp:
        (_ewk_view_priv_new):
        (ewk_view_frame_create):
        (ewk_view_plugin_create):
2011-05-28  Adam Barth  <[email protected]>

        Reviewed by Alexey Proskuryakov.

        Audit all uses of KURL::prettyURL
        https://bugs.webkit.org/show_bug.cgi?id=61201

        As far as I can tell, all the callers of this API are confused.  There
        seems to be a cargo cult of using the "pretty" version of a URL, but in
        reality folks just want the URL itself.  The only case I'm unsure about
        is location.href, which could have some compatibility constraints.
        I've renamed prettyURL to deprecatedString to discourage folks from
        further cargo-culting.

        * WebCore.exp.in:
        * page/Location.cpp:
        (WebCore::Location::href):
        (WebCore::Location::toString):
        * platform/KURL.cpp:
        (WebCore::KURL::deprecatedString):
        * platform/KURL.h:
        * platform/KURLGoogle.cpp:
        (WebCore::KURL::deprecatedString):
        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::ResourceHandle::prepareForURL):
        * workers/WorkerLocation.cpp:
        (WebCore::WorkerLocation::href):
        (WebCore::WorkerLocation::toString):
2011-05-28  Adam Barth  <[email protected]>

        Reviewed by Alexey Proskuryakov.

        Audit all uses of KURL::prettyURL
        https://bugs.webkit.org/show_bug.cgi?id=61201

        Update callers of prettyURL to just call string.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::createPlugin):
        * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
        (WebKit::cancelledError):
        (WebKit::blockedError):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (87622 => 87623)


--- trunk/Source/WebCore/ChangeLog	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebCore/ChangeLog	2011-05-28 19:59:16 UTC (rev 87623)
@@ -1,3 +1,32 @@
+2011-05-28  Adam Barth  <[email protected]>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Audit all uses of KURL::prettyURL
+        https://bugs.webkit.org/show_bug.cgi?id=61201
+
+        As far as I can tell, all the callers of this API are confused.  There
+        seems to be a cargo cult of using the "pretty" version of a URL, but in
+        reality folks just want the URL itself.  The only case I'm unsure about
+        is location.href, which could have some compatibility constraints.
+        I've renamed prettyURL to deprecatedString to discourage folks from
+        further cargo-culting.
+
+        * WebCore.exp.in:
+        * page/Location.cpp:
+        (WebCore::Location::href):
+        (WebCore::Location::toString):
+        * platform/KURL.cpp:
+        (WebCore::KURL::deprecatedString):
+        * platform/KURL.h:
+        * platform/KURLGoogle.cpp:
+        (WebCore::KURL::deprecatedString):
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::ResourceHandle::prepareForURL):
+        * workers/WorkerLocation.cpp:
+        (WebCore::WorkerLocation::href):
+        (WebCore::WorkerLocation::toString):
+
 2011-05-28  Jer Noble  <[email protected]>
 
         Reviewed by Maciej Stachowiak.

Modified: trunk/Source/WebCore/WebCore.exp.in (87622 => 87623)


--- trunk/Source/WebCore/WebCore.exp.in	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebCore/WebCore.exp.in	2011-05-28 19:59:16 UTC (rev 87623)
@@ -1614,7 +1614,6 @@
 __ZN7WebCore17HTMLPlugInElement11getNPObjectEv
 __ZNK7WebCore14SecurityOrigin9canAccessEPKS0_
 __ZNK7WebCore4KURL7hasPathEv
-__ZNK7WebCore4KURL9prettyURLEv
 #endif
 
 #if ENABLE(ORIENTATION_EVENTS)

Modified: trunk/Source/WebCore/page/Location.cpp (87622 => 87623)


--- trunk/Source/WebCore/page/Location.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebCore/page/Location.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -66,7 +66,8 @@
         return String();
 
     const KURL& url = ""
-    return url.hasPath() ? url.prettyURL() : url.prettyURL() + "/";
+    // FIXME: Stop using deprecatedString(): https://bugs.webkit.org/show_bug.cgi?id=30225
+    return url.hasPath() ? url.deprecatedString() : url.deprecatedString() + "/";
 }
 
 String Location::protocol() const
@@ -155,7 +156,8 @@
         return String();
 
     const KURL& url = ""
-    return url.hasPath() ? url.prettyURL() : url.prettyURL() + "/";
+    // FIXME: Stop using deprecatedString(): https://bugs.webkit.org/show_bug.cgi?id=30225
+    return url.hasPath() ? url.deprecatedString() : url.deprecatedString() + "/";
 }
 
 void Location::setHref(const String& urlString, DOMWindow* activeWindow, DOMWindow* firstWindow)

Modified: trunk/Source/WebCore/platform/KURL.cpp (87622 => 87623)


--- trunk/Source/WebCore/platform/KURL.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebCore/platform/KURL.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -876,7 +876,7 @@
     parse(m_string.left(m_portEnd) + encodeWithURLEscapeSequences(path) + m_string.substring(m_pathEnd));
 }
 
-String KURL::prettyURL() const
+String KURL::deprecatedString() const
 {
     if (!m_isValid)
         return m_string;

Modified: trunk/Source/WebCore/platform/KURL.h (87622 => 87623)


--- trunk/Source/WebCore/platform/KURL.h	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebCore/platform/KURL.h	2011-05-28 19:59:16 UTC (rev 87623)
@@ -150,7 +150,9 @@
 
     String baseAsString() const;
 
-    String prettyURL() const;
+    // This function is only used by location.href. It's likely we shouldn't
+    // use it for that purpose, but more study is necessary before we remove it.
+    String deprecatedString() const;
     String fileSystemPath() const;
 
     // Returns true if the current URL's protocol is the same as the null-

Modified: trunk/Source/WebCore/platform/KURLGoogle.cpp (87622 => 87623)


--- trunk/Source/WebCore/platform/KURLGoogle.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebCore/platform/KURLGoogle.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -772,7 +772,7 @@
 // On Mac, this just seems to return the same URL, but with "/foo/bar" for
 // file: URLs instead of file:///foo/bar. We don't bother with any of this,
 // at least for now.
-String KURL::prettyURL() const
+String KURL::deprecatedString() const
 {
     if (!m_url.m_isValid)
         return String();

Modified: trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (87622 => 87623)


--- trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -180,9 +180,9 @@
     g_object_set_data(G_OBJECT(session), "webkit-init", reinterpret_cast<void*>(0xdeadbeef));
 }
 
-void ResourceHandle::prepareForURL(const KURL &url)
+void ResourceHandle::prepareForURL(const KURL& url)
 {
-    GOwnPtr<SoupURI> soupURI(soup_uri_new(url.prettyURL().utf8().data()));
+    GOwnPtr<SoupURI> soupURI(soup_uri_new(url.string().utf8().data()));
     if (!soupURI)
         return;
     soup_session_prepare_for_uri(ResourceHandle::defaultSession(), soupURI.get());

Modified: trunk/Source/WebCore/workers/WorkerLocation.cpp (87622 => 87623)


--- trunk/Source/WebCore/workers/WorkerLocation.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebCore/workers/WorkerLocation.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -36,7 +36,8 @@
 
 String WorkerLocation::href() const
 {
-    return m_url.hasPath() ? m_url.prettyURL() : m_url.prettyURL() + "/";
+    // FIXME: Stop using deprecatedString(): https://bugs.webkit.org/show_bug.cgi?id=30225
+    return m_url.hasPath() ? m_url.deprecatedString() : m_url.deprecatedString() + "/";
 }
 
 String WorkerLocation::protocol() const
@@ -76,7 +77,8 @@
 
 String WorkerLocation::toString() const
 {
-    return m_url.hasPath() ? m_url.prettyURL() : m_url.prettyURL() + "/";
+    // FIXME: Stop using deprecatedString(): https://bugs.webkit.org/show_bug.cgi?id=30225
+    return m_url.hasPath() ? m_url.deprecatedString() : m_url.deprecatedString() + "/";
 }
 
 

Modified: trunk/Source/WebKit/efl/ChangeLog (87622 => 87623)


--- trunk/Source/WebKit/efl/ChangeLog	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/efl/ChangeLog	2011-05-28 19:59:16 UTC (rev 87623)
@@ -1,3 +1,29 @@
+2011-05-28  Adam Barth  <[email protected]>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Audit all uses of KURL::prettyURL
+        https://bugs.webkit.org/show_bug.cgi?id=61201
+
+        Update callers of prettyURL to just call string.
+
+        * WebCoreSupport/ChromeClientEfl.cpp:
+        (WebCore::ChromeClientEfl::mouseDidMoveOverElement):
+        * WebCoreSupport/FrameLoaderClientEfl.cpp:
+        (WebCore::FrameLoaderClientEfl::dispatchWillSendRequest):
+        (WebCore::FrameLoaderClientEfl::assignIdentifierToInitialRequest):
+        (WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
+        (WebCore::FrameLoaderClientEfl::download):
+        (WebCore::FrameLoaderClientEfl::cancelledError):
+        (WebCore::FrameLoaderClientEfl::blockedError):
+        * ewk/ewk_frame.cpp:
+        (ewk_frame_hit_test_new):
+        (ewk_frame_uri_changed):
+        * ewk/ewk_view.cpp:
+        (_ewk_view_priv_new):
+        (ewk_view_frame_create):
+        (ewk_view_plugin_create):
+
 2011-05-16  Jon Lee  <[email protected]>
 
         Reviewed by Simon Fraser.

Modified: trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp (87622 => 87623)


--- trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -360,7 +360,7 @@
         if (!url.isEmpty() && url != m_hoveredLinkURL) {
             const char* link[2];
             TextDirection dir;
-            CString urlStr = url.prettyURL().utf8();
+            CString urlStr = url.string().utf8();
             CString titleStr = hit.title(dir).utf8();
             link[0] = urlStr.data();
             link[1] = titleStr.data();

Modified: trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp (87622 => 87623)


--- trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -209,7 +209,7 @@
 
 void FrameLoaderClientEfl::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& coreRequest, const ResourceResponse& coreResponse)
 {
-    CString url = ""
+    CString url = ""
     DBG("Resource url="" url.data());
 
     Ewk_Frame_Resource_Request request = { 0, identifier };
@@ -236,7 +236,7 @@
 
 void FrameLoaderClientEfl::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest& coreRequest)
 {
-    CString url = ""
+    CString url = ""
     DBG("Resource url="" url.data());
 
     Ewk_Frame_Resource_Request request = { 0, identifier };
@@ -309,7 +309,7 @@
     ASSERT(m_frame);
     // if not acceptNavigationRequest - look at Qt -> PolicyIgnore;
     // FIXME: do proper check and only reset forms when on PolicyIgnore
-    char* url = ""
+    char* url = ""
     Ewk_Frame_Resource_Request request = { url, 0 };
     Eina_Bool ret = ewk_view_navigation_policy_decision(m_view, &request);
     free(url);
@@ -764,7 +764,7 @@
     if (!m_view)
         return;
 
-    CString url = ""
+    CString url = ""
     Ewk_Download download;
 
     download.url = ""
@@ -784,7 +784,7 @@
 
 ResourceError FrameLoaderClientEfl::cancelledError(const ResourceRequest& request)
 {
-    ResourceError error("Error", -999, request.url().prettyURL(),
+    ResourceError error("Error", -999, request.url().string(),
                         "Request cancelled");
     error.setIsCancellation(true);
     return error;
@@ -792,7 +792,7 @@
 
 ResourceError FrameLoaderClientEfl::blockedError(const ResourceRequest& request)
 {
-    return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(),
+    return ResourceError("Error", WebKitErrorCannotUseRestrictedPort, request.url().string(),
                          "Request blocked");
 }
 

Modified: trunk/Source/WebKit/efl/ewk/ewk_frame.cpp (87622 => 87623)


--- trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/efl/ewk/ewk_frame.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -1162,7 +1162,7 @@
         hit_test->frame = kit(result.innerNonSharedNode()->document()->frame());
 
     hit_test->link.text = eina_stringshare_add(result.textContent().utf8().data());
-    hit_test->link.url = ""
+    hit_test->link.url = ""
     hit_test->link.title = eina_stringshare_add(result.titleDisplayString().utf8().data());
     hit_test->link.target_frame = kit(result.targetFrame());
 
@@ -2014,7 +2014,7 @@
 {
     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
-    WTF::CString uri(sd->frame->document()->url().prettyURL().utf8());
+    WTF::CString uri(sd->frame->document()->url().string().utf8());
 
     INF("uri=%s", uri.data());
     if (!uri.data()) {

Modified: trunk/Source/WebKit/efl/ewk/ewk_view.cpp (87622 => 87623)


--- trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/efl/ewk/ewk_view.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -577,7 +577,7 @@
     priv->page_settings->setUsesEncodingDetector(true);
 
     url = ""
-    priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data());
+    priv->settings.user_stylesheet = eina_stringshare_add(url.string().utf8().data());
 
     priv->settings.encoding_default = eina_stringshare_add
         (priv->page_settings->defaultTextEncodingName().utf8().data());
@@ -4037,7 +4037,7 @@
 {
     DBG("o=%p, frame=%p, name=%s, ownerElement=%p, url="" referrer=%s",
         o, frame, name.utf8().data(), ownerElement,
-        url.prettyURL().utf8().data(), referrer.utf8().data());
+        url.string().utf8().data(), referrer.utf8().data());
 
     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
@@ -4069,7 +4069,7 @@
 {
     DBG("o=%p, frame=%p, size=%dx%d, element=%p, url="" mimeType=%s",
         o, frame, pluginSize.width(), pluginSize.height(), element,
-        url.prettyURL().utf8().data(), mimeType.utf8().data());
+        url.string().utf8().data(), mimeType.utf8().data());
 
     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     sd->changed.frame_rect = EINA_TRUE;

Modified: trunk/Source/WebKit/gtk/ChangeLog (87622 => 87623)


--- trunk/Source/WebKit/gtk/ChangeLog	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/gtk/ChangeLog	2011-05-28 19:59:16 UTC (rev 87623)
@@ -1,3 +1,20 @@
+2011-05-28  Adam Barth  <[email protected]>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Audit all uses of KURL::prettyURL
+        https://bugs.webkit.org/show_bug.cgi?id=61201
+
+        Update callers of prettyURL to just call string.
+
+        * WebCoreSupport/ChromeClientGtk.cpp:
+        (WebKit::ChromeClient::mouseDidMoveOverElement):
+        * WebCoreSupport/FrameLoaderClientGtk.cpp:
+        (WebKit::FrameLoaderClient::dispatchDidChangeLocationWithinPage):
+        (WebKit::FrameLoaderClient::dispatchDidCommitLoad):
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_get_icon_uri):
+
 2011-05-26  Gustavo Noronha Silva  <[email protected]>
 
         Reviewed by Martin Robinson.

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp (87622 => 87623)


--- trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -541,7 +541,7 @@
         if (!url.isEmpty() && url != m_hoveredLinkURL) {
             TextDirection dir;
             CString titleString = hit.title(dir).utf8();
-            CString urlString = url.prettyURL().utf8();
+            CString urlString = url.string().utf8();
             g_signal_emit_by_name(m_webView, "hovering-over-link", titleString.data(), urlString.data());
             m_hoveredLinkURL = url;
         }

Modified: trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp (87622 => 87623)


--- trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -895,7 +895,7 @@
 {
     WebKitWebFramePrivate* priv = m_frame->priv;
     g_free(priv->uri);
-    priv->uri = g_strdup(core(m_frame)->document()->url().prettyURL().utf8().data());
+    priv->uri = g_strdup(core(m_frame)->document()->url().string().utf8().data());
     g_object_notify(G_OBJECT(m_frame), "uri");
     WebKitWebView* webView = getViewFromFrame(m_frame);
     if (m_frame == webkit_web_view_get_main_frame(webView))
@@ -986,7 +986,7 @@
 
     WebKitWebFramePrivate* priv = m_frame->priv;
     g_free(priv->uri);
-    priv->uri = g_strdup(core(m_frame)->loader()->activeDocumentLoader()->url().prettyURL().utf8().data());
+    priv->uri = g_strdup(core(m_frame)->loader()->activeDocumentLoader()->url().string().utf8().data());
     g_free(priv->title);
     priv->title = NULL;
     g_object_notify(G_OBJECT(m_frame), "uri");

Modified: trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp (87622 => 87623)


--- trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -4978,7 +4978,7 @@
 G_CONST_RETURN gchar* webkit_web_view_get_icon_uri(WebKitWebView* webView)
 {
     g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), 0);
-    String iconURL = iconDatabase().synchronousIconURLForPageURL(core(webView)->mainFrame()->document()->url().prettyURL());
+    String iconURL = iconDatabase().synchronousIconURLForPageURL(core(webView)->mainFrame()->document()->url().string());
     webView->priv->iconURI = iconURL.utf8();
     return webView->priv->iconURI.data();
 }

Modified: trunk/Source/WebKit/qt/ChangeLog (87622 => 87623)


--- trunk/Source/WebKit/qt/ChangeLog	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-05-28 19:59:16 UTC (rev 87623)
@@ -1,3 +1,21 @@
+2011-05-28  Adam Barth  <[email protected]>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Audit all uses of KURL::prettyURL
+        https://bugs.webkit.org/show_bug.cgi?id=61201
+
+        Update callers of prettyURL to just call string.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::mouseDidMoveOverElement):
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::updateGlobalHistory):
+        (WebCore::FrameLoaderClientQt::cancelledError):
+        (WebCore::FrameLoaderClientQt::blockedError):
+        (WebCore::FrameLoaderClientQt::objectContentType):
+        (WebCore::FrameLoaderClientQt::createPlugin):
+
 2011-05-27  Alexis Menard  <[email protected]>
 
         Reviewed by Csaba Osztrogonác.

Modified: trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp (87622 => 87623)


--- trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -506,7 +506,7 @@
         lastHoverURL = result.absoluteLinkURL();
         lastHoverTitle = result.title(dir);
         lastHoverContent = result.textContent();
-        emit m_webPage->linkHovered(lastHoverURL.prettyURL(),
+        emit m_webPage->linkHovered(lastHoverURL.string(),
                 lastHoverTitle, lastHoverContent);
     }
 }

Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (87622 => 87623)


--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -802,7 +802,7 @@
     QWebHistoryInterface* history = QWebHistoryInterface::defaultInterface();
     WebCore::DocumentLoader* loader = m_frame->loader()->documentLoader();
     if (history)
-        history->addHistoryEntry(loader->urlForHistory().prettyURL());
+        history->addHistoryEntry(loader->urlForHistory().string());
 
     if (dumpHistoryCallbacks) {
         printf("WebView navigated to url \"%s\" with title \"%s\" with HTTP equivalent method \"%s\".  The navigation was %s and was %s%s.\n",
@@ -926,7 +926,7 @@
 
 WebCore::ResourceError FrameLoaderClientQt::cancelledError(const WebCore::ResourceRequest& request)
 {
-    ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(),
+    ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().string(),
             QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8));
     error.setIsCancellation(true);
     return error;
@@ -946,7 +946,7 @@
 
 WebCore::ResourceError FrameLoaderClientQt::blockedError(const WebCore::ResourceRequest& request)
 {
-    return ResourceError("WebKitErrorDomain", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(),
+    return ResourceError("WebKitErrorDomain", WebKitErrorCannotUseRestrictedPort, request.url().string(),
             QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8));
 }
 
@@ -1360,7 +1360,7 @@
 
 ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
 {
-    // qDebug()<<" ++++++++++++++++ url is "<<url.prettyURL()<<", mime = "<<mimeTypeIn;
+    // qDebug()<<" ++++++++++++++++ url is "<<url.string()<<", mime = "<<mimeTypeIn;
     QFileInfo fi(url.path());
     String extension = fi.suffix();
     if (mimeTypeIn == "application/x-qt-plugin" || mimeTypeIn == "application/x-qt-styled-widget")
@@ -1523,8 +1523,8 @@
 PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTMLPlugInElement* element, const KURL& url, const Vector<String>& paramNames,
                                           const Vector<String>& paramValues, const String& mimeType, bool loadManually)
 {
-    // qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.prettyURL() << mimeType;
-    // qDebug()<<"------\t url = ""
+    // qDebug()<<"------ Creating plugin in FrameLoaderClientQt::createPlugin for "<<url.string() << mimeType;
+    // qDebug()<<"------\t url = ""
 
     if (!m_webFrame)
         return 0;

Modified: trunk/Source/WebKit2/ChangeLog (87622 => 87623)


--- trunk/Source/WebKit2/ChangeLog	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit2/ChangeLog	2011-05-28 19:59:16 UTC (rev 87623)
@@ -1,3 +1,18 @@
+2011-05-28  Adam Barth  <[email protected]>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Audit all uses of KURL::prettyURL
+        https://bugs.webkit.org/show_bug.cgi?id=61201
+
+        Update callers of prettyURL to just call string.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::createPlugin):
+        * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
+        (WebKit::cancelledError):
+        (WebKit::blockedError):
+
 2011-05-27  Stephanie Lewis  <[email protected]>
 
         Unreviewed.

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (87622 => 87623)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -1198,12 +1198,6 @@
     notImplemented();
 }
 
-static String documentURL(Frame* frame)
-{
-    const KURL& url = ""
-    return url.hasPath() ? url.prettyURL() : url.prettyURL() + "/";
-}
-
 PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement* pluginElement, const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
 {
     ASSERT(paramNames.size() == paramValues.size());
@@ -1217,14 +1211,14 @@
     parameters.values = paramValues;
     parameters.mimeType = mimeType;
     parameters.loadManually = loadManually;
-    parameters.documentURL = documentURL(m_frame->coreFrame());
+    parameters.documentURL = m_frame->coreFrame()->document()->url().string();
 
     Frame* mainFrame = webPage->mainFrame()->coreFrame();
     if (m_frame->coreFrame() == mainFrame)
         parameters.toplevelDocumentURL = parameters.documentURL;
     else if (m_frame->coreFrame()->document()->securityOrigin()->canAccess(mainFrame->document()->securityOrigin())) {
         // We only want to set the toplevel document URL if the plug-in has access to it.
-        parameters.toplevelDocumentURL = documentURL(mainFrame);
+        parameters.toplevelDocumentURL = mainFrame->document()->url().string();
     }
 
     // <rdar://problem/8440903>: AppleConnect has a bug where it does not

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp (87622 => 87623)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp	2011-05-28 19:41:14 UTC (rev 87622)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp	2011-05-28 19:59:16 UTC (rev 87623)
@@ -51,7 +51,7 @@
 
 ResourceError cancelledError(const ResourceRequest& request)
 {
-    ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(),
+    ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().string(),
                                         QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8));
     error.setIsCancellation(true);
     return error;    
@@ -59,7 +59,7 @@
 
 ResourceError blockedError(const ResourceRequest& request)
 {
-    return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().prettyURL(),
+    return ResourceError("WebKit", WebKitErrorCannotUseRestrictedPort, request.url().string(),
                          QCoreApplication::translate("QWebFrame", "Request blocked", 0, QCoreApplication::UnicodeUTF8));
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to