mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 23:37:33 +09:00
Issue #1925 - Move Corner enum from mozilla::css to mozilla namespace.
This commit is contained in:
parent
81f60b575a
commit
b3a51c2711
8 changed files with 45 additions and 47 deletions
|
|
@ -241,7 +241,7 @@ FindBezierNearestPoint(const Bezier& aBezier, const Point& aTarget,
|
|||
}
|
||||
|
||||
void
|
||||
GetBezierPointsForCorner(Bezier* aBezier, mozilla::css::Corner aCorner,
|
||||
GetBezierPointsForCorner(Bezier* aBezier, mozilla::Corner aCorner,
|
||||
const Point& aCornerPoint, const Size& aCornerSize)
|
||||
{
|
||||
// Calculate bezier control points for elliptic arc.
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ Point FindBezierNearestPoint(const Bezier& aBezier, const Point& aTarget,
|
|||
// | |
|
||||
// v mPoints[0] |
|
||||
// -------------+
|
||||
void GetBezierPointsForCorner(Bezier* aBezier, mozilla::css::Corner aCorner,
|
||||
void GetBezierPointsForCorner(Bezier* aBezier, mozilla::Corner aCorner,
|
||||
const Point& aCornerPoint,
|
||||
const Size& aCornerSize);
|
||||
|
||||
|
|
|
|||
|
|
@ -406,7 +406,6 @@ static inline Side& operator++(Side& side) {
|
|||
return side;
|
||||
}
|
||||
|
||||
namespace css {
|
||||
enum Corner {
|
||||
// This order is important!
|
||||
eCornerTopLeft = 0,
|
||||
|
|
@ -415,23 +414,22 @@ enum Corner {
|
|||
eCornerBottomLeft = 3,
|
||||
eNumCorners = 4
|
||||
};
|
||||
} // namespace css
|
||||
|
||||
#define NS_CORNER_TOP_LEFT mozilla::css::eCornerTopLeft
|
||||
#define NS_CORNER_TOP_RIGHT mozilla::css::eCornerTopRight
|
||||
#define NS_CORNER_BOTTOM_RIGHT mozilla::css::eCornerBottomRight
|
||||
#define NS_CORNER_BOTTOM_LEFT mozilla::css::eCornerBottomLeft
|
||||
#define NS_NUM_CORNERS mozilla::css::eNumCorners
|
||||
#define NS_CORNER_TOP_LEFT mozilla::eCornerTopLeft
|
||||
#define NS_CORNER_TOP_RIGHT mozilla::eCornerTopRight
|
||||
#define NS_CORNER_BOTTOM_RIGHT mozilla::eCornerBottomRight
|
||||
#define NS_CORNER_BOTTOM_LEFT mozilla::eCornerBottomLeft
|
||||
#define NS_NUM_CORNERS mozilla::eNumCorners
|
||||
|
||||
#define NS_FOR_CSS_CORNERS(var_) \
|
||||
for (mozilla::css::Corner var_ = NS_CORNER_TOP_LEFT; \
|
||||
for (mozilla::Corner var_ = NS_CORNER_TOP_LEFT; \
|
||||
var_ <= NS_CORNER_BOTTOM_LEFT; \
|
||||
var_++)
|
||||
|
||||
static inline mozilla::css::Corner operator++(mozilla::css::Corner& corner, int) {
|
||||
static inline mozilla::Corner operator++(mozilla::Corner& corner, int) {
|
||||
MOZ_ASSERT(corner >= NS_CORNER_TOP_LEFT &&
|
||||
corner < NS_NUM_CORNERS, "Out of range corner");
|
||||
corner = mozilla::css::Corner(corner + 1);
|
||||
corner = mozilla::Corner(corner + 1);
|
||||
return corner;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue