fix: falsy transparent shouldn't affect webContents background (#38157)

fix: falsy transparent shouldn't affect webContents background (#36914)
This commit is contained in:
David Sanders
2023-05-03 06:42:27 -07:00
committed by GitHub
parent 8d2530437e
commit 80a378a9de
5 changed files with 65 additions and 15 deletions

View File

@@ -226,7 +226,7 @@ void WebContentsPreferences::SetFromDictionary(
// preferences don't save a transparency option,
// apply any existing transparency setting to background_color_
bool transparent;
if (web_preferences.Get(options::kTransparent, &transparent)) {
if (web_preferences.Get(options::kTransparent, &transparent) && transparent) {
background_color_ = SK_ColorTRANSPARENT;
}
std::string background_color;