[Webkit-unassigned] [Bug 51874] [GTK] Port slider painting to GtkStyleContext
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 4 10:20:37 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=51874
--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> 2011-01-04 10:20:37 PST ---
(In reply to comment #2)
> (From update of attachment 77889 [details])
> 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.
Ok
> > WebCore/platform/gtk/RenderThemeGtk3.cpp:628
> > + 0);
>
> Doesn't this produce a warning?
No.
> > 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.
Ok, I'll look at the mac code then.
> > WebCore/platform/gtk/RenderThemeGtk3.cpp:680
> > + renderObject->style()->setWidth(Length((focusWidth + focusPad+ troughBorder) * 2 + sliderWidth, Fixed));
>
> There is a space missing after focusPad.
Ok.
--
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