gh-14765: Fix patches failing for 153.0.1 (gh-14768)

This commit is contained in:
mr. m
2026-07-28 21:57:41 +02:00
committed by mr. m
parent 0cc0ff0489
commit 8a7f4f9b6c

View File

@@ -1,8 +1,8 @@
diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
index 328b7524810322561700347fa7f26403897635a8..58d33d68e050d11ea712413ad5c2170a112e404a 100644
index 73eb08f648d55121a0cd96cd808f932fb14bfee6..efa99861a5da12ad8d0daa2c0eb1473c57810397 100644
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -467,6 +467,7 @@
@@ -471,6 +471,7 @@
#include "prtime.h"
#include "prtypes.h"
#include "xpcpublic.h"
@@ -10,14 +10,15 @@ index 328b7524810322561700347fa7f26403897635a8..58d33d68e050d11ea712413ad5c2170a
// clang-format off
#include "mozilla/Encoding.h"
@@ -3198,6 +3199,10 @@ void Document::FillStyleSetUserAndUASheets() {
for (StyleSheet* sheet : *sheetService->UserStyleSheets()) {
styleSet.AppendStyleSheet(*sheet);
}
+ if (auto sheet = zen::ZenStyleSheetCache::Singleton()->GetModsSheet(); sheet && IsInChromeDocShell()) {
+ // The mods sheet is only used in the chrome docshell.
+ styleSet.AppendStyleSheet(*sheet);
+ }
@@ -3164,6 +3165,11 @@ void Document::FillStyleSetUserAndUASheets() {
}
};
StyleSheet* sheet = IsInChromeDocShell() ? cache->GetUserChromeSheet()
: cache->GetUserContentSheet();
+ if (IsInChromeDocShell()) {
+ // The mods sheet is only used in the chrome docshell.
+ MaybeAppend(zen::ZenStyleSheetCache::Singleton()->GetModsSheet());
+ }
+
MaybeAppend(IsInChromeDocShell() ? cache->GetUserChromeSheet()
: cache->GetUserContentSheet());
MaybeAppend(cache->GetUASheet());