diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-10 15:31:59 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-17 13:35:59 -0800 |
commit | 28040489d744e0c5d475a88663056c9040ed5320 (patch) | |
tree | c463676791e4a63e452a95f0a12b2a8519730693 /WebCore/platform/gtk/PopupMenuGtk.cpp | |
parent | eff9be92c41913c92fb1d3b7983c071f3e718678 (diff) | |
download | external_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2 |
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebCore/platform/gtk/PopupMenuGtk.cpp')
-rw-r--r-- | WebCore/platform/gtk/PopupMenuGtk.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/WebCore/platform/gtk/PopupMenuGtk.cpp b/WebCore/platform/gtk/PopupMenuGtk.cpp index a679734..e7ff78e 100644 --- a/WebCore/platform/gtk/PopupMenuGtk.cpp +++ b/WebCore/platform/gtk/PopupMenuGtk.cpp @@ -97,7 +97,7 @@ void PopupMenuGtk::show(const IntRect& rect, FrameView* view, int index) GList* children = gtk_container_get_children(GTK_CONTAINER(m_popup.get())); GList* p = children; - if (size) + if (size) { for (int i = 0; i < size; i++) { if (i > index) break; @@ -112,9 +112,11 @@ void PopupMenuGtk::show(const IntRect& rect, FrameView* view, int index) m_menuPosition.setY(m_menuPosition.y() - itemRequisition.height); p = g_list_next(p); - } else - // Center vertically the empty popup in the combo box area - m_menuPosition.setY(m_menuPosition.y() - rect.height() / 2); + } + } else { + // Center vertically the empty popup in the combo box area + m_menuPosition.setY(m_menuPosition.y() - rect.height() / 2); + } g_list_free(children); gtk_menu_popup(m_popup.get(), 0, 0, reinterpret_cast<GtkMenuPositionFunc>(menuPositionFunction), this, 0, gtk_get_current_event_time()); |