Merge branch 'dark_mode' into 'master'
Add an override/exception pref for dark mode and RFP See merge request librewolf-community/browser/common!5master
commit
748ba63d6c
|
@ -0,0 +1,29 @@
|
|||
diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp
|
||||
index ce2cbca..60fda48 100644
|
||||
--- a/dom/base/Document.cpp
|
||||
+++ b/dom/base/Document.cpp
|
||||
@@ -17084,6 +17084,7 @@ void Document::RemoveToplevelLoadingDocument(Document* aDoc) {
|
||||
StylePrefersColorScheme Document::PrefersColorScheme(
|
||||
IgnoreRFP aIgnoreRFP) const {
|
||||
if (aIgnoreRFP == IgnoreRFP::No &&
|
||||
+ !StaticPrefs::privacy_override_rfp_for_color_scheme() &&
|
||||
nsContentUtils::ShouldResistFingerprinting(this)) {
|
||||
return StylePrefersColorScheme::Light;
|
||||
}
|
||||
diff --git a/modules/libref/init/StaticPrefList.yaml b/modules/libref/init/StaticPrefList.yaml
|
||||
index b4b2dc7..e65d43f 100644
|
||||
--- a/modules/libref/init/StaticPrefList.yaml
|
||||
+++ b/modules/libref/init/StaticPrefList.yaml
|
||||
@@ -9863,6 +9863,12 @@
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
+# Allows overriding RFP for only the dark/light pref
|
||||
+- name: privacy.override_rfp_for_color_scheme
|
||||
+ type: bool
|
||||
+ value: false
|
||||
+ mirror: always
|
||||
+
|
||||
# We automatically decline canvas permission requests if they are not initiated
|
||||
# from user input. Just in case that breaks something, we allow the user to
|
||||
# revert this behavior with this obscure pref. We do not intend to support this
|
Loading…
Reference in New Issue