| Index: chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.mm
|
| diff --git a/chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.mm b/chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.mm
|
| index 332d4c7f24a6acd42788e7585293d96c4fad0647..7ccd22a3e9098091bccb217cf90684511766bb53 100644
|
| --- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.mm
|
| +++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.mm
|
| @@ -73,6 +73,7 @@ void InitLabel(NSTextField* textField, const base::string16& text) {
|
| std::pair<CGFloat, CGFloat> GetResizedColumns(
|
| CGFloat maxWidth,
|
| std::pair<CGFloat, CGFloat> columnsWidth) {
|
| + DCHECK_GE(maxWidth, kItemLabelSpacing + kMinUsernameSize);
|
| // Free space can be negative.
|
| CGFloat freeSpace =
|
| maxWidth - (columnsWidth.first + columnsWidth.second + kItemLabelSpacing);
|
| @@ -83,9 +84,11 @@ std::pair<CGFloat, CGFloat> GetResizedColumns(
|
| // Make sure that the sizes are nonnegative.
|
| CGFloat firstColumnPercent =
|
| columnsWidth.first / (columnsWidth.first + columnsWidth.second);
|
| + CGFloat firstColumnSize = std::max(
|
| + kMinUsernameSize, columnsWidth.first + freeSpace * firstColumnPercent);
|
| return std::make_pair(
|
| - columnsWidth.first + freeSpace * firstColumnPercent,
|
| - columnsWidth.second + freeSpace * (1 - firstColumnPercent));
|
| + firstColumnSize,
|
| + maxWidth - kItemLabelSpacing - firstColumnSize);
|
| }
|
|
|
| NSSecureTextField* PasswordLabel(const base::string16& text) {
|
|
|