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.

git-svn-id: svn://10.0.0.236/trunk@78419 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com 2000-09-07 20:55:03 +00:00
parent fe1232e006
commit 36ea06ba2f
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);