Skip to content

Commit 0fea201

Browse files
committed
Add theming toggle #179
1 parent 2f2af93 commit 0fea201

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

patches/global-style-sheets.patch

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1-
# Remaps custom stylesheet path to the GRE directory
2-
31
diff --git a/layout/style/GlobalStyleSheetCache.cpp b/layout/style/GlobalStyleSheetCache.cpp
4-
index 13d65c2d3e..22cad0f7ec 100644
2+
index 13d65c2d3e..c51f1da030 100644
53
--- a/layout/style/GlobalStyleSheetCache.cpp
64
+++ b/layout/style/GlobalStyleSheetCache.cpp
7-
@@ -5,6 +5,7 @@
5+
@@ -5,6 +5,8 @@
86
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
97

108
#include "GlobalStyleSheetCache.h"
119
+#include "nsDirectoryServiceDefs.h"
10+
+#include "MaskConfig.hpp"
1211

1312
#include "nsAppDirectoryServiceDefs.h"
1413
#include "nsExceptionHandler.h"
15-
@@ -459,9 +460,9 @@ void GlobalStyleSheetCache::InitFromProfile() {
14+
@@ -446,6 +448,9 @@ void GlobalStyleSheetCache::InitFromProfile() {
15+
if (!Preferences::GetBool(PREF_LEGACY_STYLESHEET_CUSTOMIZATION)) {
16+
return;
17+
}
18+
+ if (MaskConfig::GetBool("disableTheming")) {
19+
+ return;
20+
+ }
21+
22+
nsCOMPtr<nsIXULRuntime> appInfo =
23+
do_GetService("@mozilla.org/xre/app-info;1");
24+
@@ -459,9 +464,9 @@ void GlobalStyleSheetCache::InitFromProfile() {
1625
nsCOMPtr<nsIFile> contentFile;
1726
nsCOMPtr<nsIFile> chromeFile;
1827

@@ -24,7 +33,7 @@ index 13d65c2d3e..22cad0f7ec 100644
2433
return;
2534
}
2635

27-
@@ -470,8 +471,8 @@ void GlobalStyleSheetCache::InitFromProfile() {
36+
@@ -470,8 +475,8 @@ void GlobalStyleSheetCache::InitFromProfile() {
2837
return;
2938
}
3039

0 commit comments

Comments
 (0)