support for constrained width, height

git-svn-id: svn://10.0.0.236/trunk@13137 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com
1998-10-19 23:02:41 +00:00
parent 5e0237d8a6
commit 298169eb59
6 changed files with 44 additions and 0 deletions

View File

@@ -342,6 +342,9 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
nscoord contentWidth = contentSize.width + borderPadding.left + borderPadding.right;
aDesiredSize.width = (legendWidth > contentWidth) ? legendWidth : contentWidth;
if (aReflowState.HaveConstrainedWidth() && (aReflowState.minWidth > aDesiredSize.width)) {
aDesiredSize.width = aReflowState.minWidth;
}
// Place the legend
nsRect legendRect(0, 0, 0, 0);
@@ -402,6 +405,9 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
aDesiredSize.height = contentTopOffset + contentSize.height + borderPadding.bottom;
if (mInline) // XXX parents don't yet ......
aDesiredSize.height += margin.bottom;
if (aReflowState.HaveConstrainedHeight() && (aReflowState.minHeight > aDesiredSize.height)) {
aDesiredSize.height = aReflowState.minHeight;
}
aDesiredSize.ascent = aDesiredSize.height;
aDesiredSize.descent = 0;
if (nsnull != aDesiredSize.maxElementSize) {