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

Unified Diff: content/browser/tab_contents/navigation_controller.cc

Issue 6826017: Merge 80941 - Fix classification of a history.back() that interrupts a pending navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/696/src/
Patch Set: Created 9 years, 8 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 | « no previous file | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/navigation_controller.cc
===================================================================
--- content/browser/tab_contents/navigation_controller.cc (revision 81004)
+++ content/browser/tab_contents/navigation_controller.cc (working copy)
@@ -647,14 +647,15 @@
// Anything below here we know is a main frame navigation.
if (pending_entry_ &&
existing_entry != pending_entry_ &&
- pending_entry_->page_id() == -1) {
+ pending_entry_->page_id() == -1 &&
+ existing_entry == GetLastCommittedEntry()) {
// In this case, we have a pending entry for a URL but WebCore didn't do a
// new navigation. This happens when you press enter in the URL bar to
// reload. We will create a pending entry, but WebKit will convert it to
// a reload since it's the same page and not create a new entry for it
// (the user doesn't want to have a new back/forward entry when they do
- // this). In this case, we want to just ignore the pending entry and go
- // back to where we were (the "existing entry").
+ // this). If this matches the last committed entry, we want to just ignore
+ // the pending entry and go back to where we were (the "existing entry").
return NavigationType::SAME_PAGE;
}
« no previous file with comments | « no previous file | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698