Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 766426f8f7e8bed660f627d710f26ab9ee00c8fa..81394153a5b2057a2739a838ffa287907264deab 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2736,6 +2736,13 @@ void WebContentsImpl::OnDidStartLoading(bool to_different_document) { |
static_cast<RenderFrameHostImpl*>(render_frame_message_source_); |
int64 render_frame_id = rfh->frame_tree_node()->frame_tree_node_id(); |
+ // Any main frame load to a new document should reset the load progress, since |
+ // it will replace the current page and any frames. |
+ if (to_different_document && !rfh->GetParent()) { |
+ ResetLoadProgressState(); |
+ loading_frames_in_progress_ = 0; |
Charlie Reis
2014/12/19 19:47:48
Note: I didn't put this line inside ResetLoadProgr
Avi (use Gerrit)
2014/12/19 19:54:54
Acknowledged.
|
+ } |
+ |
// It is possible to get multiple calls to OnDidStartLoading that don't have |
// corresponding calls to OnDidStopLoading: |
// - With "swappedout://" URLs, this happens when a RenderView gets swapped |