[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

commit-queue at webkit.org commit-queue at webkit.org
Fri Jan 21 14:41:28 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit aaf103af4ed1803d9f6e96e873fa44a6f6016a07
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 24 19:02:25 2010 +0000

    2010-12-24  Carlos Garcia Campos  <cgarcia at 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:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74643 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c3343f2..9afb418 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-24  Carlos Garcia Campos  <cgarcia at 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 at sencha.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/css/mediaControlsGtk.css b/WebCore/css/mediaControlsGtk.css
index cc6da14..18b7dcc 100644
--- a/WebCore/css/mediaControlsGtk.css
+++ b/WebCore/css/mediaControlsGtk.css
@@ -49,6 +49,18 @@ audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline {
     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;
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index 73b2d6b..d34847d 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -1006,6 +1006,19 @@ bool RenderThemeGtk::paintMediaSliderThumb(RenderObject* o, const PaintInfo& pai
     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)
diff --git a/WebCore/platform/gtk/RenderThemeGtk.h b/WebCore/platform/gtk/RenderThemeGtk.h
index d377c45..2ec1881 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.h
+++ b/WebCore/platform/gtk/RenderThemeGtk.h
@@ -81,6 +81,7 @@ public:
 
 #if ENABLE(VIDEO)
     virtual String extraMediaControlsStyleSheet();
+    virtual String formatMediaControlsCurrentTime(float currentTime, float duration) const;
 #endif
 
     void getIndicatorMetrics(ControlPart, int& indicatorSize, int& indicatorSpacing) const;
@@ -147,6 +148,7 @@ protected:
     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)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list