mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
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:
parent
411ab80ce3
commit
4cd1d90fac
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user