Chromium Code Reviews| 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 bb4128c8f0fda709aef73e59c5b2819c0d1bd7d6..a45a036393aeb5aa28aae63a3bdff73bd23d8788 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -3910,6 +3910,15 @@ void WebContentsImpl::NotifyViewSwapped(RenderViewHost* old_host, |
| void WebContentsImpl::NotifyFrameSwapped(RenderFrameHost* old_host, |
| RenderFrameHost* new_host) { |
| + // Pass the background color of the old host to the new one. This passes |
| + // on the page background color of the old host (or the theme color if the |
| + // page background color is not set). This avoids flashes of white when |
| + // starting up new_host. |
| + if (old_host && old_host->GetView() && new_host && new_host->GetView()) { |
| + new_host->GetView()->SetBackgroundColor( |
| + old_host->GetView()->background_color()); |
|
no sievers
2016/05/17 18:05:43
You said this doesn't work reliably. Does it work
|
| + } |
| + |
| FOR_EACH_OBSERVER(WebContentsObserver, |
| observers_, |
| RenderFrameHostChanged(old_host, new_host)); |