DescriptionCorrect text y position calculation in RenderTextWin.
The previous calculation had a problem due to the following logic:
SkPoint point(SkPoint::Make(SkIntToScalar(offset.x()),
SkIntToScalar(display_rect().height() - offset.y())));
If display_rect().y() was large and height was the height for e.g. one line of text, then when the code subtracted offset.y() (which was based on display_rect().y()), the result was a negative y position (offscreen) for the text.
This CL changes the logic to correctly center the text vertically regardless of the y position, which I believe was the intention of the code.
BUG=none
TEST=Open Chrome with --use-pure-views. Type something into omnibox. Text should be centered in omnibox.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107625
Patch Set 1 #
Total comments: 1
Patch Set 2 : '' #Messages
Total messages: 5 (0 generated)
|