From 95a867b795574689c9b6e93e3d327ccc8171eb56 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Sat, 6 Nov 2021 03:55:19 +0100 Subject: [PATCH] fix: background transparency (#31722) --- shell/browser/api/electron_api_web_contents.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index de8b89afc23..bc1d5fa9016 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -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 color = web_preferences->GetBackgroundColor(); + absl::optional color = + IsGuest() ? SK_ColorTRANSPARENT : web_preferences->GetBackgroundColor(); web_contents()->SetPageBaseBackgroundColor(color); rwhv->SetBackgroundColor(color.value_or(SK_ColorWHITE)); }