Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1434)

Unified Diff: chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.cc

Issue 11817051: Elide text in the new Autofill UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698