Title: [170056] trunk/Source/WebKit2
Revision
170056
Author
[email protected]
Date
2014-06-17 10:23:23 -0700 (Tue, 17 Jun 2014)

Log Message

Add SPI to get the NSURLRequest from a WKNavigationResponse
https://bugs.webkit.org/show_bug.cgi?id=133984
<rdar://problem/17006399>

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKNavigationResponse.mm:
(-[WKNavigationResponse _request]):
* UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
* UIProcess/API/Cocoa/WKNavigationResponsePrivate.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (170055 => 170056)


--- trunk/Source/WebKit2/ChangeLog	2014-06-17 16:16:38 UTC (rev 170055)
+++ trunk/Source/WebKit2/ChangeLog	2014-06-17 17:23:23 UTC (rev 170056)
@@ -1,3 +1,18 @@
+2014-06-17  Anders Carlsson  <[email protected]>
+
+        Add SPI to get the NSURLRequest from a WKNavigationResponse
+        https://bugs.webkit.org/show_bug.cgi?id=133984
+        <rdar://problem/17006399>
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/Cocoa/WKNavigationResponse.mm:
+        (-[WKNavigationResponse _request]):
+        * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
+        * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
+
 2014-06-17  Gyuyoung Kim  <[email protected]>
 
         [EFL][WK2] Skip failing EFL API tests

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm (170055 => 170056)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm	2014-06-17 16:16:38 UTC (rev 170055)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.mm	2014-06-17 17:23:23 UTC (rev 170056)
@@ -64,6 +64,11 @@
     return _frame.get();
 }
 
+- (NSURLRequest *)_request
+{
+    return _request.get();
+}
+
 @end
 
 

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h (170055 => 170056)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h	2014-06-17 16:16:38 UTC (rev 170055)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponseInternal.h	2014-06-17 17:23:23 UTC (rev 170056)
@@ -32,6 +32,7 @@
 @interface WKNavigationResponse () {
 @package
     RetainPtr<WKFrameInfo> _frame;
+    RetainPtr<NSURLRequest> _request;
 }
 
 @property (nonatomic, readwrite, copy) NSURLResponse *response;

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponsePrivate.h (170055 => 170056)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponsePrivate.h	2014-06-17 16:16:38 UTC (rev 170055)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponsePrivate.h	2014-06-17 17:23:23 UTC (rev 170056)
@@ -30,6 +30,7 @@
 @interface WKNavigationResponse (WKPrivate)
 
 @property (nonatomic, readonly) WKFrameInfo *_frame;
+@property (nonatomic, readonly) NSURLRequest *_request;
 
 @end
 

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (170055 => 170056)


--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-06-17 16:16:38 UTC (rev 170055)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm	2014-06-17 17:23:23 UTC (rev 170056)
@@ -356,6 +356,7 @@
     auto navigationResponse = adoptNS([[WKNavigationResponse alloc] init]);
 
     navigationResponse->_frame = adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*frame]);
+    navigationResponse->_request = resourceRequest.nsURLRequest(WebCore::DoNotUpdateHTTPBody);
     [navigationResponse setResponse:resourceResponse.nsURLResponse()];
     [navigationResponse setCanShowMIMEType:canShowMIMEType];
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to