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

git-svn-id: svn://10.0.0.236/trunk@13596 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1998-10-28 04:11:14 +00:00
parent 08a6bbac38
commit 413a084535
2 changed files with 14 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;