| Index: chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.cc
|
| diff --git a/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.cc b/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.cc
|
| index fbe59486cf0c6b58e5ffb8cbbfd7e446f7c91384..aa55ad30d73ef4f095eceac432eabced5c67240f 100644
|
| --- a/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.cc
|
| +++ b/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.cc
|
| @@ -70,7 +70,6 @@ void AutofillPopupViewGtk::Hide() {
|
| }
|
|
|
| void AutofillPopupViewGtk::Show() {
|
| - SetInitialBounds();
|
| UpdateBoundsAndRedrawPopup();
|
|
|
| gtk_widget_show(window_);
|
| @@ -306,32 +305,6 @@ void AutofillPopupViewGtk::DrawAutofillEntry(cairo_t* cairo_context,
|
| cairo_restore(cairo_context);
|
| }
|
|
|
| -void AutofillPopupViewGtk::SetInitialBounds() {
|
| - GdkScreen* screen =
|
| - gtk_widget_get_screen(GTK_WIDGET(controller_->container_view()));
|
| - gint screen_height = gdk_screen_get_height(screen);
|
| -
|
| - int bottom_of_field = controller_->element_bounds().bottom();
|
| - int popup_height = controller_->GetPopupRequiredHeight();
|
| -
|
| - // Find the correct top position of the popup so that is doesn't go off
|
| - // the screen.
|
| - int top_of_popup = 0;
|
| - if (screen_height < bottom_of_field + popup_height) {
|
| - // The popup must appear above the field.
|
| - top_of_popup = controller_->element_bounds().y() - popup_height;
|
| - } else {
|
| - // The popup can appear below the field.
|
| - top_of_popup = bottom_of_field;
|
| - }
|
| -
|
| - controller_->SetPopupBounds(gfx::Rect(
|
| - controller_->element_bounds().x(),
|
| - top_of_popup,
|
| - controller_->GetPopupRequiredWidth(),
|
| - popup_height));
|
| -}
|
| -
|
| AutofillPopupView* AutofillPopupView::Create(
|
| AutofillPopupController* controller) {
|
| return new AutofillPopupViewGtk(controller);
|
|
|