[Webkit-unassigned] [Bug 26304] [GTK] Add controls for playing html5 video.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 5 12:58:03 PDT 2009


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





--- Comment #21 from Zan Dobersek <zandobersek at gmail.com>  2009-10-05 12:58:02 PDT ---
(In reply to comment #20)
> Also:
> 
> ../../WebCore/platform/gtk/RenderThemeGtk.cpp: In member function ‘virtual
> WebCore::String WebCore::RenderThemeGtk::extraMediaControlsStyleSheet()’:
> ../../WebCore/platform/gtk/RenderThemeGtk.cpp:598: error:
> ‘mediaControlsGtkUserAgentStyleSheet’ was not declared in this scope
> make[1]: *** [WebCore/platform/gtk/libWebCore_la-RenderThemeGtk.lo] Error 1
> make[1]: Leaving directory `/home/xan/git/WebKit/build/normal'
> 
> Leftover from other patches?

Actually, mediaControlsGtk.css stylesheet was not included in the patch,
resulting in these errors.

> >+static Color panelColor = 0;
> >+static Color sliderColor = 0;
> >+static Color sliderThumbColor = 0;
> >+
> >+// Names of these icons can vary because of text direction.
> >+static char* playButtonIconName = 0;
> >+static char* seekBackButtonIconName = 0;
> >+static char* seekForwardButtonIconName = 0;
> >+
> >+static int mediaIconSize = 16;
> >+static int mediaSliderHeight = 14;
> 
> This should be const. Also, I'd say these sizes should be calculated
> dynamically, maybe based on the size of the video element we are showing?

Sizes of the control panel, timeline container and control buttons are all set
in the extra stylesheet that is provided by this patch. With all these sizes
determined in that stylesheet, I think we can afford having hard-coded icon
sizes and slider height. It wouldn't make sense to do any calculations based on
the size of the video element.

> >+#if ENABLE(VIDEO)
> >+    initMediaStyling(gtk_rc_get_style(GTK_WIDGET(gtkContainer())));
> >+#endif
> 
> Do you actually need to use gtk_rc_get_style or would gtk_widget_get_style be
> enough?

Some testing showed that gtk_widget_get_style apparently returns style for the
default 'Gnome' theme, while gtk_rc_get_style returns the currently used theme
(Human, Dust, whatever theme is used).

> The progress bar does not seem to work at all in my testing? (Eg,
> http://people.mozilla.com/~vladimir/mdemos/video1.html).

With only this patch applied, it really doesn't work properly. To fix this,
adjustSliderThumbSize should be implemented, setting some (again, we can afford
a hard-coded one) value for height and width of a media slider thumb.

First patches included this implementation, but it was later requested to move
it to another patch. I plan to upload a patch for that issue in near future.

> The controls seem to be over the video content, is this the intended behavior?
> The spec does not seem to say much about it though.

Controls should be positioned at the bottom of the video element, with height
of 20 pixels. When mouse cursor moves out, the controls fade out, unless the
video is paused, so that's not really a problem.

Regards,
Zan Dobersek

-- 
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