From 3de996f11f5d525e55109571a27e8778ecaf4bd0 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Tue, 26 Feb 2002 13:29:48 +0000 Subject: [PATCH] Don't call these methods when the PO is not printable. Bug 127639 r=dcone sr=attinas a=asa git-svn-id: svn://10.0.0.236/trunk@115370 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsDocumentViewer.cpp | 10 ++++++---- mozilla/layout/base/nsDocumentViewer.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/mozilla/content/base/src/nsDocumentViewer.cpp b/mozilla/content/base/src/nsDocumentViewer.cpp index 7fa8e585b0e..101ed1f2f33 100644 --- a/mozilla/content/base/src/nsDocumentViewer.cpp +++ b/mozilla/content/base/src/nsDocumentViewer.cpp @@ -5024,11 +5024,13 @@ DocumentViewerImpl::ShowDocList(PrintObject* aPO, PRBool aShow) { NS_ASSERTION(aPO, "Pointer is null!"); - PRBool donePrinting; - DoPrint(aPO, PR_FALSE, donePrinting); + if (aPO->IsPrintable()) { + PRBool donePrinting; + DoPrint(aPO, PR_FALSE, donePrinting); - if (aPO->mWindow != nsnull) { - aPO->mWindow->Show(aShow); + if (aPO->mWindow != nsnull) { + aPO->mWindow->Show(aShow); + } } PRInt32 cnt = aPO->mKids.Count(); diff --git a/mozilla/layout/base/nsDocumentViewer.cpp b/mozilla/layout/base/nsDocumentViewer.cpp index 7fa8e585b0e..101ed1f2f33 100644 --- a/mozilla/layout/base/nsDocumentViewer.cpp +++ b/mozilla/layout/base/nsDocumentViewer.cpp @@ -5024,11 +5024,13 @@ DocumentViewerImpl::ShowDocList(PrintObject* aPO, PRBool aShow) { NS_ASSERTION(aPO, "Pointer is null!"); - PRBool donePrinting; - DoPrint(aPO, PR_FALSE, donePrinting); + if (aPO->IsPrintable()) { + PRBool donePrinting; + DoPrint(aPO, PR_FALSE, donePrinting); - if (aPO->mWindow != nsnull) { - aPO->mWindow->Show(aShow); + if (aPO->mWindow != nsnull) { + aPO->mWindow->Show(aShow); + } } PRInt32 cnt = aPO->mKids.Count();