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

Unified Diff: content/browser/web_contents/navigation_controller_impl.cc

Issue 21544005: Take the navigation type into account when checking if the navigation is in page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing an approach a bit. Created 7 years, 4 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/web_contents/navigation_controller_impl.cc
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index 6176606cbd44d6bbaeb66e9ee368e57bcd2ac80a..6a7da72fef125ef155e8b8d802716cb06df92d95 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -758,6 +758,10 @@ bool NavigationControllerImpl::RendererDidNavigate(
RendererDidNavigateToSamePage(params);
break;
case NAVIGATION_TYPE_IN_PAGE:
+ // When navigating back from a ref URL to the top non ref one is_in_page
+ // is false (see AreURLsInPageNavigation()). In order to set the flag
+ // properly take the navigation type into account as well.
+ details->is_in_page = true;
Charlie Reis 2013/08/05 22:18:10 Putting it here doesn't help other callers of IsUR
RendererDidNavigateInPage(params, &details->did_replace_entry);
break;
case NAVIGATION_TYPE_NEW_SUBFRAME:

Powered by Google App Engine
This is Rietveld 408576698