Bug 1176354 - Rename nsTableRowFrame::GetBSize to differentiate better from nsIFrame::BSize. r=dholbert

This commit is contained in:
Jonathan Kew 2015-06-23 13:41:31 -07:00
Родитель d1f05cc84f
Коммит 2a63c0bc82
4 изменённых файлов: 8 добавлений и 8 удалений

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

@ -1839,7 +1839,7 @@ nsTableFrame::Reflow(nsPresContext* aPresContext,
// NS_UNCONSTRAINEDSIZE, but without a style change in between).
aReflowState.IsBResize()) {
// XXX Eventually, we should modify DistributeBSizeToRows to use
// nsTableRowFrame::GetBSize instead of nsIFrame::BSize().
// nsTableRowFrame::GetInitialBSize instead of nsIFrame::BSize().
// That way, it will make its calculations based on internal table
// frame bsizes as they are before they ever had any extra bsize
// distributed to them. In the meantime, this reflows all the
@ -3399,7 +3399,7 @@ nsTableFrame::DistributeBSizeToRows(const nsHTMLReflowState& aReflowState,
LogicalRect rowNormalRect(wm, rowFrame->GetNormalRect(), 0);
nscoord cellSpacingB = GetRowSpacing(rowFrame->GetRowIndex());
if ((amountUsed < aAmount) && rowFrame->HasPctBSize()) {
nscoord pctBSize = rowFrame->GetBSize(pctBasis);
nscoord pctBSize = rowFrame->GetInitialBSize(pctBasis);
nscoord amountForRow = std::min(aAmount - amountUsed,
pctBSize - rowNormalRect.BSize(wm));
if (amountForRow > 0) {

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

@ -412,7 +412,7 @@ nscoord nsTableRowFrame::GetRowBaseline(WritingMode aWM)
}
nscoord
nsTableRowFrame::GetBSize(nscoord aPctBasis) const
nsTableRowFrame::GetInitialBSize(nscoord aPctBasis) const
{
nscoord bsize = 0;
if ((aPctBasis > 0) && HasPctBSize()) {
@ -455,7 +455,7 @@ nsTableRowFrame::UpdateBSize(nscoord aBSize,
if (aBSize != NS_UNCONSTRAINEDSIZE) {
if (!(aCellFrame->HasVerticalAlignBaseline())) { // only the cell's height matters
if (GetBSize() < aBSize) {
if (GetInitialBSize() < aBSize) {
int32_t rowSpan = aTableFrame->GetEffectiveRowSpan(*aCellFrame);
if (rowSpan == 1) {
SetContentBSize(aBSize);
@ -477,7 +477,7 @@ nsTableRowFrame::UpdateBSize(nscoord aBSize,
}
}
// keep the tallest bsize in sync
if (GetBSize() < mMaxCellAscent + mMaxCellDescent) {
if (GetInitialBSize() < mMaxCellAscent + mMaxCellDescent) {
SetContentBSize(mMaxCellAscent + mMaxCellDescent);
}
}
@ -522,7 +522,7 @@ nsTableRowFrame::CalcBSize(const nsHTMLReflowState& aReflowState)
UpdateBSize(desSize.BSize(wm), ascent, descent, tableFrame, cellFrame);
}
}
return GetBSize();
return GetInitialBSize();
}
/**

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

@ -203,7 +203,7 @@ public:
void SetPctBSize(float aPctValue,
bool aForce = false);
nscoord GetBSize(nscoord aBasis = 0) const;
nscoord GetInitialBSize(nscoord aBasis = 0) const;
nsTableRowFrame* GetNextRow() const;

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

@ -589,7 +589,7 @@ nsTableRowGroupFrame::CalculateRowBSizes(nsPresContext* aPresContext,
if (!rowFrame->GetPrevInFlow()) {
if (rowFrame->HasPctBSize()) {
rowInfo[rowIndex].hasPctBSize = true;
rowInfo[rowIndex].pctBSize = rowFrame->GetBSize(pctBSizeBasis);
rowInfo[rowIndex].pctBSize = rowFrame->GetInitialBSize(pctBSizeBasis);
}
rowInfo[rowIndex].hasStyleBSize = rowFrame->HasStyleBSize();
nonPctBSize = std::max(nonPctBSize, rowFrame->GetFixedBSize());