mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
fixed table layout add cellspacing only for columns where cells originate. bug 220653 r/sr=bzbarsky
This commit is contained in:
parent
ff346bd62f
commit
bbed1b51f3
@ -79,11 +79,18 @@ FixedTableLayoutStrategy::AssignNonPctColumnWidths(nsIPresContext* aPre
|
||||
PRInt32 colX;
|
||||
// availWidth is used as the basis for percentage width columns. It is aComputedWidth
|
||||
// minus table border, padding, & cellspacing
|
||||
nscoord spacingX = mTableFrame->GetCellSpacingX();
|
||||
mCellSpacingTotal = spacingX;
|
||||
for (colX = 0; colX < numCols; colX++){
|
||||
if (mTableFrame->GetNumCellsOriginatingInCol(colX) > 0) {
|
||||
mCellSpacingTotal += spacingX;
|
||||
}
|
||||
}
|
||||
nscoord availWidth = (NS_UNCONSTRAINEDSIZE == aComputedWidth)
|
||||
? NS_UNCONSTRAINEDSIZE
|
||||
: aComputedWidth - aReflowState.mComputedBorderPadding.left -
|
||||
aReflowState.mComputedBorderPadding.right -
|
||||
((numCols + 1) * mTableFrame->GetCellSpacingX());
|
||||
mCellSpacingTotal;
|
||||
|
||||
PRInt32 specifiedCols = 0; // the number of columns whose width is given
|
||||
nscoord totalColWidth = 0; // the sum of the widths of the columns
|
||||
|
@ -79,11 +79,18 @@ FixedTableLayoutStrategy::AssignNonPctColumnWidths(nsIPresContext* aPre
|
||||
PRInt32 colX;
|
||||
// availWidth is used as the basis for percentage width columns. It is aComputedWidth
|
||||
// minus table border, padding, & cellspacing
|
||||
nscoord spacingX = mTableFrame->GetCellSpacingX();
|
||||
mCellSpacingTotal = spacingX;
|
||||
for (colX = 0; colX < numCols; colX++){
|
||||
if (mTableFrame->GetNumCellsOriginatingInCol(colX) > 0) {
|
||||
mCellSpacingTotal += spacingX;
|
||||
}
|
||||
}
|
||||
nscoord availWidth = (NS_UNCONSTRAINEDSIZE == aComputedWidth)
|
||||
? NS_UNCONSTRAINEDSIZE
|
||||
: aComputedWidth - aReflowState.mComputedBorderPadding.left -
|
||||
aReflowState.mComputedBorderPadding.right -
|
||||
((numCols + 1) * mTableFrame->GetCellSpacingX());
|
||||
mCellSpacingTotal;
|
||||
|
||||
PRInt32 specifiedCols = 0; // the number of columns whose width is given
|
||||
nscoord totalColWidth = 0; // the sum of the widths of the columns
|
||||
|
Loading…
Reference in New Issue
Block a user