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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1339803002: Clear page display after navigation if no rendered output arrives (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test 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/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 a04779a089a83550d8d2f3cd01fdcd001130680a..8c49677f270cf0de6b5cb870f7ed4fc6eeffe420 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -835,6 +835,18 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
OnBeforeUnloadACK(true, approx_renderer_start_time, base::TimeTicks::Now());
}
+ // For a top-level frame, there are potential security concerns associated
+ // with displaying graphics from a previously loaded page after the URL in
+ // the omnibar has been changed. It is unappealing to clear the page
+ // immediately, but if the renderer is taking a long time to issue any
+ // compositor output (possibly because of script deliberately creating this
+ // situation) then we clear it after a while anyway.
+ // See https://crbug.com/497588.
+ if (frame_tree_node_->IsMainFrame() && GetView()) {
+ RenderWidgetHostImpl::From(GetView()->GetRenderWidgetHost())
+ ->StartNewContentRenderingTimeout();
+ }
+
// If we're waiting for an unload ack from this renderer and we receive a
// Navigate message, then the renderer was navigating before it received the
// unload request. It will either respond to the unload request soon or our

Powered by Google App Engine
This is Rietveld 408576698