Fix for 118550, I screwed up minwidth and minheight on boxes. Somewhere evaughan is rolling over in his grave. r=jag, sr=ben

This commit is contained in:
hyatt%netscape.com 2002-01-07 20:02:19 +00:00
Родитель 17e7536dd9
Коммит 40b05ee2d6
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1312,7 +1312,7 @@ nsIBox::AddCSSMinSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize)
// we will assume 0 means not set. // we will assume 0 means not set.
if (position->mMinWidth.GetUnit() == eStyleUnit_Coord) { if (position->mMinWidth.GetUnit() == eStyleUnit_Coord) {
nscoord min = position->mMinWidth.GetCoordValue(); nscoord min = position->mMinWidth.GetCoordValue();
if (min && min > aSize.width) { if (min && (!widthSet || min > aSize.width)) {
aSize.width = min; aSize.width = min;
widthSet = PR_TRUE; widthSet = PR_TRUE;
} }
@ -1320,7 +1320,7 @@ nsIBox::AddCSSMinSize(nsBoxLayoutState& aState, nsIBox* aBox, nsSize& aSize)
if (position->mMinHeight.GetUnit() == eStyleUnit_Coord) { if (position->mMinHeight.GetUnit() == eStyleUnit_Coord) {
nscoord min = position->mMinHeight.GetCoordValue(); nscoord min = position->mMinHeight.GetCoordValue();
if (min && min > aSize.height) { if (min && (!heightSet || min > aSize.height)) {
aSize.height = min; aSize.height = min;
heightSet = PR_TRUE; heightSet = PR_TRUE;
} }