| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index 4b5390e68014fb812380fc270f770995237f1d57..58a0d1d9b30879172c15d4b4134ae6a9642e4a90 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -155,6 +155,7 @@
|
| #include "third_party/WebKit/public/platform/URLConversion.h"
|
| #include "third_party/WebKit/public/platform/WebCachePolicy.h"
|
| #include "third_party/WebKit/public/platform/WebData.h"
|
| +#include "third_party/WebKit/public/platform/WebHTTPBody.h"
|
| #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
|
| #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h"
|
| #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
|
| @@ -2960,8 +2961,8 @@ void RenderFrameImpl::loadURLExternally(const blink::WebURLRequest& request,
|
| request.url(), referrer,
|
| suggested_name));
|
| } else {
|
| - OpenURL(request.url(), referrer, policy, should_replace_current_entry,
|
| - false);
|
| + OpenURL(request.url(), "GET", nullptr, referrer, policy,
|
| + should_replace_current_entry, false);
|
| }
|
| }
|
|
|
| @@ -4837,8 +4838,9 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
| if (is_content_initiated && IsTopLevelNavigation(frame_) &&
|
| render_view_->renderer_preferences_
|
| .browser_handles_all_top_level_requests) {
|
| - OpenURL(url, referrer, info.defaultPolicy, info.replacesCurrentHistoryItem,
|
| - false);
|
| + OpenURL(url, info.urlRequest.httpMethod().utf8(),
|
| + GetRequestBodyForWebURLRequest(info.urlRequest), referrer,
|
| + info.defaultPolicy, info.replacesCurrentHistoryItem, false);
|
| return blink::WebNavigationPolicyIgnore; // Suppress the load here.
|
| }
|
|
|
| @@ -4847,8 +4849,9 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
| // FrameNavigationEntry. If none is found, fall back to the default url.
|
| if (SiteIsolationPolicy::UseSubframeNavigationEntries() &&
|
| info.isHistoryNavigationInNewChildFrame && is_content_initiated) {
|
| - OpenURL(url, referrer, info.defaultPolicy, info.replacesCurrentHistoryItem,
|
| - true);
|
| + OpenURL(url, info.urlRequest.httpMethod().utf8(),
|
| + GetRequestBodyForWebURLRequest(info.urlRequest), referrer,
|
| + info.defaultPolicy, info.replacesCurrentHistoryItem, true);
|
| // Suppress the load in Blink but mark the frame as loading.
|
| return blink::WebNavigationPolicyHandledByClient;
|
| }
|
| @@ -4911,7 +4914,9 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
| }
|
|
|
| if (should_fork) {
|
| - OpenURL(url, send_referrer ? referrer : Referrer(), info.defaultPolicy,
|
| + OpenURL(url, info.urlRequest.httpMethod().utf8(),
|
| + GetRequestBodyForWebURLRequest(info.urlRequest),
|
| + send_referrer ? referrer : Referrer(), info.defaultPolicy,
|
| info.replacesCurrentHistoryItem, false);
|
| return blink::WebNavigationPolicyIgnore; // Suppress the load here.
|
| }
|
| @@ -4951,8 +4956,9 @@ WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation(
|
|
|
| if (is_fork) {
|
| // Open the URL via the browser, not via WebKit.
|
| - OpenURL(url, Referrer(), info.defaultPolicy,
|
| - info.replacesCurrentHistoryItem, false);
|
| + OpenURL(url, info.urlRequest.httpMethod().utf8(),
|
| + GetRequestBodyForWebURLRequest(info.urlRequest), Referrer(),
|
| + info.defaultPolicy, info.replacesCurrentHistoryItem, false);
|
| return blink::WebNavigationPolicyIgnore;
|
| }
|
|
|
| @@ -5289,13 +5295,18 @@ void RenderFrameImpl::OnSelectPopupMenuItem(int selected_index) {
|
| }
|
| #endif
|
|
|
| -void RenderFrameImpl::OpenURL(const GURL& url,
|
| - const Referrer& referrer,
|
| - WebNavigationPolicy policy,
|
| - bool should_replace_current_entry,
|
| - bool is_history_navigation_in_new_child) {
|
| +void RenderFrameImpl::OpenURL(
|
| + const GURL& url,
|
| + const std::string& method,
|
| + const scoped_refptr<ResourceRequestBody>& resource_request_body,
|
| + const Referrer& referrer,
|
| + WebNavigationPolicy policy,
|
| + bool should_replace_current_entry,
|
| + bool is_history_navigation_in_new_child) {
|
| FrameHostMsg_OpenURL_Params params;
|
| params.url = url;
|
| + params.method = method;
|
| + params.resource_request_body = resource_request_body;
|
| params.referrer = referrer;
|
| params.disposition = RenderViewImpl::NavigationPolicyToDisposition(policy);
|
|
|
|
|