mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1673370 - Simplify nsTableRowGroupFrame::GetBCBorderWidth. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D94730
This commit is contained in:
parent
f9e0ccb2a1
commit
40234649bd
@ -1656,21 +1656,19 @@ nsresult nsTableRowGroupFrame::GetFrameName(nsAString& aResult) const {
|
||||
|
||||
LogicalMargin nsTableRowGroupFrame::GetBCBorderWidth(WritingMode aWM) {
|
||||
LogicalMargin border(aWM);
|
||||
nsTableRowFrame* firstRowFrame = nullptr;
|
||||
nsTableRowFrame* lastRowFrame = nullptr;
|
||||
for (nsTableRowFrame* rowFrame = GetFirstRow(); rowFrame;
|
||||
nsTableRowFrame* firstRowFrame = GetFirstRow();
|
||||
if (!firstRowFrame) {
|
||||
return border;
|
||||
}
|
||||
nsTableRowFrame* lastRowFrame = firstRowFrame;
|
||||
for (nsTableRowFrame* rowFrame = firstRowFrame->GetNextRow(); rowFrame;
|
||||
rowFrame = rowFrame->GetNextRow()) {
|
||||
if (!firstRowFrame) {
|
||||
firstRowFrame = rowFrame;
|
||||
}
|
||||
lastRowFrame = rowFrame;
|
||||
}
|
||||
if (firstRowFrame) {
|
||||
border.BStart(aWM) = PresContext()->DevPixelsToAppUnits(
|
||||
firstRowFrame->GetBStartBCBorderWidth());
|
||||
border.BEnd(aWM) = PresContext()->DevPixelsToAppUnits(
|
||||
lastRowFrame->GetBEndBCBorderWidth());
|
||||
}
|
||||
border.BStart(aWM) = PresContext()->DevPixelsToAppUnits(
|
||||
firstRowFrame->GetBStartBCBorderWidth());
|
||||
border.BEnd(aWM) =
|
||||
PresContext()->DevPixelsToAppUnits(lastRowFrame->GetBEndBCBorderWidth());
|
||||
return border;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user