Bug 1155880 part 3: Rename nsTableFrame::GetColumnWidth to use "ISize" instead of "Width". r=jfkthame

This commit is contained in:
Daniel Holbert 2015-04-18 16:01:27 -07:00
Родитель d4904872c9
Коммит 2557a4c19e
3 изменённых файлов: 13 добавлений и 13 удалений

Просмотреть файл

@ -1444,7 +1444,7 @@ nsTableFrame::SetColumnDimensions(nscoord aHeight,
if (NS_STYLE_DISPLAY_TABLE_COLUMN ==
colFrame->StyleDisplay()->mDisplay) {
NS_ASSERTION(colX < GetColCount(), "invalid number of columns");
nscoord colWidth = GetColumnWidth(colX);
nscoord colWidth = GetColumnISize(colX);
nsRect colRect(colOrigin.x, colOrigin.y, colWidth, colHeight);
colFrame->SetRect(colRect);
cellSpacingX = GetColSpacing(colX);
@ -2179,7 +2179,7 @@ nsTableFrame::GetCollapsedWidth(nsMargin aBorderPadding)
if (NS_STYLE_DISPLAY_TABLE_COLUMN == colDisplay->mDisplay) {
const nsStyleVisibility* colVis = colFrame->StyleVisibility();
bool collapseCol = (NS_STYLE_VISIBILITY_COLLAPSE == colVis->mVisible);
int32_t colWidth = GetColumnWidth(colX);
int32_t colWidth = GetColumnISize(colX);
if (!collapseGroup && !collapseCol) {
width += colWidth;
if (ColumnHasCellSpacingBefore(colX))
@ -3540,14 +3540,14 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
ResizeCells(*this);
}
int32_t nsTableFrame::GetColumnWidth(int32_t aColIndex)
int32_t nsTableFrame::GetColumnISize(int32_t aColIndex)
{
nsTableFrame* firstInFlow = static_cast<nsTableFrame*>(FirstInFlow());
if (this == firstInFlow) {
nsTableColFrame* colFrame = GetColFrame(aColIndex);
return colFrame ? colFrame->GetFinalISize() : 0;
}
return firstInFlow->GetColumnWidth(aColIndex);
return firstInFlow->GetColumnISize(aColIndex);
}
nscoord nsTableFrame::GetColSpacing()
@ -3812,7 +3812,7 @@ nsTableFrame::Dump(bool aDumpRows,
int32_t numCols = GetColCount();
int32_t colX;
for (colX = 0; colX < numCols; colX++) {
printf("%d ", GetColumnWidth(colX));
printf("%d ", GetColumnISize(colX));
}
printf("\n");

Просмотреть файл

@ -383,8 +383,8 @@ public:
virtual nsresult GetFrameName(nsAString& aResult) const override;
#endif
/** return the width of the column at aColIndex */
int32_t GetColumnWidth(int32_t aColIndex);
/** return the isize of the column at aColIndex */
int32_t GetColumnISize(int32_t aColIndex);
/** Helper to get the column spacing style value.
* The argument refers to the space between column aColIndex and column

Просмотреть файл

@ -682,7 +682,7 @@ CalcAvailWidth(nsTableFrame& aTableFrame,
NS_ASSERTION(colspan > 0, "effective colspan should be positive");
for (int32_t spanX = 0; spanX < colspan; spanX++) {
cellAvailWidth += aTableFrame.GetColumnWidth(colIndex + spanX);
cellAvailWidth += aTableFrame.GetColumnISize(colIndex + spanX);
if (spanX > 0 &&
aTableFrame.ColumnHasCellSpacingBefore(colIndex + spanX)) {
cellAvailWidth += aTableFrame.GetColSpacing(colIndex + spanX - 1);
@ -705,7 +705,7 @@ GetSpaceBetween(int32_t aPrevColIndex,
for (colX = aPrevColIndex + 1; aColIndex > colX; colX++) {
bool isCollapsed = false;
if (!aCheckVisibility) {
space += aTableFrame.GetColumnWidth(colX);
space += aTableFrame.GetColumnISize(colX);
}
else {
nsTableColFrame* colFrame = aTableFrame.GetColFrame(colX);
@ -717,7 +717,7 @@ GetSpaceBetween(int32_t aPrevColIndex,
groupVis->mVisible);
isCollapsed = collapseCol || collapseGroup;
if (!isCollapsed)
space += aTableFrame.GetColumnWidth(colX);
space += aTableFrame.GetColumnISize(colX);
}
if (!isCollapsed && aTableFrame.ColumnHasCellSpacingBefore(colX)) {
space += aTableFrame.GetColSpacing(colX - 1);
@ -729,7 +729,7 @@ GetSpaceBetween(int32_t aPrevColIndex,
for (colX = aPrevColIndex - 1; colX > lastCol; colX--) {
bool isCollapsed = false;
if (!aCheckVisibility) {
space += aTableFrame.GetColumnWidth(colX);
space += aTableFrame.GetColumnISize(colX);
}
else {
nsTableColFrame* colFrame = aTableFrame.GetColFrame(colX);
@ -741,7 +741,7 @@ GetSpaceBetween(int32_t aPrevColIndex,
groupVis->mVisible);
isCollapsed = collapseCol || collapseGroup;
if (!isCollapsed)
space += aTableFrame.GetColumnWidth(colX);
space += aTableFrame.GetColumnISize(colX);
}
if (!isCollapsed && aTableFrame.ColumnHasCellSpacingBefore(colX)) {
space += aTableFrame.GetColSpacing(colX - 1);
@ -1241,7 +1241,7 @@ nsTableRowFrame::CollapseRowIfNecessary(nscoord aRowOffset,
groupVis->mVisible);
bool isCollapsed = collapseCol || collapseGroup;
if (!isCollapsed) {
cRect.width += tableFrame->GetColumnWidth(colX);
cRect.width += tableFrame->GetColumnISize(colX);
isVisible = true;
if ((actualColSpan > 1)) {
nsTableColFrame* nextColFrame =