[Webkit-unassigned] [Bug 51874] [GTK] Port slider painting to GtkStyleContext

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


https://bugs.webkit.org/show_bug.cgi?id=51874


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77889|review?                     |review-
               Flag|                            |




--- Comment #2 from Martin Robinson <mrobinson at webkit.org>  2011-01-04 10:16:41 PST ---
(From update of attachment 77889)
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.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list