Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2680353005: WebContents created via ctrl-click should be in a new process (target=_blank). (Closed)
Patch Set: Change layout test expectations to match product code changes. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 981e6b72ac80845f83a00a4170eb1eb8e5b00d7e..77e1ebd03bcfe61ebde085ab9ec16adcb7ae5b47 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -912,12 +912,13 @@ void FrameLoader::Load(const FrameLoadRequest& passed_request,
if (policy == kNavigationPolicyDownload) {
Client()->LoadURLExternally(request.GetResourceRequest(),
kNavigationPolicyDownload, String(), false);
- } else {
+ return; // Navigation/download will be handled by the client.
+ } else if (ShouldNavigateTargetFrame(policy)) {
Łukasz Anforowicz 2017/04/14 19:29:10 This is the main fix - we should avoid going via C
request.GetResourceRequest().SetFrameType(
WebURLRequest::kFrameTypeAuxiliary);
CreateWindowForRequest(request, *frame_, policy);
+ return; // Navigation will be handled by the new frame/window.
}
- return;
}
if (!frame_->IsNavigationAllowed())

Powered by Google App Engine
This is Rietveld 408576698