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

Unified Diff: ui/gfx/render_text.h

Issue 1015533016: Move allow_character_break property to RenderText. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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.cc » ('j') | ui/gfx/render_text.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698