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

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

Issue 1738233002: Disallow was_within_same_page = true for a cross-process navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: content/browser/frame_host/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index b005335680788b1666cb42c811ec3aec12de70f1..fa58d229b6ffbbcd8e31c6e4d24a0ed020c6a78f 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -455,8 +455,17 @@ void NavigatorImpl::DidNavigate(
UMA_HISTOGRAM_BOOLEAN("Navigation.FrameHasEmbeddedCredentials",
has_embedded_credentials);
+ RenderFrameHostManager* manager = NULL;
+ if (oopifs_possible)
+ manager = render_frame_host->frame_tree_node()->render_manager();
+ else if (ui::PageTransitionIsMainFrame(params.transition))
+ manager = frame_tree->root()->render_manager();
+ bool will_swap = manager &&
+ (render_frame_host == manager->pending_frame_host() ||
+ render_frame_host == manager->speculative_frame_host());
+
bool is_navigation_within_page = controller_->IsURLInPageNavigation(
- params.url, params.was_within_same_page, render_frame_host);
+ params.url, params.was_within_same_page, render_frame_host, will_swap);
Charlie Reis 2016/02/26 20:11:58 What if we left IsURLInPageNavigation as is and ju
gzobqq 2016/02/29 13:36:28 I agree, this is cleaner.
if (ui::PageTransitionIsMainFrame(params.transition)) {
if (delegate_) {
// When overscroll navigation gesture is enabled, a screenshot of the page

Powered by Google App Engine
This is Rietveld 408576698