Fix the timing of SetBackgroundColor (fixes issue #2482)

If the background color is set too early it won't be sent to renderer process.
Also force refresh of the background color for newly created popups.
This commit is contained in:
Andy Tzeng
2021-10-04 09:58:22 +00:00
committed by Marshall Greenblatt
parent 4767130954
commit 1f85a7752b
3 changed files with 18 additions and 13 deletions

View File

@@ -188,11 +188,6 @@ void ChromeContentBrowserClientCef::OverrideWebkitPrefs(
}
web_contents->SetPageBaseBackgroundColor(base_background_color);
auto rvh = web_contents->GetRenderViewHost();
if (rvh->GetWidget()->GetView()) {
rvh->GetWidget()->GetView()->SetBackgroundColor(base_background_color);
}
}
bool ChromeContentBrowserClientCef::WillCreateURLLoaderFactory(