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


git-svn-id: svn://10.0.0.236/trunk@60650 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
2000-02-13 17:55:18 +00:00
parent 0ae6e168b7
commit ed97833d64
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,