Chromium Code Reviews| Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| index 0d747116c33fbd3a16e46ee4bd2f29bc1b866f28..515f0d5e08b88673a881be2d1c1a36f1872f7f39 100644 |
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| @@ -958,17 +958,6 @@ bool FrameLoader::prepareRequestForThisFrame(FrameLoadRequest& request) { |
| return true; |
| } |
| -static bool shouldOpenInNewWindow(Frame* targetFrame, |
| - const FrameLoadRequest& request, |
| - NavigationPolicy policy) { |
| - if (!targetFrame && !request.frameName().isEmpty()) |
| - return true; |
| - // FIXME: This case is a workaround for the fact that ctrl+clicking a form |
| - // submission incorrectly sends as a GET rather than a POST if it creates a |
| - // new window in a different process. |
| - return request.form() && policy != NavigationPolicyCurrentTab; |
| -} |
| - |
| static bool shouldNavigateTargetFrame(NavigationPolicy policy) { |
| switch (policy) { |
| case NavigationPolicyCurrentTab: |
| @@ -1101,6 +1090,8 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest, |
| m_provisionalItem = historyItem; |
| } |
| + // Form submissions appear to need their special-case of finding the target at |
| + // schedule rather than at fire. |
|
Łukasz Anforowicz
2016/10/19 20:48:51
The comment text has been copy&pasted from CL desc
|
| Frame* targetFrame = request.form() |
| ? nullptr |
| : m_frame->findFrameForNavigation( |
| @@ -1120,7 +1111,7 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest, |
| setReferrerForFrameRequest(request); |
| - if (shouldOpenInNewWindow(targetFrame, request, policy)) { |
| + if (!targetFrame && !request.frameName().isEmpty()) { |
| if (policy == NavigationPolicyDownload) { |
| client()->loadURLExternally(request.resourceRequest(), |
| NavigationPolicyDownload, String(), false); |