From b13d36e80c1d496a13ccbfed774007f7f819632d Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Tue, 13 Apr 1999 21:52:19 +0000 Subject: [PATCH] Updated to use new image loading apis git-svn-id: svn://10.0.0.236/trunk@27391 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSRendering.cpp | 15 ++++++--------- mozilla/layout/html/style/src/nsCSSRendering.cpp | 15 ++++++--------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index f767b811691..d4516888ba2 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -162,6 +162,7 @@ nscolor nsCSSRendering::MakeBevelColor(PRIntn whichSide, PRUint8 style, theColor = colors[0]; break; case NS_SIDE_LEFT: + default: theColor = colors[0]; break; } @@ -1685,16 +1686,15 @@ nsCSSRendering::PaintBackground(nsIPresContext& aPresContext, nsIFrameImageLoader* loader = nsnull; PRBool transparentBG = NS_STYLE_BG_COLOR_TRANSPARENT == (aColor.mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT); - nsSize loadSize(0, 0); nsresult rv = aPresContext.StartLoadImage(aColor.mBackgroundImage, transparentBG ? nsnull : &aColor.mBackgroundColor, - aForFrame, loadSize, nsnull, - PR_FALSE, PR_FALSE, &loader); + aForFrame, nsnull, nsnull, + &loader); if ((NS_OK != rv) || (nsnull == loader) || - (loader->GetImage(image), (nsnull == image))) { + (loader->GetImage(&image), (nsnull == image))) { NS_IF_RELEASE(loader); // Redraw will happen later if (!transparentBG) { @@ -1714,11 +1714,8 @@ nsCSSRendering::PaintBackground(nsIPresContext& aPresContext, } #endif - // Convert image dimensions into nscoord's - float p2t; - aPresContext.GetScaledPixelsToTwips(&p2t); - nscoord tileWidth = NSIntPixelsToTwips(imageSize.width, p2t); - nscoord tileHeight = NSIntPixelsToTwips(imageSize.height, p2t); + nscoord tileWidth = imageSize.width; + nscoord tileHeight = imageSize.height; if ((tileWidth == 0) || (tileHeight == 0)) { return; } diff --git a/mozilla/layout/html/style/src/nsCSSRendering.cpp b/mozilla/layout/html/style/src/nsCSSRendering.cpp index f767b811691..d4516888ba2 100644 --- a/mozilla/layout/html/style/src/nsCSSRendering.cpp +++ b/mozilla/layout/html/style/src/nsCSSRendering.cpp @@ -162,6 +162,7 @@ nscolor nsCSSRendering::MakeBevelColor(PRIntn whichSide, PRUint8 style, theColor = colors[0]; break; case NS_SIDE_LEFT: + default: theColor = colors[0]; break; } @@ -1685,16 +1686,15 @@ nsCSSRendering::PaintBackground(nsIPresContext& aPresContext, nsIFrameImageLoader* loader = nsnull; PRBool transparentBG = NS_STYLE_BG_COLOR_TRANSPARENT == (aColor.mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT); - nsSize loadSize(0, 0); nsresult rv = aPresContext.StartLoadImage(aColor.mBackgroundImage, transparentBG ? nsnull : &aColor.mBackgroundColor, - aForFrame, loadSize, nsnull, - PR_FALSE, PR_FALSE, &loader); + aForFrame, nsnull, nsnull, + &loader); if ((NS_OK != rv) || (nsnull == loader) || - (loader->GetImage(image), (nsnull == image))) { + (loader->GetImage(&image), (nsnull == image))) { NS_IF_RELEASE(loader); // Redraw will happen later if (!transparentBG) { @@ -1714,11 +1714,8 @@ nsCSSRendering::PaintBackground(nsIPresContext& aPresContext, } #endif - // Convert image dimensions into nscoord's - float p2t; - aPresContext.GetScaledPixelsToTwips(&p2t); - nscoord tileWidth = NSIntPixelsToTwips(imageSize.width, p2t); - nscoord tileHeight = NSIntPixelsToTwips(imageSize.height, p2t); + nscoord tileWidth = imageSize.width; + nscoord tileHeight = imageSize.height; if ((tileWidth == 0) || (tileHeight == 0)) { return; }