Bug 1557434. Remove nsPrintObject::mPrintPreview. r=bobowen

Differential Revision: https://phabricator.services.mozilla.com/D34134

--HG--
extra : rebase_source : b02b90a21ed16fce0189b0aa317743f01570f57a
extra : amend_source : ad608df1346b8ce0bd2ef43305764407008e8e5f
This commit is contained in:
Jonathan Watt 2019-05-28 15:26:59 +01:00
parent 1972449751
commit 4a0c9a9c7e
3 changed files with 3 additions and 10 deletions

View File

@ -468,9 +468,8 @@ static void BuildNestedPrintObjects(BrowsingContext* aBrowsingContext,
continue;
}
auto childPO = MakeUnique<nsPrintObject>();
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?");
}

View File

@ -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<nsPIDOMWindowOuter> window = aDoc->GetWindow();
mContent = window->GetFrameElementInternal();

View File

@ -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;