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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1422333009: OOPIF: History navigations for new child frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge conflicts in fyi.json Created 5 years, 1 month 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: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 70c881825f8883a6db53263dc9f27def90943d4f..90ec70cf56c1d2cc0f27b2c0e60aca1f2f3c011d 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -802,6 +802,17 @@ void RenderFrameHostImpl::OnFrameFocused() {
}
void RenderFrameHostImpl::OnOpenURL(const FrameHostMsg_OpenURL_Params& params) {
+ if (params.is_history_navigation_in_new_child) {
+ DCHECK(SiteIsolationPolicy::UseSubframeNavigationEntries());
+
+ // Try to find a FrameNavigationEntry that matches this frame instead, based
+ // on the frame's unique name. If this can't be found, fall back to the
+ // default params using OpenURL below.
+ if (frame_tree_node_->navigator()->NavigateNewChildFrame(
+ this, params.frame_unique_name))
+ return;
+ }
+
OpenURL(params, GetSiteInstance());
}

Powered by Google App Engine
This is Rietveld 408576698