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 6a8837f474341380d860771385e35677e1c8de65..dd707404fdbf6b7a50c165a62feb631e834dadd7 100644 |
--- a/content/browser/frame_host/navigator_impl.cc |
+++ b/content/browser/frame_host/navigator_impl.cc |
@@ -46,6 +46,7 @@ |
#include "content/public/common/content_constants.h" |
#include "content/public/common/resource_response.h" |
#include "net/base/net_errors.h" |
+#include "net/base/url_util.h" |
#include "url/gurl.h" |
namespace content { |
@@ -402,6 +403,12 @@ bool NavigatorImpl::NavigateToEntry( |
if (is_pending_entry && controller_->GetPendingEntryIndex() != -1) |
DCHECK(frame_entry.page_state().IsValid()); |
+ bool is_history_navigation = frame_entry.page_state().IsValid(); |
+ bool is_same_document_fragment_change = |
+ net::AreURLsInPageNavigation(frame_tree_node->current_url(), |
+ dest_url) && |
+ !is_history_navigation; |
+ |
// Navigate in the desired RenderFrameHost. |
// We can skip this step in the rare case that this is a transfer navigation |
// which began in the chosen RenderFrameHost, since the request has already |
@@ -422,8 +429,8 @@ bool NavigatorImpl::NavigateToEntry( |
lofi_state, navigation_start), |
entry.ConstructStartNavigationParams(), |
entry.ConstructRequestNavigationParams( |
- frame_entry, is_same_document_history_load, |
- is_history_navigation_in_new_child, |
+ frame_entry, is_same_document_fragment_change, |
+ is_same_document_history_load, is_history_navigation_in_new_child, |
entry.GetSubframeUniqueNames(frame_tree_node), |
frame_tree_node->has_committed_real_load(), |
controller_->GetPendingEntryIndex() == -1, |