[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 15:45:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cebba9f8c9ab5a1bec8f288b9166de7249bf334f
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 11 20:18:14 2010 +0000

    Add and implement WKDownloadCopyRequest
    https://bugs.webkit.org/show_bug.cgi?id=49393
    
    Reviewed by Adam Roben.
    
    * Shared/API/c/mac/WKURLRequestNS.h:
    * Shared/API/c/mac/WKURLRequestNS.mm:
    (WKURLRequestCopyNSURLRequest):
    Remove unneeded CFAllocator parameter.
    
    * Shared/WebURLRequest.cpp:
    (WebKit::WebURLRequest::WebURLRequest):
    * Shared/WebURLRequest.h:
    (WebKit::WebURLRequest::create):
    Change create to take a ResourceRequest instead.
    
    * UIProcess/API/C/WKDownload.cpp:
    (WKDownloadCopyRequest):
    Return a copied WKURLRequest.
    
    * UIProcess/API/C/WKDownload.h:
    * UIProcess/Downloads/DownloadProxy.cpp:
    (WebKit::DownloadProxy::didStart):
    Set the request.
    
    * UIProcess/Downloads/DownloadProxy.h:
    (WebKit::DownloadProxy::request):
    Return the request.
    
    * UIProcess/Downloads/DownloadProxy.messages.in:
    * WebProcess/Downloads/Download.cpp:
    (WebKit::Download::didStart):
    Pass the request along when sending the DidStart message.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71840 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 697fee4..bc43c99 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,39 @@
+2010-11-11  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Adam Roben.
+
+        Add and implement WKDownloadCopyRequest
+        https://bugs.webkit.org/show_bug.cgi?id=49393
+
+        * Shared/API/c/mac/WKURLRequestNS.h:
+        * Shared/API/c/mac/WKURLRequestNS.mm:
+        (WKURLRequestCopyNSURLRequest):
+        Remove unneeded CFAllocator parameter.
+
+        * Shared/WebURLRequest.cpp:
+        (WebKit::WebURLRequest::WebURLRequest):
+        * Shared/WebURLRequest.h:
+        (WebKit::WebURLRequest::create):
+        Change create to take a ResourceRequest instead.
+
+        * UIProcess/API/C/WKDownload.cpp:
+        (WKDownloadCopyRequest):
+        Return a copied WKURLRequest.
+
+        * UIProcess/API/C/WKDownload.h:
+        * UIProcess/Downloads/DownloadProxy.cpp:
+        (WebKit::DownloadProxy::didStart):
+        Set the request.
+
+        * UIProcess/Downloads/DownloadProxy.h:
+        (WebKit::DownloadProxy::request):
+        Return the request.
+
+        * UIProcess/Downloads/DownloadProxy.messages.in:
+        * WebProcess/Downloads/Download.cpp:
+        (WebKit::Download::didStart):
+        Pass the request along when sending the DidStart message.
+
 2010-11-11  John Sullivan  <sullivan at apple.com>
 
         Rubber-stamped by Anders Carlsson.
diff --git a/WebKit2/Shared/API/c/mac/WKURLRequestNS.h b/WebKit2/Shared/API/c/mac/WKURLRequestNS.h
index 0b9ebfb..4cdfec8 100644
--- a/WebKit2/Shared/API/c/mac/WKURLRequestNS.h
+++ b/WebKit2/Shared/API/c/mac/WKURLRequestNS.h
@@ -34,7 +34,7 @@ extern "C" {
 #endif
 
 WK_EXPORT WKURLRequestRef WKURLRequestCreateWithNSURLRequest(NSURLRequest* urlRequest);
-WK_EXPORT NSURLRequest* WKURLRequestCopyNSURLRequest(CFAllocatorRef alloc, WKURLRequestRef urlRequest);
+WK_EXPORT NSURLRequest* WKURLRequestCopyNSURLRequest(WKURLRequestRef urlRequest);
 
 #ifdef __cplusplus
 }
diff --git a/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm b/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm
index f9e69dd..7cc69fa 100644
--- a/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm
+++ b/WebKit2/Shared/API/c/mac/WKURLRequestNS.mm
@@ -37,7 +37,7 @@ WKURLRequestRef WKURLRequestCreateWithNSURLRequest(NSURLRequest* urlRequest)
     return toAPI(request.release().releaseRef());
 }
 
-NSURLRequest* WKURLRequestCopyNSURLRequest(CFAllocatorRef alloc, WKURLRequestRef urlRequest)
+NSURLRequest* WKURLRequestCopyNSURLRequest(WKURLRequestRef urlRequest)
 {
     return [toImpl(urlRequest)->platformRequest() copy];
 }
diff --git a/WebKit2/Shared/WebURLRequest.cpp b/WebKit2/Shared/WebURLRequest.cpp
index 27a5e05..c0e3433 100644
--- a/WebKit2/Shared/WebURLRequest.cpp
+++ b/WebKit2/Shared/WebURLRequest.cpp
@@ -9,10 +9,12 @@
 
 #include "WebURLRequest.h"
 
+using namespace WebCore;
+
 namespace WebKit {
 
-WebURLRequest::WebURLRequest(const WebCore::KURL& url)
-    : m_request(url)
+WebURLRequest::WebURLRequest(const ResourceRequest& request)
+    : m_request(request)
 {
 }
 
diff --git a/WebKit2/Shared/WebURLRequest.h b/WebKit2/Shared/WebURLRequest.h
index a35b994..b21bca1 100644
--- a/WebKit2/Shared/WebURLRequest.h
+++ b/WebKit2/Shared/WebURLRequest.h
@@ -44,9 +44,9 @@ class WebURLRequest : public APIObject {
 public:
     static const Type APIType = TypeURLRequest;
 
-    static PassRefPtr<WebURLRequest> create(const WebCore::KURL& url)
+    static PassRefPtr<WebURLRequest> create(const WebCore::ResourceRequest& request)
     {
-        return adoptRef(new WebURLRequest(url));
+        return adoptRef(new WebURLRequest(request));
     }
 
     static PassRefPtr<WebURLRequest> create(PlatformRequest platformRequest)
@@ -58,7 +58,7 @@ public:
     const WebCore::ResourceRequest& resourceRequest() const { return m_request; }
 
 private:
-    explicit WebURLRequest(const WebCore::KURL&);
+    explicit WebURLRequest(const WebCore::ResourceRequest&);
     explicit WebURLRequest(PlatformRequest);
 
     virtual Type type() const { return APIType; }
diff --git a/WebKit2/UIProcess/API/C/WKDownload.cpp b/WebKit2/UIProcess/API/C/WKDownload.cpp
index 3703c72..6f3b536 100644
--- a/WebKit2/UIProcess/API/C/WKDownload.cpp
+++ b/WebKit2/UIProcess/API/C/WKDownload.cpp
@@ -27,6 +27,7 @@
 
 #include "DownloadProxy.h"
 #include "WKAPICast.h"
+#include "WebURLRequest.h"
 
 using namespace WebKit;
 
@@ -35,3 +36,7 @@ WKTypeID WKDownloadGetTypeID()
     return toAPI(DownloadProxy::APIType);
 }
 
+WKURLRequestRef WKDownloadCopyRequest(WKDownloadRef download)
+{
+    return toAPI(WebURLRequest::create(toImpl(download)->request()).leakRef());
+}
diff --git a/WebKit2/UIProcess/API/C/WKDownload.h b/WebKit2/UIProcess/API/C/WKDownload.h
index 9e5d2c0..b94f678 100644
--- a/WebKit2/UIProcess/API/C/WKDownload.h
+++ b/WebKit2/UIProcess/API/C/WKDownload.h
@@ -38,6 +38,8 @@ extern "C" {
 
 WK_EXPORT WKTypeID WKDownloadGetTypeID();
 
+WK_EXPORT WKURLRequestRef WKDownloadCopyRequest(WKDownloadRef download);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/WebKit2/UIProcess/Downloads/DownloadProxy.cpp b/WebKit2/UIProcess/Downloads/DownloadProxy.cpp
index 47c7491..5d8890e 100644
--- a/WebKit2/UIProcess/Downloads/DownloadProxy.cpp
+++ b/WebKit2/UIProcess/Downloads/DownloadProxy.cpp
@@ -30,6 +30,8 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
+using namespace WebCore;
+
 namespace WebKit {
 
 static uint64_t generateDownloadID()
@@ -59,8 +61,10 @@ void DownloadProxy::invalidate()
     m_webContext = 0;
 }
 
-void DownloadProxy::didStart()
+void DownloadProxy::didStart(const ResourceRequest& request)
 {
+    m_request = request;
+
     if (!m_webContext)
         return;
 
diff --git a/WebKit2/UIProcess/Downloads/DownloadProxy.h b/WebKit2/UIProcess/Downloads/DownloadProxy.h
index 1f63e79..29f012c 100644
--- a/WebKit2/UIProcess/Downloads/DownloadProxy.h
+++ b/WebKit2/UIProcess/Downloads/DownloadProxy.h
@@ -27,6 +27,7 @@
 #define DownloadProxy_h
 
 #include "APIObject.h"
+#include <WebCore/ResourceRequest.h>
 #include <wtf/Forward.h>
 #include <wtf/PassRefPtr.h>
 
@@ -48,6 +49,7 @@ public:
     ~DownloadProxy();
 
     uint64_t downloadID() const { return m_downloadID; }
+    const WebCore::ResourceRequest& request() const { return m_request; }
 
     void invalidate();
 
@@ -59,12 +61,13 @@ private:
     virtual Type type() const { return APIType; }
 
     // Message handlers.
-    void didStart();
+    void didStart(const WebCore::ResourceRequest&);
     void didCreateDestination(const String& path);
     void didFinish();
 
     WebContext* m_webContext;
     uint64_t m_downloadID;
+    WebCore::ResourceRequest m_request;
 };
 
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/Downloads/DownloadProxy.messages.in b/WebKit2/UIProcess/Downloads/DownloadProxy.messages.in
index b6f55e5..463fb38 100644
--- a/WebKit2/UIProcess/Downloads/DownloadProxy.messages.in
+++ b/WebKit2/UIProcess/Downloads/DownloadProxy.messages.in
@@ -21,7 +21,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 messages -> DownloadProxy {
-    DidStart()
+    DidStart(WebCore::ResourceRequest request)
     DidCreateDestination(WTF::String path)
     DidFinish()
 }
diff --git a/WebKit2/WebProcess/Downloads/Download.cpp b/WebKit2/WebProcess/Downloads/Download.cpp
index 63e403a..1210db2 100644
--- a/WebKit2/WebProcess/Downloads/Download.cpp
+++ b/WebKit2/WebProcess/Downloads/Download.cpp
@@ -27,6 +27,7 @@
 
 #include "Connection.h"
 #include "DownloadProxyMessages.h"
+#include "WebCoreArgumentCoders.h"
 #include "WebProcess.h"
 
 using namespace WebCore;
@@ -57,7 +58,7 @@ CoreIPC::Connection* Download::connection() const
 
 void Download::didStart()
 {
-    send(Messages::DownloadProxy::DidStart());
+    send(Messages::DownloadProxy::DidStart(m_request));
 }
 
 void Download::didReceiveData(uint64_t length)
diff --git a/WebKit2/WebProcess/Downloads/Download.h b/WebKit2/WebProcess/Downloads/Download.h
index 995b896..44afb56 100644
--- a/WebKit2/WebProcess/Downloads/Download.h
+++ b/WebKit2/WebProcess/Downloads/Download.h
@@ -26,6 +26,11 @@
 #ifndef Download_h
 #define Download_h
 
+#include "MessageSender.h"
+#include <WebCore/ResourceRequest.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
+
 #if PLATFORM(MAC)
 #include <wtf/RetainPtr.h>
 #ifdef __OBJC__
@@ -37,11 +42,6 @@ class WKDownloadAsDelegate;
 #endif
 #endif
 
-#include "MessageSender.h"
-#include <WebCore/ResourceRequest.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/PassOwnPtr.h>
-
 namespace WebKit {
 
 class Download : public CoreIPC::MessageSender<Download> {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list