mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Issue #1925 - Convert half-corner index macros to an enum.
This commit is contained in:
parent
d73f8c2e84
commit
8dc8875db6
9 changed files with 138 additions and 135 deletions
|
|
@ -4129,19 +4129,19 @@ nsDisplayBorder::CalculateBounds(const nsStyleBorder& aStyleBorder)
|
|||
nscoord radii[8];
|
||||
if (mFrame->GetBorderRadii(radii)) {
|
||||
if (border.left > 0 || border.top > 0) {
|
||||
nsSize cornerSize(radii[NS_CORNER_TOP_LEFT_X], radii[NS_CORNER_TOP_LEFT_Y]);
|
||||
nsSize cornerSize(radii[eCornerTopLeftX], radii[eCornerTopLeftY]);
|
||||
result.UnionRect(result, nsRect(borderBounds.TopLeft(), cornerSize));
|
||||
}
|
||||
if (border.top > 0 || border.right > 0) {
|
||||
nsSize cornerSize(radii[NS_CORNER_TOP_RIGHT_X], radii[NS_CORNER_TOP_RIGHT_Y]);
|
||||
nsSize cornerSize(radii[eCornerTopRightX], radii[eCornerTopRightY]);
|
||||
result.UnionRect(result, nsRect(borderBounds.TopRight() - nsPoint(cornerSize.width, 0), cornerSize));
|
||||
}
|
||||
if (border.right > 0 || border.bottom > 0) {
|
||||
nsSize cornerSize(radii[NS_CORNER_BOTTOM_RIGHT_X], radii[NS_CORNER_BOTTOM_RIGHT_Y]);
|
||||
nsSize cornerSize(radii[eCornerBottomRightX], radii[eCornerBottomRightY]);
|
||||
result.UnionRect(result, nsRect(borderBounds.BottomRight() - nsPoint(cornerSize.width, cornerSize.height), cornerSize));
|
||||
}
|
||||
if (border.bottom > 0 || border.left > 0) {
|
||||
nsSize cornerSize(radii[NS_CORNER_BOTTOM_LEFT_X], radii[NS_CORNER_BOTTOM_LEFT_Y]);
|
||||
nsSize cornerSize(radii[eCornerBottomLeftX], radii[eCornerBottomLeftY]);
|
||||
result.UnionRect(result, nsRect(borderBounds.BottomLeft() - nsPoint(0, cornerSize.height), cornerSize));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue