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

Unified Diff: ui/message_center/views/bounded_label.cc

Issue 269013006: Avoid unnecessary width recalculation after bug fixed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/bounded_label.cc
diff --git a/ui/message_center/views/bounded_label.cc b/ui/message_center/views/bounded_label.cc
index 9a39fb55bbef54da6052f4246dda459352e76651..e55f1e62d6449ceb941a3ae8b959409809bc03c4 100644
--- a/ui/message_center/views/bounded_label.cc
+++ b/ui/message_center/views/bounded_label.cc
@@ -138,13 +138,6 @@ std::vector<base::string16> InnerBoundedLabel::GetWrappedText(int width,
height = (lines + 1) * line_height;
}
- // Try to ensure that the width is no smaller than the width of the text's
- // characters to avoid the http://crbug.com/237700 infinite loop.
- // TODO(dharcourt): Remove when http://crbug.com/237700 is fixed.
- width = std::max(width,
- 2 * gfx::GetStringWidth(base::UTF8ToUTF16("W"),
- font_list()));
-
// Wrap, using INT_MAX for -1 widths that indicate no wrapping.
std::vector<base::string16> wrapped;
gfx::ElideRectangleText(text(), font_list(),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698