2014-08-21 Michael Catanzaro [GTK] Toggle buttons visually broken with GTK+ 3.13.7 https://bugs.webkit.org/show_bug.cgi?id=136130 Reviewed by NOBODY (OOPS!). No new tests. Hopefully covered by existing tests, and our tests only run with GTK+ 3.6 anyway. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::paintToggle): use GTK_STATE_FLAG_CHECKED when compiling for GTK+ 3.13.7 and above to ensure toggle buttons display as toggled. diff --git a/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp b/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp index 3630c43dffde59c6ea843c35a37e8e94611e4ae5..6d811a1747ac3ca7ff376bb6a0fcb02273c335d3 100644 --- a/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp +++ b/Source/WebCore/platform/gtk/RenderThemeGtk3.cpp @@ -253,7 +253,11 @@ static void paintToggle(const RenderThemeGtk* theme, GType widgetType, const Ren if (theme->isIndeterminate(renderObject)) flags |= GTK_STATE_FLAG_INCONSISTENT; else if (theme->isChecked(renderObject)) +#if GTK_CHECK_VERSION(3, 13, 7) + flags |= GTK_STATE_FLAG_CHECKED; +#else flags |= GTK_STATE_FLAG_ACTIVE; +#endif if (theme->isPressed(renderObject)) flags |= GTK_STATE_FLAG_SELECTED; gtk_style_context_set_state(context, static_cast(flags));