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

@@ -950,10 +950,6 @@ void AlloyContentBrowserClient::OverrideWebkitPrefs(
renderer_prefs::PopulateWebPreferences(rvh, *prefs, base_background_color);
web_contents->SetPageBaseBackgroundColor(base_background_color);
if (rvh->GetWidget()->GetView()) {
rvh->GetWidget()->GetView()->SetBackgroundColor(base_background_color);
}
}
bool AlloyContentBrowserClient::OverrideWebPreferencesAfterNavigation(