зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
743fc83ba1
Коммит
326d24abca
|
@ -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,
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<table><colgroup></colgroup></table>
|
||||
</body>
|
||||
</html>
|
|
@ -71,6 +71,7 @@ load 403579-1.html
|
|||
load 404301-1.xhtml
|
||||
load 408753-1.xhtml
|
||||
load 411582.xhtml
|
||||
load 413091.xhtml
|
||||
load 413180-1.html
|
||||
load 416845-1.xhtml
|
||||
load 416845-2.xhtml
|
||||
|
|
|
@ -4054,6 +4054,9 @@ nsTableFrame::ColumnHasCellSpacingBefore(PRInt32 aColIndex) const
|
|||
// as they load, we assume that all columns are significant.
|
||||
if (LayoutStrategy()->GetType() == nsITableLayoutStrategy::Fixed)
|
||||
return PR_TRUE;
|
||||
// the first column is always significant
|
||||
if (aColIndex == 0)
|
||||
return PR_TRUE;
|
||||
nsTableCellMap* cellMap = GetCellMap();
|
||||
if (!cellMap)
|
||||
return PR_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче