Bug 51576: Fix a crash when resizing browser to zero height or width for frameset pages; Fix thanks to tobias.weibel@gmx.net; r=self, jst, vidur

This commit is contained in:
pollmann%netscape.com 2000-09-21 05:07:06 +00:00
parent 6f858a7d0d
commit 54719150b3
2 changed files with 8 additions and 0 deletions

View File

@ -959,8 +959,12 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext* aPresContext,
// only borders between <frame>s. There are none on the edges (e.g the
// leftmost <frame> has no left border).
PRInt32 borderWidth = GetBorderWidth(aPresContext);
width -= (mNumCols - 1) * borderWidth;
if (width < 0) width = 0;
height -= (mNumRows - 1) * borderWidth;
if (height < 0) height = 0;
if (!mDrag.mActive && ( (firstTime) ||
( (mRect.width != 0) && (mRect.height != 0) &&

View File

@ -959,8 +959,12 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext* aPresContext,
// only borders between <frame>s. There are none on the edges (e.g the
// leftmost <frame> has no left border).
PRInt32 borderWidth = GetBorderWidth(aPresContext);
width -= (mNumCols - 1) * borderWidth;
if (width < 0) width = 0;
height -= (mNumRows - 1) * borderWidth;
if (height < 0) height = 0;
if (!mDrag.mActive && ( (firstTime) ||
( (mRect.width != 0) && (mRect.height != 0) &&