2011-04-20 Gyuyoung Kim <gyuyoung.kim@samsung.com>
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 07:18:56 +0000 (07:18 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Apr 2011 07:18:56 +0000 (07:18 +0000)
        Reviewed by Daniel Bates.

        [EFL] Add current time to media control panel.
        https://bugs.webkit.org/show_bug.cgi?id=58866

        Implement paintMediaCurrentTime() to show playing time of media content.

        * platform/efl/RenderThemeEfl.cpp:
        (WebCore::RenderThemeEfl::RenderThemeEfl):
        (WebCore::RenderThemeEfl::formatMediaControlsCurrentTime):
        (WebCore::RenderThemeEfl::paintMediaCurrentTime):
        * platform/efl/RenderThemeEfl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84348 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/efl/RenderThemeEfl.h

index c2453a3c2646fc1e9a73429aa60c4cc43be2ca83..92ccf724328cf01e9422c904b6641a5199697740 100644 (file)
@@ -1,3 +1,18 @@
+2011-04-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Reviewed by Daniel Bates.
+
+        [EFL] Add current time to media control panel.
+        https://bugs.webkit.org/show_bug.cgi?id=58866
+
+        Implement paintMediaCurrentTime() to show playing time of media content.
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::RenderThemeEfl):
+        (WebCore::RenderThemeEfl::formatMediaControlsCurrentTime):
+        (WebCore::RenderThemeEfl::paintMediaCurrentTime):
+        * platform/efl/RenderThemeEfl.h:
+
 2011-04-19  Jungshik Shin  <jshin@chromium.org>
 
         Reviewed by Adam Barth
 2011-04-19  Jungshik Shin  <jshin@chromium.org>
 
         Reviewed by Adam Barth
index 3ce50e3f2ce35e21e1a250821e77d320c73d61ed..256988ad1500b3a1fda10d4484171d9fddc45a8b 100644 (file)
@@ -41,6 +41,7 @@
 #include "RenderSlider.h"
 #include "UserAgentStyleSheets.h"
 #include <wtf/text/CString.h>
 #include "RenderSlider.h"
 #include "UserAgentStyleSheets.h"
 #include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
 
 #include <Ecore_Evas.h>
 #include <Edje.h>
 
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -690,6 +691,9 @@ RenderThemeEfl::RenderThemeEfl(Page* page)
     , m_entryTextForegroundColor(0, 0, 0)
     , m_searchTextBackgroundColor(0, 0, 0, 0)
     , m_searchTextForegroundColor(0, 0, 0)
     , m_entryTextForegroundColor(0, 0, 0)
     , m_searchTextBackgroundColor(0, 0, 0, 0)
     , m_searchTextForegroundColor(0, 0, 0)
+#if ENABLE(VIDEO)
+    , m_panelColor(220, 220, 195) // light tannish color.
+#endif
     , m_canvas(0)
     , m_edje(0)
 {
     , m_canvas(0)
     , m_edje(0)
 {
@@ -1095,8 +1099,7 @@ String RenderThemeEfl::extraMediaControlsStyleSheet()
 
 String RenderThemeEfl::formatMediaControlsCurrentTime(float currentTime, float duration) const
 {
 
 String RenderThemeEfl::formatMediaControlsCurrentTime(float currentTime, float duration) const
 {
-    notImplemented();
-    return String();
+    return makeString(formatMediaControlsTime(currentTime), " / ", formatMediaControlsTime(duration));
 }
 
 bool RenderThemeEfl::paintMediaFullscreenButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 }
 
 bool RenderThemeEfl::paintMediaFullscreenButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
@@ -1190,8 +1193,8 @@ bool RenderThemeEfl::paintMediaVolumeSliderThumb(RenderObject* object, const Pai
 
 bool RenderThemeEfl::paintMediaCurrentTime(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
 
 bool RenderThemeEfl::paintMediaCurrentTime(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
-    notImplemented();
-    return false;
+    info.context->fillRect(FloatRect(rect), m_panelColor, ColorSpaceDeviceRGB);
+    return true;
 }
 #endif
 }
 }
 #endif
 }
index 054f91d8beb6be738bab64fa8a0f138e58306a94..3ea3118f6e2812f36edf1c8f47e0ca0076bf9be0 100644 (file)
@@ -209,6 +209,9 @@ private:
     Color m_entryTextForegroundColor;
     Color m_searchTextBackgroundColor;
     Color m_searchTextForegroundColor;
     Color m_entryTextForegroundColor;
     Color m_searchTextBackgroundColor;
     Color m_searchTextForegroundColor;
+#if ENABLE(VIDEO)
+    Color m_panelColor;
+#endif
     Ecore_Evas* m_canvas;
     Evas_Object* m_edje;
 
     Ecore_Evas* m_canvas;
     Evas_Object* m_edje;