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

This commit is contained in:
David Sanders 2023-05-02 14:44:34 -07:00 committed by GitHub
parent d95f9d2c63
commit a26343f3e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;