From 4a0c9a9c7ea2ecc5bf08af706eb90226dda4c2c3 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Tue, 28 May 2019 15:26:59 +0100 Subject: [PATCH] Bug 1557434. Remove nsPrintObject::mPrintPreview. r=bobowen Differential Revision: https://phabricator.services.mozilla.com/D34134 --HG-- extra : rebase_source : b02b90a21ed16fce0189b0aa317743f01570f57a extra : amend_source : ad608df1346b8ce0bd2ef43305764407008e8e5f --- layout/printing/nsPrintJob.cpp | 5 ++--- layout/printing/nsPrintObject.cpp | 5 ----- layout/printing/nsPrintObject.h | 3 +-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/layout/printing/nsPrintJob.cpp b/layout/printing/nsPrintJob.cpp index f010ed285cfb..7bc20d71a4d4 100644 --- a/layout/printing/nsPrintJob.cpp +++ b/layout/printing/nsPrintJob.cpp @@ -468,9 +468,8 @@ static void BuildNestedPrintObjects(BrowsingContext* aBrowsingContext, continue; } auto childPO = MakeUnique(); - nsresult rv = childPO->InitAsNestedObject(childBC->GetDocShell(), - window->GetExtantDoc(), - aPO->mPrintPreview, aPO.get()); + nsresult rv = childPO->InitAsNestedObject( + childBC->GetDocShell(), window->GetExtantDoc(), aPO.get()); if (NS_FAILED(rv)) { MOZ_ASSERT_UNREACHABLE("Init failed?"); } diff --git a/layout/printing/nsPrintObject.cpp b/layout/printing/nsPrintObject.cpp index 39f3bd4ae7f0..6c6df39917ca 100644 --- a/layout/printing/nsPrintObject.cpp +++ b/layout/printing/nsPrintObject.cpp @@ -38,7 +38,6 @@ nsPrintObject::nsPrintObject() mDontPrint(true), mPrintAsIs(false), mInvisible(false), - mPrintPreview(false), mDidCreateDocShell(false), mShrinkRatio(1.0), mZoomRatio(1.0) { @@ -101,14 +100,11 @@ nsresult nsPrintObject::InitAsRootObject(nsIDocShell* aDocShell, Document* aDoc, NS_ENSURE_STATE(viewer); viewer->SetDocument(mDocument); - mPrintPreview = aForPrintPreview; - return NS_OK; } nsresult nsPrintObject::InitAsNestedObject(nsIDocShell* aDocShell, Document* aDoc, - bool aForPrintPreview, nsPrintObject* aParent) { NS_ENSURE_STATE(aDocShell); NS_ENSURE_STATE(aDoc); @@ -116,7 +112,6 @@ nsresult nsPrintObject::InitAsNestedObject(nsIDocShell* aDocShell, mParent = aParent; mDocShell = aDocShell; mDocument = aDoc; - mPrintPreview = aForPrintPreview; nsCOMPtr window = aDoc->GetWindow(); mContent = window->GetFrameElementInternal(); diff --git a/layout/printing/nsPrintObject.h b/layout/printing/nsPrintObject.h index c34eff7e10cb..4d5d46517fc1 100644 --- a/layout/printing/nsPrintObject.h +++ b/layout/printing/nsPrintObject.h @@ -38,7 +38,7 @@ class nsPrintObject { bool aForPrintPreview); nsresult InitAsNestedObject(nsIDocShell* aDocShell, mozilla::dom::Document* aDoc, - bool aForPrintPreview, nsPrintObject* aParent); + nsPrintObject* aParent); bool IsPrintable() { return !mDontPrint; } void DestroyPresentation(); @@ -61,7 +61,6 @@ class nsPrintObject { bool mDontPrint; bool mPrintAsIs; bool mInvisible; // Indicates PO is set to not visible by CSS - bool mPrintPreview; bool mDidCreateDocShell; float mShrinkRatio; float mZoomRatio;