0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 21:53:31 -05:00

spoof DPR to 2 when RFP is in use

The idea is to improve usability by reducing blurrines on some websites, even tho this increases memory usage.
Ideally -moz-device-pixel-ratio should also be patched to match the value, but that is an issue regardless of DPR value so only tangential.
This commit is contained in:
fxbrit 2023-07-30 23:19:03 +02:00
parent 96fa7aa600
commit f1a54190bc
2 changed files with 14 additions and 0 deletions

View file

@ -12,6 +12,7 @@ patches/librewolf-prefs.patch
patches/mozilla_dirs.patch patches/mozilla_dirs.patch
patches/msix.patch patches/msix.patch
patches/remove_addons.patch patches/remove_addons.patch
patches/rfp-spoof-dpr-to-2.patch
patches/sed-patches/allow-searchengines-non-esr.patch patches/sed-patches/allow-searchengines-non-esr.patch
patches/sed-patches/disable-pocket.patch patches/sed-patches/disable-pocket.patch
patches/sed-patches/stop-undesired-requests.patch patches/sed-patches/stop-undesired-requests.patch

View file

@ -0,0 +1,13 @@
diff --git a/dom/base/nsGlobalWindowInner.cpp b/dom/base/nsGlobalWindowInner.cpp
index 3a97351..c15f9a4 100644
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -3616,7 +3616,7 @@ double nsGlobalWindowInner::GetDevicePixelRatio(CallerType aCallerType,
nsAutoCString origin;
nsresult rv = this->GetPrincipal()->GetOrigin(origin);
if (NS_FAILED(rv) || origin != "resource://pdf.js"_ns) {
- return 1.0;
+ return 2.0;
}
}