Bug 1124636: use min/maxBSize instead of Height in nsFieldSetFrame, r=jfkthame

This commit is contained in:
Simon Montagu 2015-01-25 01:56:36 -08:00
parent 736343bcdf
commit 19131f1212

View File

@ -480,19 +480,19 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
// Our child is "height:100%" but we actually want its height to be reduced
// by the amount of content-height the legend is eating up, unless our
// height is unconstrained (in which case the child's will be too).
if (aReflowState.ComputedHeight() != NS_UNCONSTRAINEDSIZE) {
kidReflowState.SetComputedHeight(
std::max(0, aReflowState.ComputedHeight() - mLegendSpace));
if (aReflowState.ComputedBSize() != NS_UNCONSTRAINEDSIZE) {
kidReflowState.SetComputedBSize(
std::max(0, aReflowState.ComputedBSize() - mLegendSpace));
}
if (aReflowState.ComputedMinHeight() > 0) {
kidReflowState.ComputedMinHeight() =
std::max(0, aReflowState.ComputedMinHeight() - mLegendSpace);
if (aReflowState.ComputedMinBSize() > 0) {
kidReflowState.ComputedMinBSize() =
std::max(0, aReflowState.ComputedMinBSize() - mLegendSpace);
}
if (aReflowState.ComputedMaxHeight() != NS_UNCONSTRAINEDSIZE) {
kidReflowState.ComputedMaxHeight() =
std::max(0, aReflowState.ComputedMaxHeight() - mLegendSpace);
if (aReflowState.ComputedMaxBSize() != NS_UNCONSTRAINEDSIZE) {
kidReflowState.ComputedMaxBSize() =
std::max(0, aReflowState.ComputedMaxBSize() - mLegendSpace);
}
nsHTMLReflowMetrics kidDesiredSize(kidReflowState,