diff options
author | creis <creis@chromium.org> | 2015-03-09 11:21:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-09 18:22:52 +0000 |
commit | b1a8a668fe3478ddb399eef33728914fe01a8a43 (patch) | |
tree | fa4e0efcedd8669a4b4228ce1c0600fa3e2171d9 /content | |
parent | bacf2a1a5b79f59460b1258a502f9f889f18e59f (diff) | |
download | chromium_src-b1a8a668fe3478ddb399eef33728914fe01a8a43.zip chromium_src-b1a8a668fe3478ddb399eef33728914fe01a8a43.tar.gz chromium_src-b1a8a668fe3478ddb399eef33728914fe01a8a43.tar.bz2 |
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}
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/frame_host/navigator_impl.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc index 2f63284..7194bbe 100644 --- a/content/browser/frame_host/navigator_impl.cc +++ b/content/browser/frame_host/navigator_impl.cc @@ -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 */); |