bug 413091 - empty first column needs a cellspacing before as we assume always in the code to have cellspacing on the left and right side, r/sr=dbaron

This commit is contained in:
Bernd
2009-04-18 10:22:34 +02:00
parent 1792e9ee38
commit 454af0dc50
4 changed files with 14 additions and 2 deletions

View File

@@ -704,6 +704,7 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
PRInt32 numNonSpecZeroWidthCols = 0;
PRInt32 col;
nsTableCellMap *cellMap = mTableFrame->GetCellMap();
for (col = aFirstCol; col < aFirstCol + aColCount; ++col) {
nsTableColFrame *colFrame = mTableFrame->GetColFrame(col);
if (!colFrame) {
@@ -737,7 +738,7 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
pref_width);
} else if (pref_width == 0) {
if (aWidthType == BTLS_FINAL_WIDTH &&
mTableFrame->ColumnHasCellSpacingBefore(col)) {
cellMap->GetNumCellsOriginatingInCol(col) > 0) {
++numNonSpecZeroWidthCols;
}
} else {
@@ -935,7 +936,7 @@ BasicTableLayoutStrategy::DistributeWidthToColumns(nscoord aWidth,
"when we're setting final width.");
if (pct == 0.0f &&
!colFrame->GetHasSpecifiedCoord() &&
mTableFrame->ColumnHasCellSpacingBefore(col)) {
cellMap->GetNumCellsOriginatingInCol(col) > 0) {
NS_ASSERTION(col_width == 0 &&
colFrame->GetPrefCoord() == 0,