From 40b05ee2d699fbee94b753c33c730c56ec1b8b70 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Mon, 7 Jan 2002 20:02:19 +0000 Subject: [PATCH] Fix for 118550, I screwed up minwidth and minheight on boxes. Somewhere evaughan is rolling over in his grave. r=jag, sr=ben --- layout/xul/base/src/nsBox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/xul/base/src/nsBox.cpp b/layout/xul/base/src/nsBox.cpp index 890b7379cd67..48f82fe32a3e 100644 --- a/layout/xul/base/src/nsBox.cpp +++ b/layout/xul/base/src/nsBox.cpp @@ -1312,7 +1312,7 @@ nsIBox::AddCSSMinSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize) // we will assume 0 means not set. if (position->mMinWidth.GetUnit() == eStyleUnit_Coord) { nscoord min = position->mMinWidth.GetCoordValue(); - if (min && min > aSize.width) { + if (min && (!widthSet || min > aSize.width)) { aSize.width = min; widthSet = PR_TRUE; } @@ -1320,7 +1320,7 @@ nsIBox::AddCSSMinSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize) if (position->mMinHeight.GetUnit() == eStyleUnit_Coord) { nscoord min = position->mMinHeight.GetCoordValue(); - if (min && min > aSize.height) { + if (min && (!heightSet || min > aSize.height)) { aSize.height = min; heightSet = PR_TRUE; }