diff --git a/widget/gtk/nsLookAndFeel.cpp b/widget/gtk/nsLookAndFeel.cpp index 7329237d36f4..c190becec8db 100644 --- a/widget/gtk/nsLookAndFeel.cpp +++ b/widget/gtk/nsLookAndFeel.cpp @@ -24,7 +24,6 @@ #include "nsStyleConsts.h" #include "gfxFontConstants.h" #include "WidgetUtils.h" -#include "nsIXULRuntime.h" #include @@ -1098,18 +1097,16 @@ nsLookAndFeel::Init() // with wrong color theme, see Bug 972382 GtkSettings *settings = gtk_settings_get_for_screen(gdk_screen_get_default()); - if (!mozilla::BrowserTabsRemoteAutostart() || XRE_IsContentProcess()) { - // Disable dark theme in processes that have web content because it - // interacts poorly with widget styling (see bug 1216658). - // To avoid triggering reload of theme settings unnecessarily, only set the - // setting when necessary. - const gchar* dark_setting = "gtk-application-prefer-dark-theme"; - gboolean dark; - g_object_get(settings, dark_setting, &dark, nullptr); + // Disable dark theme because it interacts poorly with widget styling in + // web content (see bug 1216658). + // To avoid triggering reload of theme settings unnecessarily, only set the + // setting when necessary. + const gchar* dark_setting = "gtk-application-prefer-dark-theme"; + gboolean dark; + g_object_get(settings, dark_setting, &dark, nullptr); - if (dark) { - g_object_set(settings, dark_setting, FALSE, nullptr); - } + if (dark) { + g_object_set(settings, dark_setting, FALSE, nullptr); } GtkWidgetPath *path = gtk_widget_path_new();