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:
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user