Chromium Code Reviews| Index: ui/gfx/render_text.cc |
| diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc |
| index e04fc71b3bdc1ae1c3e861a65f5560b97158499c..b807b6e07505eb79ebf75d93d2847003e6f247b1 100644 |
| --- a/ui/gfx/render_text.cc |
| +++ b/ui/gfx/render_text.cc |
| @@ -1092,14 +1092,14 @@ HorizontalAlignment RenderText::GetCurrentHorizontalAlignment() { |
| } |
| Vector2d RenderText::GetAlignmentOffset(size_t line_number) { |
| - // TODO(ckocagil): Enable |lines_| usage in other platforms. |
| -#if defined(OS_WIN) |
| + // TODO(ckocagil): Enable |lines_| usage on mac. |
|
msw
2015/02/23 19:30:06
nit: update this comment to say RenderTextMac inst
oshima
2015/02/23 23:06:52
Done.
|
| +#if !defined(OS_MACOSX) |
| DCHECK_LT(line_number, lines_.size()); |
| #endif |
| Vector2d offset; |
| HorizontalAlignment horizontal_alignment = GetCurrentHorizontalAlignment(); |
| if (horizontal_alignment != ALIGN_LEFT) { |
| -#if defined(OS_WIN) |
| +#if !defined(OS_MACOSX) |
| const int width = std::ceil(lines_[line_number].size.width()) + |
| (cursor_enabled_ ? 1 : 0); |
| #else |