summaryrefslogtreecommitdiffstats
path: root/layout/tables/nsCellMap.cpp
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2020-02-16 16:06:53 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 12:45:15 +0200
commitc9fd86cb784b81ab30461b773667b7251347fae6 (patch)
tree2b11c58b75866de08e091d27ea1d4ec289c20873 /layout/tables/nsCellMap.cpp
parent550d634ff522b0fa1a586f8d85692cff361dca17 (diff)
downloadUXP-c9fd86cb784b81ab30461b773667b7251347fae6.tar
UXP-c9fd86cb784b81ab30461b773667b7251347fae6.tar.gz
UXP-c9fd86cb784b81ab30461b773667b7251347fae6.tar.lz
UXP-c9fd86cb784b81ab30461b773667b7251347fae6.tar.xz
UXP-c9fd86cb784b81ab30461b773667b7251347fae6.zip
Issue #1355 - Make nsTableCellFrame::GetColIndex/GetRowIndex faster
We can devirtualize it, remove some branches.
Diffstat (limited to 'layout/tables/nsCellMap.cpp')
-rw-r--r--layout/tables/nsCellMap.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/layout/tables/nsCellMap.cpp b/layout/tables/nsCellMap.cpp
index bdd12cf70..4852a4bdd 100644
--- a/layout/tables/nsCellMap.cpp
+++ b/layout/tables/nsCellMap.cpp
@@ -2431,9 +2431,8 @@ void nsCellMap::Dump(bool aIsBorderCollapse) const
if (cd) {
if (cd->IsOrig()) {
nsTableCellFrame* cellFrame = cd->GetCellFrame();
- int32_t cellFrameColIndex;
- cellFrame->GetColIndex(cellFrameColIndex);
- printf("C%d,%d=%p(%d) ", rIndex, colIndex, (void*)cellFrame,
+ uint32_t cellFrameColIndex = cellFrame->ColIndex();
+ printf("C%d,%d=%p(%u) ", rIndex, colIndex, (void*)cellFrame,
cellFrameColIndex);
cellCount++;
}
@@ -2520,8 +2519,7 @@ nsCellMap::GetCellInfoAt(const nsTableCellMap& aMap,
cellFrame = GetCellFrame(aRowX, aColX, *data, true);
}
if (cellFrame && aColSpan) {
- int32_t initialColIndex;
- cellFrame->GetColIndex(initialColIndex);
+ uint32_t initialColIndex = cellFrame->ColIndex();
*aColSpan = GetEffectiveColSpan(aMap, aRowX, initialColIndex);
}
}