mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 21:53:31 -05:00
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
|
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/libpref/init/StaticPrefList.yaml
|
||
|
+++ b/modules/libpref/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
|