Comment 151 for bug 219385

Revision history for this message
In , Karlt (karlt) wrote :

Comment on attachment 595369
gtk drawing patch v.5

Thanks very much.
Just a save/restore pair to remove in moz_gtk_combo_box_paint:

>- gtk_paint_arrow(style, drawable, state_type, shadow_type, cliprect,
>- gComboBoxArrowWidget, "arrow", GTK_ARROW_DOWN, TRUE,
>- real_arrow_rect.x, real_arrow_rect.y,
>- real_arrow_rect.width, real_arrow_rect.height);
>-
>+ style = gtk_widget_get_style_context(gComboBoxArrowWidget);
>+ gtk_style_context_save(style);
>+
>+ gtk_render_arrow(style, cr, ARROW_DOWN,
>+ real_arrow_rect.x, real_arrow_rect.y,
>+ real_arrow_rect.width);

This is no longer applying the state when drawing the arrow, but that seems to
be correct, because I can't see that GtkComboBox passes its state to the style
context for gtk_render_arrow.

> if (!gComboBoxSeparatorWidget)
> return MOZ_GTK_SUCCESS;

>+ gtk_style_context_restore(style);

This save/restore is not balanced when taking the early return, but is
unnecessary anyway because the style context was not changed.

The save/restore for the style context of the gComboBoxSeparatorWidget is
similarly unnecessary.