Fix print preview. r=rods sr = attinasi bug =117072. Only control backgrounds painting for printing.

This commit is contained in:
dcone%netscape.com 2002-01-15 22:37:15 +00:00
parent 38abf18e5f
commit 998f5ccf40
2 changed files with 8 additions and 2 deletions

View File

@ -2585,7 +2585,10 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
// if we are printing, bail for now
PRBool canDrawBackground;
aPresContext->GetBackgroundDraw(canDrawBackground);
if(!canDrawBackground){
nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);
// only turn off background printing if we are currently printing.
if(!canDrawBackground && thePrinterContext){
return;
}

View File

@ -2585,7 +2585,10 @@ nsCSSRendering::PaintBackgroundWithSC(nsIPresContext* aPresContext,
// if we are printing, bail for now
PRBool canDrawBackground;
aPresContext->GetBackgroundDraw(canDrawBackground);
if(!canDrawBackground){
nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);
// only turn off background printing if we are currently printing.
if(!canDrawBackground && thePrinterContext){
return;
}