Commit b1a8a668 authored by creis's avatar creis Committed by Commit bot

OOPIF: Fix cross-process navigations in new windows.

We were putting the wrong FrameTreeNode ID on the OpenURLParams
when a navigation was destined for a different WebContents.

BUG=464944
TEST=Shift click a link to https://chrome.google.com/webstore
     in --site-per-process mode.

Review URL: https://codereview.chromium.org/988953003

Cr-Commit-Position: refs/heads/master@{#319690}
parent bacf2a1a
......@@ -627,11 +627,18 @@ void NavigatorImpl::RequestTransferURL(
}
int64 frame_tree_node_id = -1;
// Send the navigation to the current FrameTreeNode if it's destined for a
// subframe in the current tab. We'll assume it's for the main frame
// (possibly of a new or different WebContents) otherwise.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSitePerProcess)) {
switches::kSitePerProcess) &&
disposition == CURRENT_TAB &&
render_frame_host->GetParent()) {
frame_tree_node_id =
render_frame_host->frame_tree_node()->frame_tree_node_id();
}
OpenURLParams params(
dest_url, referrer, frame_tree_node_id, disposition, page_transition,
true /* is_renderer_initiated */);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment