Issue #1355 - Make nsTableCellFrame::GetColIndex/GetRowIndex faster

We can devirtualize it, remove some branches.
This commit is contained in:
win7-7 2020-02-16 16:06:53 +02:00 committed by Roy Tam
commit e8bb5560f7
12 changed files with 106 additions and 152 deletions

View file

@ -137,8 +137,7 @@ nsTableRowGroupFrame::InitRepeatedFrame(nsTableRowGroupFrame* aHeaderFooterFrame
while (copyCellFrame && originalCellFrame) {
NS_ASSERTION(originalCellFrame->GetContent() == copyCellFrame->GetContent(),
"cell frames have different content");
int32_t colIndex;
originalCellFrame->GetColIndex(colIndex);
uint32_t colIndex = originalCellFrame->ColIndex();
copyCellFrame->SetColIndex(colIndex);
// Move to the next cell frame
@ -998,8 +997,7 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
nsTableCellFrame* contCell = static_cast<nsTableCellFrame*>(
aPresContext.PresShell()->FrameConstructor()->
CreateContinuingFrame(&aPresContext, cell, &aLastRow));
int32_t colIndex;
cell->GetColIndex(colIndex);
uint32_t colIndex = cell->ColIndex();
aContRow->InsertCellFrame(contCell, colIndex);
}
}