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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user