Commit 54db05ea authored by kinaba@chromium.org's avatar kinaba@chromium.org

Fix wrong truncation of notification popup messages in ash.

views::Label control first calculates the size of the text,
and then tries to render the text in the exact size of rectangle.
If < is used instead of <= in the patched line, the control
flows to the BreakIterator mode, that sometimes computes a
larger width value and causes truncation.

BUG=155663

Review URL: https://codereview.chromium.org/11150013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162308 0039d316-1c4b-4281-b951-d872f2087c98
parent 5fc6319f
......@@ -907,7 +907,7 @@ bool RectangleText::Finalize() {
void RectangleText::AddLine(const string16& line) {
const int line_width = font_.GetStringWidth(line);
if (line_width < available_pixel_width_) {
if (line_width <= available_pixel_width_) {
AddToCurrentLineWithWidth(line, line_width);
} else {
// Iterate over positions that are valid to break the line at. In general,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment