Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index a24ea16d2dff31c2e46d04080e2556a8751f4228..78af2c80b3e30a3b21f62cc28dd6768eaa58186e 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -3954,6 +3954,12 @@ void WebContentsImpl::LoadingStateChanged(bool to_different_document, |
void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host, |
RenderViewHost* new_host) { |
+ if (old_host && new_host) { |
+ RenderWidgetHostView* old_view = old_host->GetWidget()->GetView(); |
+ RenderWidgetHostView* new_view = new_host->GetWidget()->GetView(); |
nasko
2016/11/09 20:18:58
I would put this code in WebContentsImpl::NotifyFr
chrishtr
2016/11/09 21:45:21
Done.
|
+ if (old_view && new_view) |
+ new_view->SetBackgroundColor(old_view->background_color()); |
clamy
2016/11/09 15:56:35
Mmh I think this happens after we've swapped the v
nasko
2016/11/09 20:18:58
It happens in the same event loop as part of commi
chrishtr
2016/11/09 21:45:21
Since it's the same event loop, there is no flash.
|
+ } |
// After sending out a swap notification, we need to send a disconnect |
// notification so that clients that pick up a pointer to |this| can NULL the |
// pointer. See Bug 1230284. |