mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
fix: <webview> background transparency (#31722)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user