Index: ash/system/user/tray_user.cc |
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc |
index 308fe51a46c301c86d47b14a30f61ce0850f99c5..287e584e3000bdcc6c1d6aed1f0f0114e3b9560e 100644 |
--- a/ash/system/user/tray_user.cc |
+++ b/ash/system/user/tray_user.cc |
@@ -432,8 +432,9 @@ void UserView::Layout() { |
// Give the remaining space to the user card. |
gfx::Rect user_card_area = contents_area; |
- user_card_area.set_width(contents_area.width() - |
- (logout_area.width() + kTrayPopupPaddingBetweenItems)); |
+ int remaining_width = contents_area.width() - |
+ (logout_area.width() + kTrayPopupPaddingBetweenItems); |
+ user_card_area.set_width(std::max(0, remaining_width)); |
user_card_->SetBoundsRect(user_card_area); |
} else if (user_card_) { |
user_card_->SetBoundsRect(contents_area); |