Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 6330cb2358999b5a0984759804b04936ce17ba73..8219b4f6415c77f7e3ea0ffbf0030df28febf250 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -3036,6 +3036,9 @@ void RenderViewImpl::PopulateDocumentStateFromPending( |
document_state->set_referrer_policy(params.referrer.policy); |
document_state->set_is_overriding_user_agent(params.is_overriding_user_agent); |
+ document_state->set_must_reset_scroll_and_scale_state( |
+ params.navigation_type == |
+ ViewMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL); |
} |
NavigationState* RenderViewImpl::CreateNavigationStateFromPending() { |
@@ -3248,6 +3251,11 @@ void RenderViewImpl::didCommitProvisionalLoad(WebFrame* frame, |
if (document_state->commit_load_time().is_null()) |
document_state->set_commit_load_time(Time::Now()); |
+ if (document_state->must_reset_scroll_and_scale_state()) { |
+ webview()->resetScrollAndScaleState(); |
+ document_state->set_must_reset_scroll_and_scale_state(false); |
+ } |
+ |
if (is_new_navigation) { |
// When we perform a new navigation, we need to update the last committed |
// session history entry with state for the page we are leaving. |