b=26184 r=karnaze@netscape.com Changed it so that for a percentage width based

floater if the containing block width is unconstrained we use NS_UNCONSTRAINEDSIZE
for the floater's computed width. We were using 0 and this was causing table column
widths to be incorrect
This commit is contained in:
troy%netscape.com 2000-02-13 17:55:18 +00:00
parent 34a85af798
commit e548878b47
2 changed files with 20 additions and 4 deletions

View File

@ -1019,8 +1019,16 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
}
}
#else
// A specified value of 'auto' becomes a computed width of 0
mComputedWidth = 0;
// A specified value of 'auto' becomes a computed width of 0. However,
// if it's an unconstrained reflow then a percentage value becomes
// unconstrained as well
if ((NS_UNCONSTRAINEDSIZE == aContainingBlockWidth) &&
(eStyleUnit_Percent == mStylePosition->mWidth.GetUnit())) {
mComputedWidth = NS_UNCONSTRAINEDSIZE;
} else {
mComputedWidth = 0;
}
#endif
} else {
ComputeHorizontalValue(aContainingBlockWidth, widthUnit,

View File

@ -1019,8 +1019,16 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
}
}
#else
// A specified value of 'auto' becomes a computed width of 0
mComputedWidth = 0;
// A specified value of 'auto' becomes a computed width of 0. However,
// if it's an unconstrained reflow then a percentage value becomes
// unconstrained as well
if ((NS_UNCONSTRAINEDSIZE == aContainingBlockWidth) &&
(eStyleUnit_Percent == mStylePosition->mWidth.GetUnit())) {
mComputedWidth = NS_UNCONSTRAINEDSIZE;
} else {
mComputedWidth = 0;
}
#endif
} else {
ComputeHorizontalValue(aContainingBlockWidth, widthUnit,