case MOZ_GTK_CHECKMENUITEM: case MOZ_GTK_RADIOMENUITEM: ensure_check_menu_item_widget(); w = gCheckMenuItemWidget; break;
moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* xthickness,                          gint* ythickness){    GtkWidget* w;    switch (widget) {    case MOZ_GTK_BUTTON:        {            /* Constant in gtkbutton.c */            static const gint child_spacing = 1;            gboolean interior_focus;            gint focus_width, focus_pad;            ensure_button_widget();            moz_gtk_button_get_focus(&interior_focus,                                     &focus_width, &focus_pad);            *xthickness = *ythickness =                GTK_CONTAINER(gButtonWidget)->border_width + child_spacing                + focus_width + focus_pad;            *xthickness += gButtonWidget->style->xthickness;            *ythickness += gButtonWidget->style->ythickness;            return MOZ_GTK_SUCCESS;        }    case MOZ_GTK_TOOLBAR:        ensure_toolbar_widget();        w = gToolbarWidget;        break;    case MOZ_GTK_ENTRY:        ensure_entry_widget();        w = gEntryWidget;        break;    case MOZ_GTK_DROPDOWN_ARROW:        ensure_arrow_widget();        w = gDropdownButtonWidget;        break;    case MOZ_GTK_DROPDOWN:        ensure_option_menu_widget();        w = gOptionMenuWidget;        break;    case MOZ_GTK_TABPANELS:        ensure_tab_widget();        w = gTabWidget;        break;    case MOZ_GTK_PROGRESSBAR:        ensure_progress_widget();        w = gProgressWidget;        break;    case MOZ_GTK_FRAME:        ensure_frame_widget();        w = gFrameWidget;        break;    case MOZ_GTK_CHECKBUTTON_LABEL:    case MOZ_GTK_RADIOBUTTON_LABEL:        {            gboolean interior_focus;            gint focus_width, focus_pad;            /* If the focus is interior, then the label has a border of               (focus_width + focus_pad). */            if (widget == MOZ_GTK_CHECKBUTTON_LABEL)                moz_gtk_checkbox_get_focus(&interior_focus,                                           &focus_width, &focus_pad);            else                moz_gtk_radio_get_focus(&interior_focus,                                        &focus_width, &focus_pad);            if (interior_focus)                *xthickness = *ythickness = (focus_width + focus_pad);            else                *xthickness = *ythickness = 0;            return MOZ_GTK_SUCCESS;        }    case MOZ_GTK_CHECKBUTTON_CONTAINER:    case MOZ_GTK_RADIOBUTTON_CONTAINER:        {            gboolean interior_focus;            gint focus_width, focus_pad;            /* If the focus is _not_ interior, then the container has a border               of (focus_width + focus_pad). */            if (widget == MOZ_GTK_CHECKBUTTON_CONTAINER) {                moz_gtk_checkbox_get_focus(&interior_focus,                                           &focus_width, &focus_pad);                w = gCheckboxWidget;            } else {                moz_gtk_radio_get_focus(&interior_focus,                                        &focus_width, &focus_pad);                w = gRadiobuttonWidget;            }            *xthickness = *ythickness = GTK_CONTAINER(w)->border_width;            if (!interior_focus) {                *xthickness += (focus_width + focus_pad);                *ythickness += (focus_width + focus_pad);            }            return MOZ_GTK_SUCCESS;        }    case MOZ_GTK_MENUBAR:        ensure_menu_bar_widget();        w = gMenuBarWidget;        break;    case MOZ_GTK_MENUPOPUP:        ensure_menu_popup_widget();        w = gMenuPopupWidget;        break;    case MOZ_GTK_MENUITEM:        ensure_menu_item_widget();        w = gMenuItemWidget;        break;    /* These widgets have no borders, since they are not containers. */    case MOZ_GTK_CHECKBUTTON:    case MOZ_GTK_RADIOBUTTON:    case MOZ_GTK_SCROLLBAR_BUTTON:    case MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL:    case MOZ_GTK_SCROLLBAR_TRACK_VERTICAL:    case MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL:    case MOZ_GTK_SCROLLBAR_THUMB_VERTICAL:    case MOZ_GTK_GRIPPER:    case MOZ_GTK_PROGRESS_CHUNK:    case MOZ_GTK_TAB:    /* These widgets have no borders.*/    case MOZ_GTK_TOOLTIP:    case MOZ_GTK_WINDOW:        *xthickness = *ythickness = 0;        return MOZ_GTK_SUCCESS;    default:        g_warning("Unsupported widget type: %d", widget);        return MOZ_GTK_UNKNOWN_WIDGET;    }    *xthickness = XTHICKNESS(w->style);    *ythickness = YTHICKNESS(w->style);    return MOZ_GTK_SUCCESS;}