Reviewed by Xan Lopez.
[GTK] Show current time / total in media player
https://bugs.webkit.org/show_bug.cgi?id=51535
* css/mediaControlsGtk.css:
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::formatMediaControlsCurrentTime):
(WebCore::RenderThemeGtk::paintMediaCurrentTime):
* platform/gtk/RenderThemeGtk.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74643
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2010-12-24 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Show current time / total in media player
+ https://bugs.webkit.org/show_bug.cgi?id=51535
+
+ * css/mediaControlsGtk.css:
+ (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
+ * platform/gtk/RenderThemeGtk.cpp:
+ (WebCore::RenderThemeGtk::formatMediaControlsCurrentTime):
+ (WebCore::RenderThemeGtk::paintMediaCurrentTime):
+ * platform/gtk/RenderThemeGtk.h:
+
2010-12-24 Jan Erik Hanssen <jhanssen@sencha.com>
Reviewed by Eric Seidel.
height: 20px;
}
+audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display {
+ -webkit-appearance: media-current-time-display;
+ -webkit-user-select: none;
+ display: inline-block;
+ height: 20px;
+
+ padding: 5px;
+
+ text-align: center;
+ font-size: 10px;
+}
+
audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button {
width: 20px;
height: 20px;
paintInfo.context->fillRoundedRect(r, IntSize(3, 3), IntSize(3, 3), IntSize(3, 3), IntSize(3, 3), m_sliderThumbColor, ColorSpaceDeviceRGB);
return false;
}
+
+String RenderThemeGtk::formatMediaControlsCurrentTime(float currentTime, float duration) const
+{
+ return formatMediaControlsTime(currentTime) + " / " + formatMediaControlsTime(duration);
+}
+
+bool RenderThemeGtk::paintMediaCurrentTime(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect)
+{
+ GraphicsContext* context = paintInfo.context;
+
+ context->fillRect(FloatRect(rect), m_panelColor, ColorSpaceDeviceRGB);
+ return false;
+}
#endif
#if ENABLE(PROGRESS_TAG)
#if ENABLE(VIDEO)
virtual String extraMediaControlsStyleSheet();
+ virtual String formatMediaControlsCurrentTime(float currentTime, float duration) const;
#endif
void getIndicatorMetrics(ControlPart, int& indicatorSize, int& indicatorSpacing) const;
virtual bool paintMediaSeekForwardButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMediaSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMediaSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
+ virtual bool paintMediaCurrentTime(RenderObject*, const PaintInfo&, const IntRect&);
#endif
#if ENABLE(PROGRESS_TAG)