mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-02-11 05:22:04 -08:00
Fix PW overriding custom screen width/height #89
This commit is contained in:
parent
d11cbe4dee
commit
5dbecfdf20
1 changed files with 18 additions and 1 deletions
|
|
@ -1,5 +1,22 @@
|
||||||
|
diff --git a/dom/base/nsScreen.cpp b/dom/base/nsScreen.cpp
|
||||||
|
index f9ae3bb56c..3af597c40f 100644
|
||||||
|
--- a/dom/base/nsScreen.cpp
|
||||||
|
+++ b/dom/base/nsScreen.cpp
|
||||||
|
@@ -65,6 +65,12 @@ nsDeviceContext* nsScreen::GetDeviceContext() const {
|
||||||
|
}
|
||||||
|
|
||||||
|
CSSIntRect nsScreen::GetRect() {
|
||||||
|
+ // Check for height and width overrides
|
||||||
|
+ if (auto height = MaskConfig::GetInt32("screen.height"),
|
||||||
|
+ width = MaskConfig::GetInt32("screen.width");
|
||||||
|
+ height && width) {
|
||||||
|
+ return {0, 0, width.value(), height.value()};
|
||||||
|
+ }
|
||||||
|
// Return window inner rect to prevent fingerprinting.
|
||||||
|
if (ShouldResistFingerprinting(RFPTarget::ScreenRect)) {
|
||||||
|
return GetTopWindowInnerRectForRFP();
|
||||||
diff --git a/gfx/src/moz.build b/gfx/src/moz.build
|
diff --git a/gfx/src/moz.build b/gfx/src/moz.build
|
||||||
index a2b3e60fe5..56326fc038 100644
|
index a2b3e60fe5..faa0c113bc 100644
|
||||||
--- a/gfx/src/moz.build
|
--- a/gfx/src/moz.build
|
||||||
+++ b/gfx/src/moz.build
|
+++ b/gfx/src/moz.build
|
||||||
@@ -95,3 +95,6 @@ FINAL_LIBRARY = "xul"
|
@@ -95,3 +95,6 @@ FINAL_LIBRARY = "xul"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue