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,