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

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

Issue 2972793002: Fix did_replace_entry reported as false for meta refresh tags (Closed)
Patch Set: Minor rewrite and updated tests. Created 3 years, 5 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
« no previous file with comments | « chrome/test/data/History/redirector_slow.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 6f7126c3ec6c22ecb78e574af5a04456cf920c99..59a1465798a14451406ee90f5b662f94504874c5 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -888,7 +888,12 @@ bool NavigationControllerImpl::RendererDidNavigate(
navigation_handle);
break;
case NAVIGATION_TYPE_EXISTING_PAGE:
- details->did_replace_entry = details->is_same_document;
+ // In-page navigations always replace the previous entry. This is the
+ // case for history.replaceState(), as well as back and forward across
+ // fragment entries and history.pushState() entries.
+ if (details->is_same_document)
+ details->did_replace_entry = true;
+
RendererDidNavigateToExistingPage(rfh, params, details->is_same_document,
was_restored, navigation_handle);
break;
« no previous file with comments | « chrome/test/data/History/redirector_slow.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698