bug 33137 - don't use the min width of a cell which is larger than the fixed width of the cell as the basis of the fixed width contributor. r=attinasi.

This commit is contained in:
karnaze%netscape.com 2000-09-07 20:55:03 +00:00
parent ccd277ef33
commit 3f12f0e88a
2 changed files with 22 additions and 16 deletions

View File

@ -764,23 +764,26 @@ BasicTableLayoutStrategy::AssignPreliminaryColumnWidths(nsIPresContext*
nsSize percentBase(aReflowState.mComputedWidth, 0);
nsMargin padding = nsTableFrame::GetPadding(percentBase, cellFrame);
nscoord newFixWidth = coordValue + padding.left + padding.right;
// 2nd part of condition is Nav Quirk like below
// 2nd part of condition is Nav/IE Quirk like below
if ((newFixWidth > fixWidth) || ((newFixWidth == fixWidth) && (desContributor == cellFrame))) {
fixWidth = newFixWidth;
fixContributor = cellFrame;
}
fixWidth = PR_MAX(fixWidth, minWidth);
}
}
}
desWidth = PR_MAX(desWidth, minWidth);
// Nav Quirk like above
if ((fixWidth > 0) && (desWidth > fixWidth) && (fixContributor != desContributor)) {
fixWidth = WIDTH_NOT_SET;
fixContributor = nsnull;
// Nav/IE Quirk like above
if (fixWidth > 0) {
if ((desWidth > fixWidth) && (fixContributor != desContributor)) {
fixWidth = WIDTH_NOT_SET;
fixContributor = nsnull;
}
else {
fixWidth = PR_MAX(fixWidth, minWidth);
}
}
desWidth = PR_MAX(desWidth, minWidth);
// cache the computed column info
colFrame->SetWidth(MIN_CON, minWidth);

View File

@ -764,23 +764,26 @@ BasicTableLayoutStrategy::AssignPreliminaryColumnWidths(nsIPresContext*
nsSize percentBase(aReflowState.mComputedWidth, 0);
nsMargin padding = nsTableFrame::GetPadding(percentBase, cellFrame);
nscoord newFixWidth = coordValue + padding.left + padding.right;
// 2nd part of condition is Nav Quirk like below
// 2nd part of condition is Nav/IE Quirk like below
if ((newFixWidth > fixWidth) || ((newFixWidth == fixWidth) && (desContributor == cellFrame))) {
fixWidth = newFixWidth;
fixContributor = cellFrame;
}
fixWidth = PR_MAX(fixWidth, minWidth);
}
}
}
desWidth = PR_MAX(desWidth, minWidth);
// Nav Quirk like above
if ((fixWidth > 0) && (desWidth > fixWidth) && (fixContributor != desContributor)) {
fixWidth = WIDTH_NOT_SET;
fixContributor = nsnull;
// Nav/IE Quirk like above
if (fixWidth > 0) {
if ((desWidth > fixWidth) && (fixContributor != desContributor)) {
fixWidth = WIDTH_NOT_SET;
fixContributor = nsnull;
}
else {
fixWidth = PR_MAX(fixWidth, minWidth);
}
}
desWidth = PR_MAX(desWidth, minWidth);
// cache the computed column info
colFrame->SetWidth(MIN_CON, minWidth);