| Index: ui/gfx/render_text.cc
|
| diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
|
| index dfac16495193edac4772265f9f6903c821d1d734..830bbd120c7852cdb2c9212ea8918f90cc6604a3 100644
|
| --- a/ui/gfx/render_text.cc
|
| +++ b/ui/gfx/render_text.cc
|
| @@ -1203,9 +1203,12 @@ Vector2d RenderText::GetAlignmentOffset(size_t line_number) {
|
|
|
| // Vertically center the text.
|
| if (multiline_) {
|
| - const int text_height = lines_.back().preceding_heights +
|
| - lines_.back().size.height();
|
| - offset.set_y((display_rect_.height() - text_height) / 2);
|
| + const int line_height = lines_.back().size.height();
|
| + const int text_height = lines_.back().preceding_heights + line_height;
|
| + const int extra_space = display_rect_.height() - text_height;
|
| + const int centering_baseline =
|
| + DetermineBaselineCenteringText(line_height + extra_space, font_list());
|
| + offset.set_y(centering_baseline - GetDisplayTextBaseline());
|
| } else {
|
| offset.set_y(GetBaseline() - GetDisplayTextBaseline());
|
| }
|
|
|