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

git-svn-id: svn://10.0.0.236/trunk@79714 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pollmann%netscape.com 2000-09-21 05:07:06 +00:00
parent 9dc307ae32
commit b64b4cd23b
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) &&