Bug 1720618 - Remove redundant checks from nsTableFrame::ExpandBCDamageArea. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D119935
This commit is contained in:
@@ -4934,8 +4934,8 @@ void nsTableFrame::ExpandBCDamageArea(TableArea& aArea) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check for spanners on the left and right
|
// check for spanners on the left and right
|
||||||
int32_t iterStartY = -1;
|
int32_t iterStartY;
|
||||||
int32_t iterEndY = -1;
|
int32_t iterEndY;
|
||||||
if ((dStartY >= rgStartY) && (dStartY <= rgEndY)) {
|
if ((dStartY >= rgStartY) && (dStartY <= rgEndY)) {
|
||||||
// the damage area starts in the row group
|
// the damage area starts in the row group
|
||||||
iterStartY = dStartY;
|
iterStartY = dStartY;
|
||||||
@@ -4948,8 +4948,12 @@ void nsTableFrame::ExpandBCDamageArea(TableArea& aArea) const {
|
|||||||
// the damage area contains the row group
|
// the damage area contains the row group
|
||||||
iterStartY = rgStartY;
|
iterStartY = rgStartY;
|
||||||
iterEndY = rgEndY;
|
iterEndY = rgEndY;
|
||||||
|
} else {
|
||||||
|
// the damage area does not overlap the row group
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if ((iterStartY >= 0) && (iterEndY >= 0)) {
|
NS_ASSERTION(iterStartY >= 0 && iterEndY >= 0,
|
||||||
|
"table index values are expected to be nonnegative");
|
||||||
for (int32_t y = iterStartY; y <= iterEndY; y++) {
|
for (int32_t y = iterStartY; y <= iterEndY; y++) {
|
||||||
if (uint32_t(y - rgStartY) >= cellMap->mRows.Length()) ABORT0();
|
if (uint32_t(y - rgStartY) >= cellMap->mRows.Length()) ABORT0();
|
||||||
const nsCellMap::CellDataArray& row = cellMap->mRows[y - rgStartY];
|
const nsCellMap::CellDataArray& row = cellMap->mRows[y - rgStartY];
|
||||||
@@ -4968,7 +4972,6 @@ void nsTableFrame::ExpandBCDamageArea(TableArea& aArea) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (haveSpanner) {
|
if (haveSpanner) {
|
||||||
// make the damage area the whole table
|
// make the damage area the whole table
|
||||||
aArea.StartCol() = 0;
|
aArea.StartCol() = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user