Fixed printing to make sure all URL's are loaded before print.

Fixed the background tile render'er to save and restore clip.


git-svn-id: svn://10.0.0.236/trunk@39530 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dcone%netscape.com
1999-07-15 14:23:40 +00:00
parent 7a807b9a02
commit 1b730ce55e
5 changed files with 560 additions and 67 deletions

View File

@@ -2000,6 +2000,16 @@ nsCSSRendering::PaintBackground(nsIPresContext& aPresContext,
srcRect.width = tileWidth;
srcRect.height = tileHeight;
// create a bigger tile
// XXX pushing state to fix clipping problem, need to look into why the clip is set here
aRenderingContext.PushState();
PRBool clip;
nsRect clipRect;
clipRect = srcRect;
clipRect.width = x1-x0;
clipRect.height = y1-y0;
aRenderingContext.SetClipRect(clipRect, nsClipCombine_kReplace, clip);
// copy the initial image to our buffer
aRenderingContext.DrawImage(image,srcRect.x,srcRect.y,tileWidth,tileHeight);
//if(anchor.x<0) {
@@ -2016,11 +2026,15 @@ nsCSSRendering::PaintBackground(nsIPresContext& aPresContext,
}
}
// create a bigger tile
aRenderingContext.GetDrawingSurface(&theSurface);
TileImage(aRenderingContext,theSurface,srcRect,x1-x0,y1-y0,flag);
// use the tile to fill in the rest of the image
// setting back the clip from the background clip push
aRenderingContext.PopState(clip);
// use the tile to fill in the rest of the image
destRect = srcRect;
for(y=srcRect.y;y<y1;y+=srcRect.height){