1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-29 08:54:28 +00:00

Floor fractional border widths

This commit is contained in:
Basilisk-Dev
2026-05-09 12:44:44 -04:00
committed by roytam1
parent 947e147291
commit 4510bf92a2
+3 -3
View File
@@ -1145,10 +1145,10 @@ private:
nsCSSShadowItem mArray[1]; // This MUST be the last item
};
// Border widths are rounded to the nearest integer number of pixels, but values
// between zero and one device pixels are always rounded up to one device pixel.
// Border widths are rounded down to integer pixels, but values between zero and
// one device pixel are always rounded up to one device pixel.
#define NS_ROUND_BORDER_TO_PIXELS(l,tpp) \
((l) == 0) ? 0 : std::max((tpp), ((l) + ((tpp) / 2)) / (tpp) * (tpp))
((l) == 0) ? 0 : std::max((tpp), (l) / (tpp) * (tpp))
// Caret widths are rounded to the nearest-below integer number of pixels, but values
// between zero and one device pixels are always rounded up to one device pixel.
#define NS_ROUND_CARET_TO_PIXELS(l,tpp) \