| Index: ui/gfx/render_text.cc
|
| diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
|
| index 4e7281c11695d4b7b70beb85b36e04227f425936..ddd854ba3478091fe53bdcb0de3d3a8f85cf3127 100644
|
| --- a/ui/gfx/render_text.cc
|
| +++ b/ui/gfx/render_text.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/i18n/break_iterator.h"
|
| #include "base/logging.h"
|
| #include "base/stl_util.h"
|
| +#include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "third_party/icu/source/common/unicode/rbbi.h"
|
| #include "third_party/icu/source/common/unicode/utf16.h"
|
| @@ -1171,6 +1172,12 @@ void RenderText::UpdateLayoutText() {
|
| layout_text_.assign(ElideText(layout_text_));
|
| }
|
|
|
| + // Replace the newline character with a newline symbol in single line mode.
|
| + static const base::char16 kNewline[] = { '\n', 0 };
|
| + static const base::char16 kNewlineSymbol[] = { 0x2424, 0 };
|
| + if (!multiline_)
|
| + base::ReplaceChars(layout_text_, kNewline, kNewlineSymbol, &layout_text_);
|
| +
|
| ResetLayout();
|
| }
|
|
|
|
|