Index: ui/gfx/render_text.h |
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
index fe70f4761beed7b7117b96605d9803a41d8906e3..d9fc6b4be102e6f6443fe777f4adbe64cf67983f 100644 |
--- a/ui/gfx/render_text.h |
+++ b/ui/gfx/render_text.h |
@@ -256,11 +256,13 @@ class GFX_EXPORT RenderText { |
// cleared when SetText or SetObscured is called. |
void SetObscuredRevealIndex(int index); |
- // TODO(ckocagil): Multiline text rendering is currently only supported on |
- // Windows. Support other platforms. |
+ // TODO(ckocagil): Multiline text rendering is not supported on Mac. |
bool multiline() const { return multiline_; } |
void SetMultiline(bool multiline); |
+ bool allow_character_break() const { return allow_character_break_; } |
+ void SetAllowCharacterBreak(bool allow_character_break); |
+ |
// Set whether newline characters should be replaced with newline symbols. |
void SetReplaceNewlineCharsWithSymbols(bool replace); |
@@ -633,6 +635,7 @@ class GFX_EXPORT RenderText { |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_NormalWidth); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline); |
+ FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_AllowCharacterBreak); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, NewlineWithoutMultilineFlag); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GlyphBounds); |
FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_GlyphBounds); |
@@ -761,6 +764,9 @@ class GFX_EXPORT RenderText { |
// |display_rect_| as the width cap. |
bool multiline_; |
+ // Whether the line breaker allows to break lines by character, not by word. |
msw
2015/03/25 20:54:15
nit: clarify the actual behavior here (or use gfx:
Jun Mukai
2015/03/26 01:35:08
Using WordWrapBehavior
|
+ bool allow_character_break_; |
msw
2015/03/25 20:54:15
nit: use gfx::WordWrapBehavior?
Jun Mukai
2015/03/26 01:35:08
Done.
|
+ |
// Whether newline characters should be replaced with newline symbols. |
bool replace_newline_chars_with_symbols_; |