mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1720618 - Remove redundant checks from nsTableFrame::ExpandBCDamageArea. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D119935
This commit is contained in:
parent
094d5b88a8
commit
2610b8861a
@ -4934,8 +4934,8 @@ void nsTableFrame::ExpandBCDamageArea(TableArea& aArea) const {
|
||||
}
|
||||
}
|
||||
// check for spanners on the left and right
|
||||
int32_t iterStartY = -1;
|
||||
int32_t iterEndY = -1;
|
||||
int32_t iterStartY;
|
||||
int32_t iterEndY;
|
||||
if ((dStartY >= rgStartY) && (dStartY <= rgEndY)) {
|
||||
// the damage area starts in the row group
|
||||
iterStartY = dStartY;
|
||||
@ -4948,23 +4948,26 @@ void nsTableFrame::ExpandBCDamageArea(TableArea& aArea) const {
|
||||
// the damage area contains the row group
|
||||
iterStartY = rgStartY;
|
||||
iterEndY = rgEndY;
|
||||
} else {
|
||||
// the damage area does not overlap the row group
|
||||
continue;
|
||||
}
|
||||
if ((iterStartY >= 0) && (iterEndY >= 0)) {
|
||||
for (int32_t y = iterStartY; y <= iterEndY; y++) {
|
||||
if (uint32_t(y - rgStartY) >= cellMap->mRows.Length()) ABORT0();
|
||||
const nsCellMap::CellDataArray& row = cellMap->mRows[y - rgStartY];
|
||||
CellData* cellData = row.SafeElementAt(dStartX);
|
||||
NS_ASSERTION(iterStartY >= 0 && iterEndY >= 0,
|
||||
"table index values are expected to be nonnegative");
|
||||
for (int32_t y = iterStartY; y <= iterEndY; y++) {
|
||||
if (uint32_t(y - rgStartY) >= cellMap->mRows.Length()) ABORT0();
|
||||
const nsCellMap::CellDataArray& row = cellMap->mRows[y - rgStartY];
|
||||
CellData* cellData = row.SafeElementAt(dStartX);
|
||||
if (cellData && (cellData->IsColSpan())) {
|
||||
haveSpanner = true;
|
||||
break;
|
||||
}
|
||||
if (dEndX < (numCols - 1)) {
|
||||
cellData = row.SafeElementAt(dEndX + 1);
|
||||
if (cellData && (cellData->IsColSpan())) {
|
||||
haveSpanner = true;
|
||||
break;
|
||||
}
|
||||
if (dEndX < (numCols - 1)) {
|
||||
cellData = row.SafeElementAt(dEndX + 1);
|
||||
if (cellData && (cellData->IsColSpan())) {
|
||||
haveSpanner = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user