Title: [218545] releases/WebKitGTK/webkit-2.16/Source/WebKit2
- Revision
- 218545
- Author
- [email protected]
- Date
- 2017-06-20 00:03:53 -0700 (Tue, 20 Jun 2017)
Log Message
Merge r215188 - [GTK] Opening a popup menu does not pre-select the active item
https://bugs.webkit.org/show_bug.cgi?id=170680
Patch by Adrian Perez de Castro <[email protected]> on 2017-04-10
Reviewed by Michael Catanzaro.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu): Use gtk_menu_shell_select_item() to
ensure that the active item appears selected right after popping up the menu.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog (218544 => 218545)
--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog 2017-06-20 06:48:10 UTC (rev 218544)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog 2017-06-20 07:03:53 UTC (rev 218545)
@@ -1,3 +1,14 @@
+2017-04-10 Adrian Perez de Castro <[email protected]>
+
+ [GTK] Opening a popup menu does not pre-select the active item
+ https://bugs.webkit.org/show_bug.cgi?id=170680
+
+ Reviewed by Michael Catanzaro.
+
+ * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
+ (WebKit::WebPopupMenuProxyGtk::showPopupMenu): Use gtk_menu_shell_select_item() to
+ ensure that the active item appears selected right after popping up the menu.
+
2017-05-24 Carlos Garcia Campos <[email protected]>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.16.3 release.
Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp (218544 => 218545)
--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp 2017-06-20 06:48:10 UTC (rev 218544)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/UIProcess/gtk/WebPopupMenuProxyGtk.cpp 2017-06-20 07:03:53 UTC (rev 218545)
@@ -142,6 +142,12 @@
m_client->failedToShowPopupMenu();
return;
}
+
+ // This ensures that the active item gets selected after popping up the menu, and
+ // as it says in "gtkcombobox.c" (line ~1606): it's ugly, but gets the job done.
+ GtkWidget* activeChild = gtk_menu_get_active(GTK_MENU(m_popup));
+ if (activeChild && gtk_widget_get_visible(activeChild))
+ gtk_menu_shell_select_item(GTK_MENU_SHELL(m_popup), activeChild);
}
void WebPopupMenuProxyGtk::hidePopupMenu()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes