From d19eff3089b379c8e5aff5b51a7cb6f6f9e2d4c7 Mon Sep 17 00:00:00 2001 From: "pierre%netscape.com" Date: Tue, 20 Apr 1999 04:03:25 +0000 Subject: [PATCH] expands the width and height independently from each other in GetDrawingSurface --- view/src/nsViewManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index 82d130aa79a..ef7312ab74f 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -2171,13 +2171,17 @@ nsDrawingSurface nsViewManager :: GetDrawingSurface(nsIRenderingContext &aContex if ((nsnull == mDrawingSurface) || (mDSBounds.width < aBounds.width) || (mDSBounds.height < aBounds.height)) { + if (aBounds.width < mDSBounds.width) + aBounds.width = mDSBounds.width; + if (aBounds.height < mDSBounds.height) + aBounds.height = mDSBounds.height; + if (nsnull != mDrawingSurface) { //destroy existing DS aContext.DestroyDrawingSurface(mDrawingSurface); mDrawingSurface = nsnull; } - aContext.CreateDrawingSurface(&aBounds, 0, mDrawingSurface); mDSBounds = aBounds; }