From 61b22999737dcbf5a9c854b26a67e883bebcdbcb Mon Sep 17 00:00:00 2001 From: "dcone%netscape.com" Date: Fri, 25 Jun 1999 14:48:37 +0000 Subject: [PATCH] Fixed a bug that double prints git-svn-id: svn://10.0.0.236/trunk@36895 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsSimplePageSequence.cpp | 6 ++++++ mozilla/layout/html/base/src/nsSimplePageSequence.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/mozilla/layout/generic/nsSimplePageSequence.cpp b/mozilla/layout/generic/nsSimplePageSequence.cpp index 67abf96457c..0a639b12d73 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.cpp +++ b/mozilla/layout/generic/nsSimplePageSequence.cpp @@ -427,6 +427,12 @@ nsSimplePageSequenceFrame::Print(nsIPresContext& aPresContext, page->GetView(&view); NS_ASSERTION(nsnull != view, "no page view"); vm->Display(view); + + // this view was printed and since display set the origin + // 0,0 there is a danger that this view can be printed again + // If it is a sibling to another page/view. Setting the visibility + // to hide will keep this page from printing again - dwc + view->SetVisibility(nsViewVisibility_kHide); // Finish printing of the page if (!SendStatusNotification(aStatusCallback, pageNum, totalPages, diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp index 67abf96457c..0a639b12d73 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp @@ -427,6 +427,12 @@ nsSimplePageSequenceFrame::Print(nsIPresContext& aPresContext, page->GetView(&view); NS_ASSERTION(nsnull != view, "no page view"); vm->Display(view); + + // this view was printed and since display set the origin + // 0,0 there is a danger that this view can be printed again + // If it is a sibling to another page/view. Setting the visibility + // to hide will keep this page from printing again - dwc + view->SetVisibility(nsViewVisibility_kHide); // Finish printing of the page if (!SendStatusNotification(aStatusCallback, pageNum, totalPages,