mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-22 04:13:06 +09:00
Issue #1925 - Convert NS_FULL_TO_HALF_CORNER to a constexpr function.
Note: Because the new function checks types, we need to change the fullCorner type in `nsComputedDOMStyle::GetEllipseRadii()` and `StyleAnimationValue::ExtractComputedValue()` to `Corner` instead of the underlying base type.
This commit is contained in:
parent
31badb0f2e
commit
8a2bc8ef4d
7 changed files with 28 additions and 25 deletions
|
|
@ -3440,10 +3440,10 @@ nsComputedDOMStyle::DoGetOutlineColor()
|
|||
|
||||
already_AddRefed<CSSValue>
|
||||
nsComputedDOMStyle::GetEllipseRadii(const nsStyleCorners& aRadius,
|
||||
uint8_t aFullCorner)
|
||||
Corner aFullCorner)
|
||||
{
|
||||
nsStyleCoord radiusX = aRadius.Get(NS_FULL_TO_HALF_CORNER(aFullCorner, false));
|
||||
nsStyleCoord radiusY = aRadius.Get(NS_FULL_TO_HALF_CORNER(aFullCorner, true));
|
||||
nsStyleCoord radiusX = aRadius.Get(FullToHalfCorner(aFullCorner, false));
|
||||
nsStyleCoord radiusY = aRadius.Get(FullToHalfCorner(aFullCorner, true));
|
||||
|
||||
// for compatibility, return a single value if X and Y are equal
|
||||
if (radiusX == radiusY) {
|
||||
|
|
@ -6002,9 +6002,9 @@ nsComputedDOMStyle::BasicShapeRadiiToString(nsAString& aCssText,
|
|||
nsAutoString horizontalString, verticalString;
|
||||
NS_FOR_CSS_FULL_CORNERS(corner) {
|
||||
horizontal.AppendElement(
|
||||
aCorners.Get(NS_FULL_TO_HALF_CORNER(corner, false)));
|
||||
aCorners.Get(FullToHalfCorner(corner, false)));
|
||||
vertical.AppendElement(
|
||||
aCorners.Get(NS_FULL_TO_HALF_CORNER(corner, true)));
|
||||
aCorners.Get(FullToHalfCorner(corner, true)));
|
||||
}
|
||||
BoxValuesToString(horizontalString, horizontal);
|
||||
BoxValuesToString(verticalString, vertical);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue