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

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: Made ClearCompositorFrame pure virtual 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..eb7a25388c9a886517c116957b414b7c42a8100e 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -915,6 +915,18 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
accessibility_reset_count_ = 0;
frame_tree_node()->navigator()->DidNavigate(this, validated_params);
+ // 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();
+ }
+
// PlzNavigate
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation)) {
« no previous file with comments | « content/browser/compositor/delegated_frame_host.cc ('k') | content/browser/frame_host/render_widget_host_view_child_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698