diff --git a/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp index a2c2ee2e9ade..2beb3e493cca 100644 --- a/layout/tables/BasicTableLayoutStrategy.cpp +++ b/layout/tables/BasicTableLayoutStrategy.cpp @@ -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, diff --git a/layout/tables/crashtests/413091.xhtml b/layout/tables/crashtests/413091.xhtml new file mode 100644 index 000000000000..d9f6732fbc60 --- /dev/null +++ b/layout/tables/crashtests/413091.xhtml @@ -0,0 +1,7 @@ + +
+ + +