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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1376003002: Make rendering timeouts work even if paint data received early (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cursor
Patch Set: Moved message dispatch mechanism from Blink to content Created 5 years, 3 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 06490d55ed496054137b5660a645524a421e2206..ec99a05025e79e4e20c2603e92c1745325966e9c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2735,6 +2735,14 @@ void RenderFrameImpl::didCommitProvisionalLoad(
}
}
+ // For new page navigations, the browser process needs to be notified of the
+ // first paint of that page, so it can cancel the timer that waits for it.
Charlie Reis 2015/10/01 21:26:39 nit: (or skip the timer if the paint IPC is handle
kenrb 2015/10/02 13:24:40 Done.
+ if (is_main_frame_ && !navigation_state->WasWithinSamePage()) {
+ render_view_->QueueMessage(
Charlie Reis 2015/10/01 21:26:39 There's some magic here I don't fully understand,
+ new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_),
+ MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE);
+ }
+
// When we perform a new navigation, we need to update the last committed
// session history entry with state for the page we are leaving. Do this
// before updating the HistoryController state.

Powered by Google App Engine
This is Rietveld 408576698