Bug 1931748. Fix some readability-else-after-return issues in layout code. r=jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D229259
This commit is contained in:
Jonathan Watt 2024-11-17 12:09:57 +00:00
parent 811ed41bba
commit b477cd37e8
3 changed files with 5 additions and 10 deletions

View File

@ -921,9 +921,8 @@ nsTableCellFrame* NS_NewTableCellFrame(PresShell* aPresShell,
nsTableFrame* aTableFrame) {
if (aTableFrame->IsBorderCollapse()) {
return new (aPresShell) nsBCTableCellFrame(aStyle, aTableFrame);
} else {
return new (aPresShell) nsTableCellFrame(aStyle, aTableFrame);
}
return new (aPresShell) nsTableCellFrame(aStyle, aTableFrame);
}
NS_IMPL_FRAMEARENA_HELPERS(nsBCTableCellFrame)

View File

@ -441,9 +441,8 @@ int32_t nsTableFrame::GetEffectiveRowSpan(const nsTableCellFrame& aCell,
if (aCellMap) {
return aCellMap->GetRowSpan(rowIndex, colIndex, true);
} else {
return tableCellMap->GetEffectiveRowSpan(rowIndex, colIndex);
}
return tableCellMap->GetEffectiveRowSpan(rowIndex, colIndex);
}
int32_t nsTableFrame::GetEffectiveColSpan(const nsTableCellFrame& aCell,
@ -456,9 +455,8 @@ int32_t nsTableFrame::GetEffectiveColSpan(const nsTableCellFrame& aCell,
if (aCellMap) {
return aCellMap->GetEffectiveColSpan(*tableCellMap, rowIndex, colIndex);
} else {
return tableCellMap->GetEffectiveColSpan(rowIndex, colIndex);
}
return tableCellMap->GetEffectiveColSpan(rowIndex, colIndex);
}
bool nsTableFrame::HasMoreThanOneCell(int32_t aRowIndex) const {

View File

@ -1356,9 +1356,8 @@ nsCSSAnonBoxPseudoStaticAtom* nsTreeBodyFrame::GetItemWithinCellAt(
if (aX >= twistyRect.x && aX < twistyRect.x + twistyRect.width) {
if (hasTwisty) {
return nsCSSAnonBoxes::mozTreeTwisty();
} else {
return nsCSSAnonBoxes::mozTreeCell();
}
return nsCSSAnonBoxes::mozTreeCell();
}
if (!isRTL) {
@ -1416,9 +1415,8 @@ nsCSSAnonBoxPseudoStaticAtom* nsTreeBodyFrame::GetItemWithinCellAt(
if (aX >= textRect.x && aX < textRect.x + textRect.width) {
return nsCSSAnonBoxes::mozTreeCellText();
} else {
return nsCSSAnonBoxes::mozTreeCell();
}
return nsCSSAnonBoxes::mozTreeCell();
}
void nsTreeBodyFrame::GetCellAt(nscoord aX, nscoord aY, int32_t* aRow,