summaryrefslogtreecommitdiff
path: root/mozilla-1158076-1.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2017-03-31 09:50:53 +0200
committerMartin Stransky <stransky@redhat.com>2017-03-31 09:50:53 +0200
commit20fe8926e7a83c5d751cf873a47fdb9c8c381c39 (patch)
treededd1a99d726fbffd23b36cd02892c3e4fbe3725 /mozilla-1158076-1.patch
parentAdded deployment-checker@mozilla.org.xpi to the file list (diff)
downloadlibrewolf-fedora-ff-20fe8926e7a83c5d751cf873a47fdb9c8c381c39.tar.gz
librewolf-fedora-ff-20fe8926e7a83c5d751cf873a47fdb9c8c381c39.tar.bz2
librewolf-fedora-ff-20fe8926e7a83c5d751cf873a47fdb9c8c381c39.zip
Added patch for mozbz#1348576 - enable e10s by default, Added patch for mozbz#1158076 - enable dark theme by pref
Diffstat (limited to 'mozilla-1158076-1.patch')
-rw-r--r--mozilla-1158076-1.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/mozilla-1158076-1.patch b/mozilla-1158076-1.patch
new file mode 100644
index 0000000..e409386
--- /dev/null
+++ b/mozilla-1158076-1.patch
@@ -0,0 +1,51 @@
+diff -up firefox-52.0.2/modules/libpref/init/all.js.1158076-1 firefox-52.0.2/modules/libpref/init/all.js
+--- firefox-52.0.2/modules/libpref/init/all.js.1158076-1 2017-03-31 09:44:28.377647329 +0200
++++ firefox-52.0.2/modules/libpref/init/all.js 2017-03-31 09:46:02.847234586 +0200
+@@ -4646,6 +4646,8 @@ pref("gfx.apitrace.enabled",false);
+ pref("gfx.content.use-native-pushlayer", true);
+ #ifdef MOZ_WIDGET_GTK
+ pref("gfx.xrender.enabled",false);
++pref("widget.chrome.allow-gtk-dark-theme", false);
++pref("widget.content.allow-gtk-dark-theme", false);
+ #endif
+ #endif
+
+diff -up firefox-52.0.2/widget/gtk/nsLookAndFeel.cpp.1158076-1 firefox-52.0.2/widget/gtk/nsLookAndFeel.cpp
+--- firefox-52.0.2/widget/gtk/nsLookAndFeel.cpp.1158076-1 2017-03-31 09:44:28.374647342 +0200
++++ firefox-52.0.2/widget/gtk/nsLookAndFeel.cpp 2017-03-31 09:44:35.125617758 +0200
+@@ -1134,16 +1134,27 @@ nsLookAndFeel::Init()
+ // with wrong color theme, see Bug 972382
+ GtkSettings *settings = gtk_settings_get_for_screen(gdk_screen_get_default());
+
+- // 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);
++ gboolean darkThemeDefault;
++ g_object_get(settings, dark_setting, &darkThemeDefault, nullptr);
+
+- if (dark && !PR_GetEnv("MOZ_ALLOW_GTK_DARK_THEME")) {
+- g_object_set(settings, dark_setting, FALSE, nullptr);
++ // Dark themes interacts poorly with widget styling (see bug 1216658).
++ // We disable dark themes by default for all processes (chrome, web content)
++ // but allow user to overide it by prefs.
++ if (darkThemeDefault) {
++ bool allowDarkTheme;
++ if (XRE_IsContentProcess()) {
++ allowDarkTheme =
++ mozilla::Preferences::GetBool("widget.content.allow-gtk-dark-theme",
++ false);
++ } else {
++ allowDarkTheme = (PR_GetEnv("MOZ_ALLOW_GTK_DARK_THEME") != nullptr) ||
++ mozilla::Preferences::GetBool("widget.chrome.allow-gtk-dark-theme",
++ false);
++ }
++ if (!allowDarkTheme) {
++ g_object_set(settings, dark_setting, FALSE, nullptr);
++ }
+ }
+
+ // Scrollbar colors
bgstack15