fix: BrowserView setBackgroundColor() (#31746)
This commit is contained in:
parent
25cdbb7d3a
commit
b40f3d4cfc
2 changed files with 7 additions and 2 deletions
|
@ -1457,8 +1457,9 @@ void WebContents::HandleNewRenderFrame(
|
|||
// Set the background color of RenderWidgetHostView.
|
||||
auto* web_preferences = WebContentsPreferences::From(web_contents());
|
||||
if (web_preferences) {
|
||||
bool guest = IsGuest() || type_ == Type::kBrowserView;
|
||||
absl::optional<SkColor> color =
|
||||
IsGuest() ? SK_ColorTRANSPARENT : web_preferences->GetBackgroundColor();
|
||||
guest ? SK_ColorTRANSPARENT : web_preferences->GetBackgroundColor();
|
||||
web_contents()->SetPageBaseBackgroundColor(color);
|
||||
rwhv->SetBackgroundColor(color.value_or(SK_ColorWHITE));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue