Chromium Code Reviews| Index: ui/gfx/render_text.h |
| diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
| index 1b33b3c99ab207e2c31763931209015ba573bb8b..51de145d2e2fe024b94c8f2a58b969f6a5175457 100644 |
| --- a/ui/gfx/render_text.h |
| +++ b/ui/gfx/render_text.h |
| @@ -256,11 +256,14 @@ 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); |
| + // TODO(mukai): ELIDE_LONG_WORDS is not supported. |
| + WordWrapBehavior word_wrap_behavior() const { return word_wrap_behavior_; } |
| + void SetWordWrapBehavior(WordWrapBehavior behavior); |
| + |
| // Set whether newline characters should be replaced with newline symbols. |
| void SetReplaceNewlineCharsWithSymbols(bool replace); |
| @@ -634,6 +637,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_WordWrapBehavior); |
| FRIEND_TEST_ALL_PREFIXES(RenderTextTest, NewlineWithoutMultilineFlag); |
| FRIEND_TEST_ALL_PREFIXES(RenderTextTest, GlyphBounds); |
| FRIEND_TEST_ALL_PREFIXES(RenderTextTest, HarfBuzz_GlyphBounds); |
| @@ -762,6 +766,10 @@ class GFX_EXPORT RenderText { |
| // |display_rect_| as the width cap. |
| bool multiline_; |
| + // The wrap behavior when the text is broken into lines. Do nothing unless |
| + // |multiline_| is set. |
|
msw
2015/03/26 19:36:29
nit: mention the default behavior here.
Jun Mukai
2015/03/26 22:47:38
Done.
|
| + WordWrapBehavior word_wrap_behavior_; |
| + |
| // Whether newline characters should be replaced with newline symbols. |
| bool replace_newline_chars_with_symbols_; |