mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +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
|
|
@ -469,6 +469,11 @@ constexpr Corner HalfToFullCorner(HalfCorner aHalfCorner)
|
|||
return Corner(aHalfCorner / 2);
|
||||
}
|
||||
|
||||
constexpr HalfCorner FullToHalfCorner(Corner aCorner, bool aIsVertical)
|
||||
{
|
||||
return HalfCorner(aCorner * 2 + aIsVertical);
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* MOZILLA_GFX_TYPES_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue