omegafox/patches/global-style-sheets.patch
daijro c36915b497 Bump to FF134
Updates patches for Firefox 134.0.1
2025-01-22 01:10:32 -06:00

37 lines
1.3 KiB
Diff

# Remaps custom stylesheet path to the GRE directory
diff --git a/layout/style/GlobalStyleSheetCache.cpp b/layout/style/GlobalStyleSheetCache.cpp
index 13d65c2d3e..22cad0f7ec 100644
--- a/layout/style/GlobalStyleSheetCache.cpp
+++ b/layout/style/GlobalStyleSheetCache.cpp
@@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GlobalStyleSheetCache.h"
+#include "nsDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsExceptionHandler.h"
@@ -459,9 +460,9 @@ void GlobalStyleSheetCache::InitFromProfile() {
nsCOMPtr<nsIFile> contentFile;
nsCOMPtr<nsIFile> chromeFile;
- NS_GetSpecialDirectory(NS_APP_USER_CHROME_DIR, getter_AddRefs(contentFile));
+ NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(contentFile));
if (!contentFile) {
- // if we don't have a profile yet, that's OK!
+ printf_stderr("Could not find GRE directory.\n");
return;
}
@@ -470,8 +471,8 @@ void GlobalStyleSheetCache::InitFromProfile() {
return;
}
- contentFile->Append(u"userContent.css"_ns);
- chromeFile->Append(u"userChrome.css"_ns);
+ contentFile->Append(u"content.css"_ns);
+ chromeFile->Append(u"chrome.css"_ns);
mUserContentSheet = LoadSheetFile(contentFile, eUserSheetFeatures);
mUserChromeSheet = LoadSheetFile(chromeFile, eUserSheetFeatures);