@@ -28,7 +28,7 @@ index a2b3e60fe5..faa0c113bc 100644
2828+ LOCAL_INCLUDES += ["/camoucfg"]
2929\ No newline at end of file
3030diff --git a/gfx/src/nsDeviceContext.cpp b/gfx/src/nsDeviceContext.cpp
31- index 7a4fa8d48f..1f560937a3 100644
31+ index 7a4fa8d48f..408b754d92 100644
3232--- a/gfx/src/nsDeviceContext.cpp
3333+++ b/gfx/src/nsDeviceContext.cpp
3434@@ -5,6 +5,7 @@
@@ -39,19 +39,36 @@ index 7a4fa8d48f..1f560937a3 100644
3939 #include <algorithm> // for max
4040 #include "gfxContext.h"
4141 #include "gfxPoint.h" // for gfxSize
42- @@ -177,6 +178,15 @@ bool nsDeviceContext::GetScreenIsHDR() {
42+ @@ -177,6 +178,13 @@ bool nsDeviceContext::GetScreenIsHDR() {
4343 }
4444
4545 nsSize nsDeviceContext::GetDeviceSurfaceDimensions() {
4646+ // Check for height and width overrides from MaskConfig
4747+ if (auto height = MaskConfig::GetInt32("screen.height"),
4848+ width = MaskConfig::GetInt32("screen.width");
4949+ 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()));
5351+ return outRect.Size();
5452+ }
5553 return GetRect().Size();
5654 }
5755
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