Remove eStyleUnit_Chars and the special cases for it throughout layout, and make ch units go through the normal eStyleUnit_Coord cases. (Bug 363706) r+sr=dbaron

This commit is contained in:
Zack Weinberg
2008-07-15 14:31:36 -07:00
parent 8f33e8124a
commit 6071687c64
13 changed files with 25 additions and 128 deletions

View File

@@ -121,7 +121,7 @@ GetWidthInfo(nsIRenderingContext *aRenderingContext,
// XXXldb Should we consider -moz-box-sizing?
nsStyleUnit unit = aStylePos->mWidth.GetUnit();
if (unit == eStyleUnit_Coord || unit == eStyleUnit_Chars) {
if (unit == eStyleUnit_Coord) {
hasSpecifiedWidth = PR_TRUE;
nscoord w = nsLayoutUtils::ComputeWidthValue(aRenderingContext,
aFrame, 0, 0, 0, aStylePos->mWidth);
@@ -171,8 +171,7 @@ GetWidthInfo(nsIRenderingContext *aRenderingContext,
unit = maxWidth.GetUnit();
// XXX To really implement 'max-width' well, we'd need to store
// it separately on the columns.
if (unit == eStyleUnit_Coord || unit == eStyleUnit_Chars ||
unit == eStyleUnit_Enumerated) {
if (unit == eStyleUnit_Coord || unit == eStyleUnit_Enumerated) {
nscoord w =
nsLayoutUtils::ComputeWidthValue(aRenderingContext, aFrame,
0, 0, 0, maxWidth);
@@ -197,8 +196,7 @@ GetWidthInfo(nsIRenderingContext *aRenderingContext,
eStyleUnit_Enumerated);
}
unit = minWidth.GetUnit();
if (unit == eStyleUnit_Coord || unit == eStyleUnit_Chars ||
unit == eStyleUnit_Enumerated) {
if (unit == eStyleUnit_Coord || unit == eStyleUnit_Enumerated) {
nscoord w =
nsLayoutUtils::ComputeWidthValue(aRenderingContext, aFrame,
0, 0, 0, minWidth);