bug 1303964 draw only background and frame of separator menuitems in GTK versions > 3.20 r?stransky
In GTK 3.20, gtk_menu_item_draw() just draws the root widget gadget, depending
on the theme to style menu items with CSS name "separator" appropriately.
MozReview-Commit-ID: 6AIxPzFe0Rg
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -1769,16 +1769,19 @@ moz_gtk_menu_popup_paint(cairo_t *cr, Gd
static gint
moz_gtk_menu_separator_paint(cairo_t *cr, GdkRectangle* rect,
GtkTextDirection direction)
{
GtkWidgetState defaultState = { 0 };
moz_gtk_menu_item_paint(MOZ_GTK_MENUSEPARATOR, cr, rect,
&defaultState, direction);
+ if (gtk_get_minor_version() >= 20)
+ return MOZ_GTK_SUCCESS;
+
GtkStyleContext* style;
gboolean wide_separators;
gint separator_height;
gint x, y, w;
GtkBorder padding;
style = ClaimStyleContext(MOZ_GTK_MENUSEPARATOR, direction);
gtk_style_context_get_padding(style, GTK_STATE_FLAG_NORMAL, &padding);