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.
This commit is contained in:
wolfbeast 2018-04-18 20:15:33 +02:00 committed by Roy Tam
commit 7754d12175
3 changed files with 10 additions and 7 deletions

View file

@ -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;
}