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 7c06f49..f9481b1 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.
index e4bda70..433db05 100644 (file)
@@ -42,3 +42,8 @@ WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef url)
 {
     return toAPI(WebURLRequest::create(KURL(KURL(), toImpl(url)->string())).leakRef());
 }
+
+WKURLRef WKURLRequestCopyURL(WKURLRequestRef requestRef)
+{
+    return toCopiedURLAPI(toImpl(requestRef)->url());
+}
index d78968d..7d146f2 100644 (file)
@@ -36,6 +36,8 @@ WK_EXPORT WKTypeID WKURLRequestGetTypeID();
 
 WK_EXPORT WKURLRequestRef WKURLRequestCreateWithWKURL(WKURLRef);
 
+WK_EXPORT WKURLRef WKURLRequestCopyURL(WKURLRequestRef);
+
 #ifdef __cplusplus
 }
 #endif
index 6cb5ba8..ab167b8 100644 (file)
@@ -59,6 +59,8 @@ public:
     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);