@@ -28,7 +28,7 @@ index a2b3e60fe5..faa0c113bc 100644
28
28
+ LOCAL_INCLUDES += ["/camoucfg"]
29
29
\ No newline at end of file
30
30
diff --git a/gfx/src/nsDeviceContext.cpp b/gfx/src/nsDeviceContext.cpp
31
- index 7a4fa8d48f..1f560937a3 100644
31
+ index 7a4fa8d48f..408b754d92 100644
32
32
--- a/gfx/src/nsDeviceContext.cpp
33
33
+++ b/gfx/src/nsDeviceContext.cpp
34
34
@@ -5,6 +5,7 @@
@@ -39,19 +39,36 @@ index 7a4fa8d48f..1f560937a3 100644
39
39
#include <algorithm> // for max
40
40
#include "gfxContext.h"
41
41
#include "gfxPoint.h" // for gfxSize
42
- @@ -177,6 +178,15 @@ bool nsDeviceContext::GetScreenIsHDR() {
42
+ @@ -177,6 +178,13 @@ bool nsDeviceContext::GetScreenIsHDR() {
43
43
}
44
44
45
45
nsSize nsDeviceContext::GetDeviceSurfaceDimensions() {
46
46
+ // Check for height and width overrides from MaskConfig
47
47
+ if (auto height = MaskConfig::GetInt32("screen.height"),
48
48
+ width = MaskConfig::GetInt32("screen.width");
49
49
+ height && width) {
50
- + nsRect outRect = LayoutDeviceIntRect::ToAppUnits(
51
- + LayoutDeviceIntRect(0, 0, width.value(), height.value()),
52
- + AppUnitsPerDevPixel());
50
+ + nsRect outRect = CSSPixel::ToAppUnits(CSSIntRect(0, 0, width.value(), height.value()));
53
51
+ return outRect.Size();
54
52
+ }
55
53
return GetRect().Size();
56
54
}
57
55
56
+ diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
57
+ index f83e2c21ca..5362dd77d4 100644
58
+ --- a/layout/style/nsMediaFeatures.cpp
59
+ +++ b/layout/style/nsMediaFeatures.cpp
60
+ @@ -66,14 +66,6 @@ static nsSize GetDeviceSize(const Document& aDocument) {
61
+ return GetSize(aDocument);
62
+ }
63
+
64
+ - // Media queries in documents in an RDM pane should use the simulated
65
+ - // device size.
66
+ - Maybe<CSSIntSize> deviceSize =
67
+ - nsGlobalWindowOuter::GetRDMDeviceSize(aDocument);
68
+ - if (deviceSize.isSome()) {
69
+ - return CSSPixel::ToAppUnits(deviceSize.value());
70
+ - }
71
+ -
72
+ nsPresContext* pc = aDocument.GetPresContext();
73
+ // NOTE(emilio): We should probably figure out how to return an appropriate
74
+ // device size here, though in a multi-screen world that makes no sense
0 commit comments