Modified: trunk/Source/WebKit2/ChangeLog (207869 => 207870)
--- trunk/Source/WebKit2/ChangeLog 2016-10-26 05:43:04 UTC (rev 207869)
+++ trunk/Source/WebKit2/ChangeLog 2016-10-26 07:45:14 UTC (rev 207870)
@@ -1,3 +1,18 @@
+2016-10-26 Carlos Garcia Campos <[email protected]>
+
+ REGRESSION(r206505) [GTK] Build broken with GTK+ 3.14
+ https://bugs.webkit.org/show_bug.cgi?id=162776
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Do not use gtk_widget_get_action_group() when GTK+ < 3.16, use g_object_set instead to attach the action group
+ to the menu widget.
+
+ * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
+ (WebKit::WebContextMenuProxyGtk::append):
+ (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
+ (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
+
2016-10-25 Alex Christensen <[email protected]>
CMake build fix.
Modified: trunk/Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.cpp (207869 => 207870)
--- trunk/Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.cpp 2016-10-26 05:43:04 UTC (rev 207869)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.cpp 2016-10-26 07:45:14 UTC (rev 207870)
@@ -66,7 +66,11 @@
GRefPtr<GMenuItem> gMenuItem;
GAction* action = ""
ASSERT(action);
+#if GTK_CHECK_VERSION(3, 16, 0)
g_action_map_add_action(G_ACTION_MAP(gtk_widget_get_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup)), action);
+#else
+ g_action_map_add_action(G_ACTION_MAP(g_object_get_data(G_OBJECT(m_menu), gContextMenuItemGroup)), action);
+#endif
switch (menuItem.type()) {
case ActionType:
@@ -179,6 +183,9 @@
{
GRefPtr<GSimpleActionGroup> group = adoptGRef(g_simple_action_group_new());
gtk_widget_insert_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup, G_ACTION_GROUP(group.get()));
+#if !GTK_CHECK_VERSION(3, 16, 0)
+ g_object_set_data(G_OBJECT(m_menu), gContextMenuItemGroup, group.get());
+#endif
webkitWebViewBaseSetActiveContextMenuProxy(WEBKIT_WEB_VIEW_BASE(m_webView), this);
}
@@ -190,7 +197,10 @@
g_signal_handler_disconnect(handler.value, handler.key);
m_signalHandlers.clear();
- gtk_widget_insert_action_group(GTK_WIDGET(m_menu), "webkitContextMenu", nullptr);
+ gtk_widget_insert_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup, nullptr);
+#if !GTK_CHECK_VERSION(3, 16, 0)
+ g_object_set_data(G_OBJECT(m_menu), gContextMenuItemGroup, nullptr);
+#endif
gtk_widget_destroy(GTK_WIDGET(m_menu));
}