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

Unified Diff: ui/views/controls/label.cc

Issue 354963003: Move gfx::ElideText functionality to RenderText. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Exclude unreachable code by platform. Created 6 years, 6 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/views/controls/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index 648a0e660bcfd986d92ff25d08f8959f606297db..368f1d8e3dfc09da438d2e9eb3a851520235ff3b 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -137,7 +137,7 @@ void Label::SetLineHeight(int height) {
void Label::SetMultiLine(bool multi_line) {
DCHECK(!multi_line || (elide_behavior_ == gfx::ELIDE_TAIL ||
- elide_behavior_ == gfx::TRUNCATE));
+ elide_behavior_ == gfx::NO_ELIDE));
if (multi_line != is_multi_line_) {
is_multi_line_ = multi_line;
ResetCachedSize();
@@ -164,7 +164,7 @@ void Label::SetAllowCharacterBreak(bool allow_character_break) {
void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
DCHECK(!is_multi_line_ || (elide_behavior_ == gfx::ELIDE_TAIL ||
- elide_behavior_ == gfx::TRUNCATE));
+ elide_behavior_ == gfx::NO_ELIDE));
if (elide_behavior != elide_behavior_) {
elide_behavior_ = elide_behavior;
ResetCachedSize();
@@ -496,7 +496,7 @@ void Label::CalculateDrawStringParams(base::string16* paint_text,
int* flags) const {
DCHECK(paint_text && text_bounds && flags);
- const bool forbid_ellipsis = elide_behavior_ == gfx::TRUNCATE ||
+ const bool forbid_ellipsis = elide_behavior_ == gfx::NO_ELIDE ||
elide_behavior_ == gfx::FADE_TAIL;
if (is_multi_line_ || forbid_ellipsis) {
*paint_text = layout_text();

Powered by Google App Engine
This is Rietveld 408576698