Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: ui/gfx/render_text.cc

Issue 915383003: Fix alignment format in multiline mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable test on mac Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/render_text_harfbuzz.h » ('j') | ui/gfx/render_text_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index e04fc71b3bdc1ae1c3e861a65f5560b97158499c..a78635c73a98d1d62ebba5144c782a8d3f3f8d7c 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 RenderTextMac.
+#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
« no previous file with comments | « no previous file | ui/gfx/render_text_harfbuzz.h » ('j') | ui/gfx/render_text_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698