Since 3.19.7 we can get at min-width and min-height as style properties: https://git.gnome.org/browse/gtk+/commit/gtk/gtkcssstylepropertyimpl.c?id=ea69bf8c17dd5c9e7f76bf3cb4f56ec07b2e821f According to Company, we need to use these by default, rather than indicator-size. If either one is zero, ignore them and fall back to indicator-size. That should fix our blurry toggle buttons (checkbuttons, radio buttons). We should also audit all our other uses of style properties to make sure we're matching GTK+ 3.19.
Created attachment 270923 [details] Patch
Attachment 270923 [details] did not pass style-queue: ERROR: Source/WebCore/rendering/RenderThemeGtk.cpp:551: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebCore/rendering/RenderThemeGtk.cpp:598: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 270923 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=270923&action=review Thanks, I presume you tested it. > Source/WebCore/rendering/RenderThemeGtk.cpp:551 > + gtk_style_context_get(childContext.get(), gtk_style_context_get_state (childContext.get()), "min-width", &minWidth, "min-height", &minHeight, nullptr); Look what style checker caught: gtk_style_context_get_state ( > Source/WebCore/rendering/RenderThemeGtk.cpp:555 > + minSize.setHeight(minHeight); Company's suggestion was to do this: if (minWidth && minHeight) { minSize.setWidth(minWidth); minSize.setHeight(minHeight); } Any particular reason for not following that? > Source/WebCore/rendering/RenderThemeGtk.cpp:598 > + gtk_style_context_get(context.get(), gtk_style_context_get_state (context.get()), "min-width", &minWidth, "min-height", &minHeight, nullptr); Ditto > Source/WebCore/rendering/RenderThemeGtk.cpp:602 > + minSize.setHeight(minHeight); Ditto
(In reply to comment #3) > Company's suggestion was to do this: > > if (minWidth && minHeight) { > minSize.setWidth(minWidth); > minSize.setHeight(minHeight); > } > To be 100% absolutely exact, it's if (minWidth) minSize.setWidth(minWidth); if (minHeight) minSize.setHeight(minHeight); because that's what the code in https://git.gnome.org/browse/gtk+/tree/gtk/gtkbuiltinicon.c#n56 essentially does.
(In reply to comment #4) > (In reply to comment #3) > > Company's suggestion was to do this: > > > > if (minWidth && minHeight) { > > minSize.setWidth(minWidth); > > minSize.setHeight(minHeight); > > } > > > To be 100% absolutely exact, it's > > if (minWidth) > minSize.setWidth(minWidth); > if (minHeight) > minSize.setHeight(minHeight); > > because that's what the code in > https://git.gnome.org/browse/gtk+/tree/gtk/gtkbuiltinicon.c#n56 essentially > does. Which is exactly what the patch does.
Committed r196364: <http://trac.webkit.org/changeset/196364>