Index: ui/gfx/render_text.cc |
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc |
index e395a6e006de38097ea3fe041de046c4c75ed810..ac0c7afffb25df4ded9a0b544f991932937deb7d 100644 |
--- a/ui/gfx/render_text.cc |
+++ b/ui/gfx/render_text.cc |
@@ -531,6 +531,7 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) { |
} |
void RenderText::SetDisplayRect(const Rect& r) { |
+ DLOG(INFO) << "in SetDisplayRect."; |
if (r != display_rect_) { |
display_rect_ = r; |
baseline_ = kInvalidBaseline; |
@@ -538,6 +539,7 @@ void RenderText::SetDisplayRect(const Rect& r) { |
lines_.clear(); |
if (elide_behavior_ != NO_ELIDE && |
elide_behavior_ != FADE_TAIL) { |
+ DLOG(INFO) << "via set display rect: " << GetDisplayText(); |
OnDisplayTextAttributeChanged(); |
} |
} |
@@ -751,6 +753,8 @@ int RenderText::GetBaseline() { |
void RenderText::Draw(Canvas* canvas) { |
EnsureLayout(); |
+ DLOG(INFO) << "Draw: " << GetDisplayText(); |
+ |
if (clip_to_display_rect()) { |
Rect clip_rect(display_rect()); |
clip_rect.Inset(ShadowValue::GetMargin(shadows_)); |
@@ -1278,6 +1282,7 @@ base::string16 RenderText::Elide(const base::string16& text, |
float text_width, |
float available_width, |
ElideBehavior behavior) { |
+ DLOG(INFO) << "Elide: '" << text << "' " << text_width << ", " << available_width << ", " << behavior; |
if (available_width <= 0 || text.empty()) |
return base::string16(); |
if (behavior == ELIDE_EMAIL) |
@@ -1310,6 +1315,7 @@ base::string16 RenderText::Elide(const base::string16& text, |
if (insert_ellipsis) { |
render_text->SetText(ellipsis); |
const float ellipsis_width = render_text->GetContentWidthF(); |
+ DLOG(INFO) << " added elipsis of width: " << ellipsis_width; |
if (ellipsis_width > available_width) |
return base::string16(); |
} |
@@ -1345,6 +1351,7 @@ base::string16 RenderText::Elide(const base::string16& text, |
new_text += base::i18n::kRightToLeftMark; |
} |
render_text->SetText(new_text); |
+ DLOG(INFO) << "text set to: " << new_text; |
} |
// Restore styles. Make sure style ranges don't break new text graphemes. |
@@ -1381,6 +1388,8 @@ base::string16 RenderText::Elide(const base::string16& text, |
} |
} |
+ DLOG(INFO) << "returning " << render_text->text(); |
+ |
return render_text->text(); |
} |