summaryrefslogtreecommitdiffstats
path: root/layout/base/ViewportUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--layout/base/ViewportUtils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/layout/base/ViewportUtils.cpp b/layout/base/ViewportUtils.cpp
index f0d18510bf..8b8e4a4d27 100644
--- a/layout/base/ViewportUtils.cpp
+++ b/layout/base/ViewportUtils.cpp
@@ -260,6 +260,9 @@ const nsIFrame* ViewportUtils::IsZoomedContentRoot(const nsIFrame* aFrame) {
}
Scale2D ViewportUtils::TryInferEnclosingResolution(PresShell* aShell) {
+ if (!XRE_IsContentProcess()) {
+ return {1.0f, 1.0f};
+ }
MOZ_ASSERT(aShell && aShell->GetPresContext());
MOZ_ASSERT(!aShell->GetPresContext()->GetParentPresContext(),
"TryInferEnclosingResolution can only be called for a root pres "