Fixed bug #1154 - made fieldset frame aware of a constrained width on itself and pass that through to a child body

This commit is contained in:
kipp%netscape.com 1998-10-28 04:11:14 +00:00
Родитель 411ab80ce3
Коммит 4cd1d90fac
2 изменённых файлов: 14 добавлений и 4 удалений

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

@ -266,8 +266,13 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
nscoord horTaken = borderPadding.left + borderPadding.right + (2 * minTopBorder) +
legendMargin.left + legendMargin.right;
nscoord verTaken = padding.top + borderPadding.bottom + legendMargin.top + legendMargin.bottom;
if (NS_UNCONSTRAINEDSIZE != availSize.width)
availSize.width -= horTaken;
if (aReflowState.HaveConstrainedWidth()) {
availSize.width = aReflowState.minWidth;
}
else {
if (NS_UNCONSTRAINEDSIZE != availSize.width)
availSize.width -= horTaken;
}
if (NS_UNCONSTRAINEDSIZE != availSize.height) {
// XXX this assumes that the legend is taller than the top border width
availSize.height -= verTaken;

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

@ -266,8 +266,13 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
nscoord horTaken = borderPadding.left + borderPadding.right + (2 * minTopBorder) +
legendMargin.left + legendMargin.right;
nscoord verTaken = padding.top + borderPadding.bottom + legendMargin.top + legendMargin.bottom;
if (NS_UNCONSTRAINEDSIZE != availSize.width)
availSize.width -= horTaken;
if (aReflowState.HaveConstrainedWidth()) {
availSize.width = aReflowState.minWidth;
}
else {
if (NS_UNCONSTRAINEDSIZE != availSize.width)
availSize.width -= horTaken;
}
if (NS_UNCONSTRAINEDSIZE != availSize.height) {
// XXX this assumes that the legend is taller than the top border width
availSize.height -= verTaken;