Index: chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
index 0cef3d8b9242948834833c0bcc7542cc0a8d50cd..91f7bb4cfcabb0008451990f450a5b8e513e8eec 100644 |
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
@@ -208,9 +208,9 @@ class SectionRowView : public views::View { |
int end_x = bounds.width(); |
views::View* decorated = child_at(2); |
if (decorated->visible()) { |
- decorated->SizeToPreferredSize(); |
- decorated->SetX(bounds.width() - decorated->bounds().width()); |
- decorated->SetY(bounds.y()); |
+ const int preferred_width = decorated->GetPreferredSize().width(); |
+ decorated->SetBounds(bounds.width() - preferred_width, bounds.y(), |
+ preferred_width, bounds.height()); |
end_x = decorated->bounds().x() - kAroundTextPadding; |
} |