mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
makes sure the views for the pages that are not being printed are completely hidden
Bug 83138 r=kmclusk sr=attinasi a=dbaron
This commit is contained in:
parent
3740f9b3fe
commit
bf413d89a7
@ -568,9 +568,13 @@ nsSimplePageSequenceFrame::StartPrint(nsIPresContext* aPresContext,
|
|||||||
page->GetView(aPresContext, &view);
|
page->GetView(aPresContext, &view);
|
||||||
NS_ASSERTION(nsnull != view, "no page view");
|
NS_ASSERTION(nsnull != view, "no page view");
|
||||||
if (pageNum < mFromPageNum || pageNum > mToPageNum) {
|
if (pageNum < mFromPageNum || pageNum > mToPageNum) {
|
||||||
// XXX Doesn't seem like we need to do this
|
// Hide the pages that won't be printed to the Viewmanager
|
||||||
// because we ask only the pages we want to print
|
// doesn't put them in the display list. Also, makde
|
||||||
//view->SetVisibility(nsViewVisibility_kHide);
|
// sure the child views don't get asked to print
|
||||||
|
// but my guess is that there won't be any
|
||||||
|
view->SetVisibility(nsViewVisibility_kHide);
|
||||||
|
view->SetChildClip(0,0,0,0);
|
||||||
|
view->SetViewFlags(NS_VIEW_PUBLIC_FLAG_CLIPCHILDREN);
|
||||||
} else {
|
} else {
|
||||||
nsRect rect;
|
nsRect rect;
|
||||||
page->GetRect(rect);
|
page->GetRect(rect);
|
||||||
|
@ -568,9 +568,13 @@ nsSimplePageSequenceFrame::StartPrint(nsIPresContext* aPresContext,
|
|||||||
page->GetView(aPresContext, &view);
|
page->GetView(aPresContext, &view);
|
||||||
NS_ASSERTION(nsnull != view, "no page view");
|
NS_ASSERTION(nsnull != view, "no page view");
|
||||||
if (pageNum < mFromPageNum || pageNum > mToPageNum) {
|
if (pageNum < mFromPageNum || pageNum > mToPageNum) {
|
||||||
// XXX Doesn't seem like we need to do this
|
// Hide the pages that won't be printed to the Viewmanager
|
||||||
// because we ask only the pages we want to print
|
// doesn't put them in the display list. Also, makde
|
||||||
//view->SetVisibility(nsViewVisibility_kHide);
|
// sure the child views don't get asked to print
|
||||||
|
// but my guess is that there won't be any
|
||||||
|
view->SetVisibility(nsViewVisibility_kHide);
|
||||||
|
view->SetChildClip(0,0,0,0);
|
||||||
|
view->SetViewFlags(NS_VIEW_PUBLIC_FLAG_CLIPCHILDREN);
|
||||||
} else {
|
} else {
|
||||||
nsRect rect;
|
nsRect rect;
|
||||||
page->GetRect(rect);
|
page->GetRect(rect);
|
||||||
|
Loading…
Reference in New Issue
Block a user