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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2863003002: Use the WebContents visibility as the initial visibility when creating a swapped-out RenderView. (Closed)
Patch Set: Created 3 years, 7 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/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index f62cf8320202c8cecfe3caa4b1504b320f58ca25..8ccaf1f10a67bc75222dbb6cfb32f178825c5290 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -309,7 +309,8 @@ bool RenderViewHostImpl::CreateRenderView(
params->swapped_out = !is_active_;
params->replicated_frame_state = replicated_frame_state;
params->proxy_routing_id = proxy_route_id;
- params->hidden = GetWidget()->is_hidden();
+ params->hidden = is_active_ ? GetWidget()->is_hidden()
+ : GetWidget()->delegate()->IsHidden();
nasko 2017/05/05 18:42:55 Wouldn't the value of GetWidget()->delegate()->IsH
lfg 2017/05/05 18:53:02 It's not correct for interstitials. It's also not
nasko 2017/05/05 20:33:51 Acknowledged.
params->never_visible = delegate_->IsNeverVisible();
params->window_was_created_with_opener = window_was_created_with_opener;
params->enable_auto_resize = GetWidget()->auto_resize_enabled();

Powered by Google App Engine
This is Rietveld 408576698