Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index b2384228de290448ec156508a2c5d961444895c1..77eb148e9f6d58bee7bf2fd06c151813685fe760 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -1042,8 +1042,15 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) { |
} |
// PlzNavigate |
- if (IsBrowserSideNavigationEnabled()) |
+ if (IsBrowserSideNavigationEnabled()) { |
+ // PlzNavigate: synchronous loads happen in the renderer, and the browser |
+ // has not been notified about the start of the load yet. Do it now. |
+ if (!is_loading()) { |
nasko
2016/02/03 22:28:14
Why not put this in the same section above, where
clamy
2016/02/10 16:39:35
Done.
|
+ is_loading_ = true; |
+ frame_tree_node()->DidStartLoading(true, false); |
+ } |
pending_commit_ = false; |
+ } |
} |
void RenderFrameHostImpl::OnUpdateState(const PageState& state) { |
@@ -1694,6 +1701,11 @@ void RenderFrameHostImpl::OnToggleFullscreen(bool enter_fullscreen) { |
} |
void RenderFrameHostImpl::OnDidStartLoading(bool to_different_document) { |
+ // PlzNavigate: the browser is responsible for knowing the start of all |
+ // non-synchronous navigations. |
+ if (IsBrowserSideNavigationEnabled() && to_different_document) |
+ return; |
carlosk
2016/02/03 12:41:56
Instead of ignoring shouldn't we stop it from bein
clamy
2016/02/10 16:39:35
Done.
|
+ |
bool was_previously_loading = frame_tree_node_->frame_tree()->IsLoading(); |
is_loading_ = true; |
frame_tree_node_->DidStartLoading(to_different_document, |