File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -427,7 +427,8 @@ void ElectronBrowserClient::OverrideWebPreferences(
427427 renderer_prefs->can_accept_load_drops = false ;
428428
429429 ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi ();
430- prefs->in_forced_colors = native_theme->forced_colors ();
430+ prefs->in_forced_colors = native_theme->forced_colors () !=
431+ ui::ColorProviderKey::ForcedColors::kNone ;
431432 prefs->preferred_color_scheme =
432433 native_theme->preferred_color_scheme () ==
433434 ui::NativeTheme::PreferredColorScheme::kDark
@@ -447,7 +448,8 @@ bool ElectronBrowserClient::WebPreferencesNeedUpdateForColorRelatedStateChanges(
447448 const content::SiteInstance& main_frame_site) const {
448449 const auto & prefs = web_contents.GetOrCreateWebPreferences ();
449450 ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi ();
450- bool in_forced_colors = native_theme->forced_colors ();
451+ bool in_forced_colors = native_theme->forced_colors () !=
452+ ui::ColorProviderKey::ForcedColors::kNone ;
451453 blink::mojom::PreferredColorScheme preferred_color_scheme =
452454 native_theme->preferred_color_scheme () ==
453455 ui::NativeTheme::PreferredColorScheme::kDark
You can’t perform that action at this time.
0 commit comments