summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-04-18 20:15:33 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-04-18 20:15:33 +0200
commitd1b17ef97efd0e4f869c98dfada8d09f1cb1ad5a (patch)
tree3f0ee264ae10a8fe86ef3f56710f66b810fa89dc /layout/base
parentfe15bb43decc414a6f57301da049b34f488556ab (diff)
downloadUXP-d1b17ef97efd0e4f869c98dfada8d09f1cb1ad5a.tar
UXP-d1b17ef97efd0e4f869c98dfada8d09f1cb1ad5a.tar.gz
UXP-d1b17ef97efd0e4f869c98dfada8d09f1cb1ad5a.tar.lz
UXP-d1b17ef97efd0e4f869c98dfada8d09f1cb1ad5a.tar.xz
UXP-d1b17ef97efd0e4f869c98dfada8d09f1cb1ad5a.zip
Use natural border width rounding.
Round subpixel border widths to nearest integer instead of nearest-below integer. Split caret widths off from border widths and continue to use rounding to nearest-below integer for that. Bump Goanna version for visual rendering change.
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/nsCaret.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp
index 2f08d156e..8ad435950 100644
--- a/layout/base/nsCaret.cpp
+++ b/layout/base/nsCaret.cpp
@@ -200,8 +200,8 @@ nsCaret::ComputeMetrics(nsIFrame* aFrame, int32_t aOffset, nscoord aCaretHeight)
// between 0 and 1 goes up to 1 so we don't let the caret disappear.
int32_t tpp = aFrame->PresContext()->AppUnitsPerDevPixel();
Metrics result;
- result.mCaretWidth = NS_ROUND_BORDER_TO_PIXELS(caretWidth, tpp);
- result.mBidiIndicatorSize = NS_ROUND_BORDER_TO_PIXELS(bidiIndicatorSize, tpp);
+ result.mCaretWidth = NS_ROUND_CARET_TO_PIXELS(caretWidth, tpp);
+ result.mBidiIndicatorSize = NS_ROUND_CARET_TO_PIXELS(bidiIndicatorSize, tpp);
return result;
}