mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +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
|
|
@ -67,8 +67,8 @@ static void ComputeBorderCornerDimensions(const Float* aBorderWidths,
|
|||
#define PREV_SIDE(_s) mozilla::Side(((_s) + 3) & 3)
|
||||
|
||||
// given a corner index, get the previous and next corner index
|
||||
#define NEXT_CORNER(_s) mozilla::css::Corner(((_s) + 1) & 3)
|
||||
#define PREV_CORNER(_s) mozilla::css::Corner(((_s) + 3) & 3)
|
||||
#define NEXT_CORNER(_s) mozilla::Corner(((_s) + 1) & 3)
|
||||
#define PREV_CORNER(_s) mozilla::Corner(((_s) + 3) & 3)
|
||||
|
||||
// from the given base color and the background color, turn
|
||||
// color into a color for the given border pattern style
|
||||
|
|
@ -114,27 +114,27 @@ AllCornersZeroSize(const RectCornerRadii& corners) {
|
|||
}
|
||||
|
||||
static mozilla::Side
|
||||
GetHorizontalSide(mozilla::css::Corner aCorner)
|
||||
GetHorizontalSide(mozilla::Corner aCorner)
|
||||
{
|
||||
return (aCorner == C_TL || aCorner == C_TR) ? eSideTop : eSideBottom;
|
||||
}
|
||||
|
||||
static mozilla::Side
|
||||
GetVerticalSide(mozilla::css::Corner aCorner)
|
||||
GetVerticalSide(mozilla::Corner aCorner)
|
||||
{
|
||||
return (aCorner == C_TL || aCorner == C_BL) ? eSideLeft : eSideRight;
|
||||
}
|
||||
|
||||
static mozilla::css::Corner
|
||||
static mozilla::Corner
|
||||
GetCWCorner(mozilla::Side aSide)
|
||||
{
|
||||
return mozilla::css::Corner(NEXT_SIDE(aSide));
|
||||
return mozilla::Corner(NEXT_SIDE(aSide));
|
||||
}
|
||||
|
||||
static mozilla::css::Corner
|
||||
static mozilla::Corner
|
||||
GetCCWCorner(mozilla::Side aSide)
|
||||
{
|
||||
return mozilla::css::Corner(aSide);
|
||||
return mozilla::Corner(aSide);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -332,7 +332,7 @@ nsCSSBorderRenderer::AreBorderSideFinalStylesSame(uint8_t aSides)
|
|||
}
|
||||
|
||||
bool
|
||||
nsCSSBorderRenderer::IsSolidCornerStyle(uint8_t aStyle, mozilla::css::Corner aCorner)
|
||||
nsCSSBorderRenderer::IsSolidCornerStyle(uint8_t aStyle, mozilla::Corner aCorner)
|
||||
{
|
||||
switch (aStyle) {
|
||||
case NS_STYLE_BORDER_STYLE_SOLID:
|
||||
|
|
@ -355,7 +355,7 @@ nsCSSBorderRenderer::IsSolidCornerStyle(uint8_t aStyle, mozilla::css::Corner aCo
|
|||
}
|
||||
|
||||
bool
|
||||
nsCSSBorderRenderer::IsCornerMergeable(mozilla::css::Corner aCorner)
|
||||
nsCSSBorderRenderer::IsCornerMergeable(mozilla::Corner aCorner)
|
||||
{
|
||||
// Corner between dotted borders with same width and small radii is
|
||||
// merged into single dot.
|
||||
|
|
@ -405,7 +405,7 @@ nsCSSBorderRenderer::IsCornerMergeable(mozilla::css::Corner aCorner)
|
|||
}
|
||||
|
||||
BorderColorStyle
|
||||
nsCSSBorderRenderer::BorderColorStyleForSolidCorner(uint8_t aStyle, mozilla::css::Corner aCorner)
|
||||
nsCSSBorderRenderer::BorderColorStyleForSolidCorner(uint8_t aStyle, mozilla::Corner aCorner)
|
||||
{
|
||||
// note that this function assumes that the corner is already solid,
|
||||
// as per the earlier function
|
||||
|
|
@ -435,7 +435,7 @@ nsCSSBorderRenderer::BorderColorStyleForSolidCorner(uint8_t aStyle, mozilla::css
|
|||
}
|
||||
|
||||
Rect
|
||||
nsCSSBorderRenderer::GetCornerRect(mozilla::css::Corner aCorner)
|
||||
nsCSSBorderRenderer::GetCornerRect(mozilla::Corner aCorner)
|
||||
{
|
||||
Point offset(0.f, 0.f);
|
||||
|
||||
|
|
@ -674,7 +674,7 @@ nsCSSBorderRenderer::GetSideClipSubPath(mozilla::Side aSide)
|
|||
|
||||
Point
|
||||
nsCSSBorderRenderer::GetStraightBorderPoint(mozilla::Side aSide,
|
||||
mozilla::css::Corner aCorner,
|
||||
mozilla::Corner aCorner,
|
||||
bool* aIsUnfilled,
|
||||
Float aDotOffset)
|
||||
|
||||
|
|
@ -1070,7 +1070,7 @@ nsCSSBorderRenderer::GetStraightBorderPoint(mozilla::Side aSide,
|
|||
void
|
||||
nsCSSBorderRenderer::GetOuterAndInnerBezier(Bezier* aOuterBezier,
|
||||
Bezier* aInnerBezier,
|
||||
mozilla::css::Corner aCorner)
|
||||
mozilla::Corner aCorner)
|
||||
{
|
||||
// Return bezier control points for outer and inner curve for given corner.
|
||||
//
|
||||
|
|
@ -2308,7 +2308,7 @@ nsCSSBorderRenderer::DrawDottedSideSlow(mozilla::Side aSide)
|
|||
|
||||
void
|
||||
nsCSSBorderRenderer::DrawDashedOrDottedCorner(mozilla::Side aSide,
|
||||
mozilla::css::Corner aCorner)
|
||||
mozilla::Corner aCorner)
|
||||
{
|
||||
// Draw dashed/dotted corner with following approach.
|
||||
//
|
||||
|
|
@ -2417,7 +2417,7 @@ nsCSSBorderRenderer::DrawDashedOrDottedCorner(mozilla::Side aSide,
|
|||
|
||||
void
|
||||
nsCSSBorderRenderer::DrawDottedCornerSlow(mozilla::Side aSide,
|
||||
mozilla::css::Corner aCorner)
|
||||
mozilla::Corner aCorner)
|
||||
{
|
||||
NS_ASSERTION(mBorderStyles[aSide] == NS_STYLE_BORDER_STYLE_DOTTED,
|
||||
"Style should be dotted.");
|
||||
|
|
@ -2494,7 +2494,7 @@ DashedPathOverlapsRect(Rect& pathRect,
|
|||
|
||||
void
|
||||
nsCSSBorderRenderer::DrawDashedCornerSlow(mozilla::Side aSide,
|
||||
mozilla::css::Corner aCorner)
|
||||
mozilla::Corner aCorner)
|
||||
{
|
||||
NS_ASSERTION(mBorderStyles[aSide] == NS_STYLE_BORDER_STYLE_DASHED,
|
||||
"Style should be dashed.");
|
||||
|
|
@ -2610,7 +2610,7 @@ nsCSSBorderRenderer::DrawDashedCornerSlow(mozilla::Side aSide,
|
|||
|
||||
void
|
||||
nsCSSBorderRenderer::DrawFallbackSolidCorner(mozilla::Side aSide,
|
||||
mozilla::css::Corner aCorner)
|
||||
mozilla::Corner aCorner)
|
||||
{
|
||||
// Render too large dashed or dotted corner with solid style, to avoid hangup
|
||||
// inside DashedCornerFinder and DottedCornerFinder.
|
||||
|
|
@ -2839,7 +2839,7 @@ ComputeCornerSkirtSize(Float aAlpha1, Float aAlpha2,
|
|||
// seams when anti-aliased drawing is used.
|
||||
static void
|
||||
DrawBorderRadius(DrawTarget* aDrawTarget,
|
||||
mozilla::css::Corner c,
|
||||
mozilla::Corner c,
|
||||
const Point& aOuterCorner, const Point& aInnerCorner,
|
||||
const twoFloats& aCornerMultPrev, const twoFloats& aCornerMultNext,
|
||||
const Size& aCornerDims,
|
||||
|
|
@ -3046,8 +3046,8 @@ nsCSSBorderRenderer::DrawNoCompositeColorSolidBorder()
|
|||
// Thus, the CCW corner of the next side will end up drawn here.
|
||||
|
||||
// the corner index -- either 1 2 3 0 (cw) or 0 3 2 1 (ccw)
|
||||
mozilla::css::Corner c = mozilla::css::Corner((i+1) % 4);
|
||||
mozilla::css::Corner prevCorner = mozilla::css::Corner(i);
|
||||
mozilla::Corner c = mozilla::Corner((i+1) % 4);
|
||||
mozilla::Corner prevCorner = mozilla::Corner(i);
|
||||
|
||||
// i+2 and i+3 respectively. These are used to index into the corner
|
||||
// multiplier table, and were deduced by calculating out the long form
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue