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 3f5e6edac8e605d561423fdccfab9101b1da0edf..2859056d3254ce9714be5f7bb1690f273d9e2281 100644 |
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc |
@@ -207,9 +207,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; |
} |