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

This commit is contained in:
David Sanders
2023-05-03 11:58:43 -07:00
committed by GitHub
parent 22140a68fd
commit a4ac36f52e
5 changed files with 65 additions and 16 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;