2011-02-07 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Feb 2011 09:31:36 +0000 (09:31 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Feb 2011 09:31:36 +0000 (09:31 +0000)
        Reviewed by Antti Koivisto.

        Add WKURLRequestCopyURL API (needed for tests and also generally useful)
        https://bugs.webkit.org/show_bug.cgi?id=53909

        * Shared/API/c/WKURLRequest.cpp:
        (WKURLRequestCopyURL):
        * Shared/API/c/WKURLRequest.h:
        * Shared/WebURLRequest.h:
        (WebKit::WebURLRequest::url):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77793 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKURLRequest.cpp
Source/WebKit2/Shared/API/c/WKURLRequest.h
Source/WebKit2/Shared/WebURLRequest.h

index 7c06f4960e65cfe11f0469e518fd784366f1b31c..f9481b1a2d5b3750b70db75f31b796f159cc150d 100644 (file)
@@ -1,3 +1,16 @@
+2011-02-07  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Antti Koivisto.
+
+        Add WKURLRequestCopyURL API (needed for tests and also generally useful)
+        https://bugs.webkit.org/show_bug.cgi?id=53909
+
+        * Shared/API/c/WKURLRequest.cpp:
+        (WKURLRequestCopyURL):
+        * Shared/API/c/WKURLRequest.h:
+        * Shared/WebURLRequest.h:
+        (WebKit::WebURLRequest::url):
+
 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
 
         Unreviewed; speculative Qt build fix.
 2011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
 
         Unreviewed; speculative Qt build fix.
index e4bda70330ac9cb2dbe9ba032bc48981592db672..433db059e175dd6805de6f1ce7e5d97c5868b0a9 100644 (file)
@@ -42,3 +42,8 @@ WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef url)
 {
     return toAPI(WebURLRequest::create(KURL(KURL(), toImpl(url)->string())).leakRef());
 }
 {
     return toAPI(WebURLRequest::create(KURL(KURL(), toImpl(url)->string())).leakRef());
 }
+
+WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
+{
+    return toCopiedURLAPI(toImpl(requestRef)->url());
+}
index d78968df089c5f8823da7ff688eff02bfdedf2c4..7d146f26b084bc2ddbfb7abf15bc111af3b39cb0 100644 (file)
@@ -36,6 +36,8 @@ WK_EXPORT WKTypeID WKURLRequestGetTypeID();
 
 WK_EXPORT WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef);
 
 
 WK_EXPORT WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef);
 
+WK_EXPORT WKURLRef WKURLRequestCopyURL(WKURLRequestRef);
+
 #ifdef __cplusplus
 }
 #endif
 #ifdef __cplusplus
 }
 #endif
index 6cb5ba8651427eac50ed7a8b651bc04eec0df960..ab167b80147f33d9eec406b57011e3ead8febcc3 100644 (file)
@@ -59,6 +59,8 @@ public:
     PlatformRequest platformRequest() const;
     const WebCore::ResourceRequest& resourceRequest() const { return m_request; }
 
     PlatformRequest platformRequest() const;
     const WebCore::ResourceRequest& resourceRequest() const { return m_request; }
 
+    const String& url() const { return m_request.url(); }
+
 private:
     explicit WebURLRequest(const WebCore::ResourceRequest&);
     explicit WebURLRequest(PlatformRequest);
 private:
     explicit WebURLRequest(const WebCore::ResourceRequest&);
     explicit WebURLRequest(PlatformRequest);