[webkit-reviews] review denied: [Bug 51874] [GTK] Port slider painting to GtkStyleContext : [Attachment 77889] Use GtkStyleContext to paint sliders

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 4 10:16:40 PST 2011


Martin Robinson <mrobinson at webkit.org> has denied Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 51874: [GTK] Port slider painting to GtkStyleContext
https://bugs.webkit.org/show_bug.cgi?id=51874

Attachment 77889: Use GtkStyleContext to paint sliders
https://bugs.webkit.org/attachment.cgi?id=77889&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=77889&action=review

Looks great, but I think it makes sense to create a
RenderThemeGtk::adjustMediaSliderThumbSize. See below.

> WebCore/platform/gtk/RenderThemeGtk3.cpp:621
> +    gint sliderWidth, sliderLength, troughBorder;
> +    gint focusWidth, focusPad;

Please put these all on one line.

> WebCore/platform/gtk/RenderThemeGtk3.cpp:628
> +				   0);

Doesn't this produce a warning?

> WebCore/platform/gtk/RenderThemeGtk3.cpp:660
>  #if ENABLE(VIDEO)
> -    if (part == MediaSliderThumbPart) {
> -	   o->style()->setWidth(Length(m_mediaSliderThumbWidth, Fixed));
> -	   o->style()->setHeight(Length(m_mediaSliderThumbHeight, Fixed));
> -	   return;
> -    }
> -    if (part == MediaVolumeSliderThumbPart)
> -	   return;
> +	   if (part == MediaSliderThumbPart) {
> +	       renderObject->style()->setWidth(Length(m_mediaSliderThumbWidth,
Fixed));
> +	      
renderObject->style()->setHeight(Length(m_mediaSliderThumbHeight, Fixed));
> +	   }
>  #endif

Instead of using a switch statement here and duplicating this logic between
RenderThemeGtk2 and RenderThemeGtk3, let's take the approach that
RenderThemeMac.mm takes, but put RenderThemeGtk::adjustMediaSliderThumbSize in
the platform-independent file. That way we can avoid duplicating this section.

> WebCore/platform/gtk/RenderThemeGtk3.cpp:680
> +	       renderObject->style()->setWidth(Length((focusWidth + focusPad+
troughBorder) * 2 + sliderWidth, Fixed));

There is a space missing after focusPad.


More information about the webkit-reviews mailing list