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

Unified Diff: ui/gfx/render_text.cc

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
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index c3a4f00e0fd14524e3ad0247c4efb3085a34ee1d..d174fc52e307683e68984cb4b1148f1dec4d4886 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -532,6 +532,15 @@ void RenderText::SetMultiline(bool multiline) {
}
}
+void RenderText::SetAllowCharacterBreak(bool allow_character_break) {
+ if (allow_character_break_ == allow_character_break)
+ return;
+ allow_character_break_ = allow_character_break;
+ cached_bounds_and_offset_valid_ = false;
msw 2015/03/25 20:54:15 Should we only run these 3 lines if multi-line is
Jun Mukai 2015/03/26 01:35:08 Done.
+ lines_.clear();
+ OnTextAttributeChanged();
+}
+
void RenderText::SetReplaceNewlineCharsWithSymbols(bool replace) {
if (replace_newline_chars_with_symbols_ == replace)
return;
@@ -976,6 +985,7 @@ RenderText::RenderText()
text_elided_(false),
min_line_height_(0),
multiline_(false),
+ allow_character_break_(false),
replace_newline_chars_with_symbols_(true),
subpixel_rendering_suppressed_(false),
clip_to_display_rect_(true),

Powered by Google App Engine
This is Rietveld 408576698