summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gfx/thebes/PrintTargetWindows.cpp4
-rw-r--r--layout/base/nsDocumentViewer.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/gfx/thebes/PrintTargetWindows.cpp b/gfx/thebes/PrintTargetWindows.cpp
index 4f22adacf..5867a4772 100644
--- a/gfx/thebes/PrintTargetWindows.cpp
+++ b/gfx/thebes/PrintTargetWindows.cpp
@@ -26,6 +26,7 @@ PrintTargetWindows::PrintTargetWindows(cairo_surface_t* aCairoSurface,
/* static */ already_AddRefed<PrintTargetWindows>
PrintTargetWindows::CreateOrNull(HDC aDC)
{
+#ifdef NS_PRINTING
// Figure out the cairo surface size - Windows we need to use the printable
// area of the page. Note: we only scale the printing using the LOGPIXELSY,
// so we use that when calculating the surface width as well as the height.
@@ -51,6 +52,9 @@ PrintTargetWindows::CreateOrNull(HDC aDC)
new PrintTargetWindows(surface, size, aDC);
return target.forget();
+#else
+ return nullptr;
+#endif
}
nsresult
diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp
index 8baf1a464..df0f1266d 100644
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -544,10 +544,12 @@ nsDocumentViewer::~nsDocumentViewer()
mDocument->Destroy();
}
+#ifdef NS_PRINTING
if (mPrintEngine) {
mPrintEngine->Destroy();
mPrintEngine = nullptr;
}
+#endif
MOZ_RELEASE_ASSERT(mDestroyRefCount == 0);
NS_ASSERTION(!mPresShell && !mPresContext,