Fixed up area frame sizing calculations to properly compute the final height

This commit is contained in:
kipp%netscape.com 1999-03-25 03:48:30 +00:00
Родитель 2e33bbba23
Коммит a171a9999d
2 изменённых файлов: 8 добавлений и 6 удалений

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

@ -518,11 +518,12 @@ nsAreaFrame::Reflow(nsIPresContext& aPresContext,
// frame has a height specified by CSS then we don't do this!
if ((NS_UNCONSTRAINEDSIZE == reflowState.computedHeight) &&
(NS_FRAME_OUTSIDE_CHILDREN & mState)) {
nscoord contentYMost = aDesiredSize.height -
aReflowState.mComputedBorderPadding.bottom;
nscoord contentYMost = aDesiredSize.height;
nscoord yMost = aDesiredSize.mCombinedArea.YMost();
if (yMost > contentYMost) {
aDesiredSize.height += yMost - contentYMost;
// retain the border+padding for this element after the bottom
// most object.
aDesiredSize.height = yMost;
}
}

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

@ -518,11 +518,12 @@ nsAreaFrame::Reflow(nsIPresContext& aPresContext,
// frame has a height specified by CSS then we don't do this!
if ((NS_UNCONSTRAINEDSIZE == reflowState.computedHeight) &&
(NS_FRAME_OUTSIDE_CHILDREN & mState)) {
nscoord contentYMost = aDesiredSize.height -
aReflowState.mComputedBorderPadding.bottom;
nscoord contentYMost = aDesiredSize.height;
nscoord yMost = aDesiredSize.mCombinedArea.YMost();
if (yMost > contentYMost) {
aDesiredSize.height += yMost - contentYMost;
// retain the border+padding for this element after the bottom
// most object.
aDesiredSize.height = yMost;
}
}