fix: <webview> background transparency (#31722)
This commit is contained in:
parent
bc4308dcf8
commit
95a867b795
1 changed files with 2 additions and 1 deletions
|
@ -1457,7 +1457,8 @@ void WebContents::HandleNewRenderFrame(
|
|||
// Set the background color of RenderWidgetHostView.
|
||||
auto* web_preferences = WebContentsPreferences::From(web_contents());
|
||||
if (web_preferences) {
|
||||
absl::optional<SkColor> color = web_preferences->GetBackgroundColor();
|
||||
absl::optional<SkColor> color =
|
||||
IsGuest() ? SK_ColorTRANSPARENT : web_preferences->GetBackgroundColor();
|
||||
web_contents()->SetPageBaseBackgroundColor(color);
|
||||
rwhv->SetBackgroundColor(color.value_or(SK_ColorWHITE));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue