[Gtk] display:none has no effect on <option> element.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Nov 2011 18:56:08 +0000 (18:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Nov 2011 18:56:08 +0000 (18:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=72370

Patch by Antaryami Pandia <antaryami.pandia@motorola.com> on 2011-11-16
Reviewed by Martin Robinson.

* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::appendItem):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::createGtkActionForMenuItem):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100470 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/GtkPopupMenu.cpp
Source/WebCore/platform/gtk/PopupMenuGtk.cpp

index cb8cae18deab12941a1527b47ef36057b022204c..b8e934678124b39dc27e10963092097dd6c50c64 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-16  Antaryami Pandia  <antaryami.pandia@motorola.com>
+
+        [Gtk] display:none has no effect on <option> element.
+        https://bugs.webkit.org/show_bug.cgi?id=72370
+
+        Reviewed by Martin Robinson.
+
+        * platform/gtk/GtkPopupMenu.cpp:
+        (WebCore::GtkPopupMenu::appendItem):
+        * platform/gtk/PopupMenuGtk.cpp:
+        (WebCore::PopupMenuGtk::createGtkActionForMenuItem):
+
 2011-11-16  Dan Winship  <danw@gnome.org>
 
         [GTK] Fix platformDefersLoading to handle non-http requests, and
index 14eefa98486723b6a06c04130a4efb74e1397ba6..b9112e9bfa488ef256f0c513a05b4b4ea64978c1 100644 (file)
@@ -67,7 +67,9 @@ void GtkPopupMenu::appendItem(GtkAction* action)
     gtk_widget_set_tooltip_text(menuItem, gtk_action_get_tooltip(action));
     g_signal_connect(menuItem, "select", G_CALLBACK(GtkPopupMenu::selectItemCallback), this);
     gtk_menu_shell_append(GTK_MENU_SHELL(m_popup.get()), menuItem);
-    gtk_widget_show(menuItem);
+
+    if (gtk_action_is_visible(action))
+        gtk_widget_show(menuItem);
 }
 
 void GtkPopupMenu::popUp(const IntSize& menuSize, const IntPoint& menuPosition, int itemCount, int selectedItem, const GdkEvent* event)
index cca3f82f6934b4edca99f1722b02f917193d0fc2..02ee7c5ce438e53b2c25379fdffbb71c7dfbf48a 100644 (file)
@@ -58,6 +58,7 @@ GtkAction* PopupMenuGtk::createGtkActionForMenuItem(int itemIndex)
     g_object_set_data(G_OBJECT(action), "popup-menu-action-index", GINT_TO_POINTER(itemIndex));
     g_signal_connect(action, "activate", G_CALLBACK(menuItemActivated), this);
     // FIXME: Apply the PopupMenuStyle from client()->itemStyle(i)
+    gtk_action_set_visible(action, !client()->itemStyle(itemIndex).isDisplayNone());
     gtk_action_set_sensitive(action, client()->itemIsEnabled(itemIndex));
 
     return action;