Fix background color assignment for popups (fixes issue #2482)

This commit is contained in:
Marshall Greenblatt
2020-04-23 13:47:10 -04:00
parent ccf7b28723
commit 3adb801ca8
4 changed files with 7 additions and 23 deletions

View File

@@ -2534,6 +2534,13 @@ void CefBrowserHostImpl::RenderViewCreated(
RenderFrameCreated(render_view_host->GetMainFrame());
platform_delegate_->RenderViewCreated(render_view_host);
// Make sure the background color is set on the WebView and the Widget.
render_view_host->OnWebkitPreferencesChanged();
if (render_view_host->GetWidget()->GetView()) {
render_view_host->GetWidget()->GetView()->SetBackgroundColor(
GetBackgroundColor());
}
}
void CefBrowserHostImpl::RenderViewDeleted(

View File

@@ -1051,11 +1051,6 @@ void CefContentBrowserClient::OverrideWebkitPrefs(
// Using RVH instead of RFH here because rvh->GetMainFrame() may be nullptr
// when this method is called.
renderer_prefs::PopulateWebPreferences(rvh, *prefs);
if (rvh->GetWidget()->GetView()) {
rvh->GetWidget()->GetView()->SetBackgroundColor(
prefs->base_background_color);
}
}
void CefContentBrowserClient::BrowserURLHandlerCreated(