[WinCairo] WebDownload::initWithRequest is not implemented.
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2015 08:56:40 +0000 (08:56 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2015 08:56:40 +0000 (08:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146203

Reviewed by Alex Christensen.

Implement method to start download from a IWebURLRequest object.

* WebDownloadCurl.cpp:
(WebDownload::initWithRequest): Implemented.

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

Source/WebKit/win/ChangeLog
Source/WebKit/win/WebDownloadCurl.cpp

index be896b9..b28658c 100644 (file)
@@ -1,3 +1,15 @@
+2015-06-23  Per Arne Vollan  <peavo@outlook.com>
+
+        [WinCairo] WebDownload::initWithRequest is not implemented.
+        https://bugs.webkit.org/show_bug.cgi?id=146203
+
+        Reviewed by Alex Christensen.
+
+        Implement method to start download from a IWebURLRequest object.
+
+        * WebDownloadCurl.cpp:
+        (WebDownload::initWithRequest): Implemented.
+
 2015-06-18  Anders Carlsson  <andersca@apple.com>
 
         Remove shouldInterruptJavaScript
index 19635d0..2ba4398 100644 (file)
@@ -81,8 +81,14 @@ HRESULT STDMETHODCALLTYPE WebDownload::initWithRequest(
         /* [in] */ IWebURLRequest* request, 
         /* [in] */ IWebDownloadDelegate* delegate)
 {
-   notImplemented();
-   return E_FAIL;
+    BString url;
+
+    if (!SUCCEEDED(request->URL(&url)))
+        return E_FAIL;
+
+    init(URL(ParsedURLString, String(url)), delegate);
+
+    return S_OK;
 }
 
 HRESULT STDMETHODCALLTYPE WebDownload::initToResumeWithBundle(