2011-04-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 01:35:33 +0000 (01:35 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 01:35:33 +0000 (01:35 +0000)
        Reviewed by Eric Carlson.

        [EFL] Add seek forward / backward buttons to MediaControl UI.
        https://bugs.webkit.org/show_bug.cgi?id=56810

        Add seek forward / backward buttons to media control. And, change formType name
        for media control.

        * platform/efl/RenderThemeEfl.cpp:
        (WebCore::RenderThemeEfl::edjeGroupFromFormType):
        (WebCore::RenderThemeEfl::emitMediaButtonSignal):
        (WebCore::RenderThemeEfl::paintMediaMuteButton):
        (WebCore::RenderThemeEfl::paintMediaPlayButton):
        (WebCore::RenderThemeEfl::paintMediaSeekBackButton):
        (WebCore::RenderThemeEfl::paintMediaSeekForwardButton):
        * platform/efl/RenderThemeEfl.h:
2011-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>

        Reviewed by Eric Carlson.

        [EFL] Add seek forward / backward buttons to MediaControl UI.
        https://bugs.webkit.org/show_bug.cgi?id=56810

        Add seek forward / backward buttons to media control.

        * DefaultTheme/default.edc:
        * DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc: Added.
        * DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png: Added.
        * DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc: Added.
        * DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png: Added.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/efl/RenderThemeEfl.cpp
Source/WebCore/platform/efl/RenderThemeEfl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/DefaultTheme/default.edc
Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc [new file with mode: 0644]
Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png [new file with mode: 0755]
Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc [new file with mode: 0644]
Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png [new file with mode: 0755]

index e141040..102a210 100644 (file)
@@ -1,3 +1,22 @@
+2011-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Reviewed by Eric Carlson.
+
+        [EFL] Add seek forward / backward buttons to MediaControl UI.
+        https://bugs.webkit.org/show_bug.cgi?id=56810
+
+        Add seek forward / backward buttons to media control. And, change formType name
+        for media control.
+
+        * platform/efl/RenderThemeEfl.cpp:
+        (WebCore::RenderThemeEfl::edjeGroupFromFormType):
+        (WebCore::RenderThemeEfl::emitMediaButtonSignal):
+        (WebCore::RenderThemeEfl::paintMediaMuteButton):
+        (WebCore::RenderThemeEfl::paintMediaPlayButton):
+        (WebCore::RenderThemeEfl::paintMediaSeekBackButton):
+        (WebCore::RenderThemeEfl::paintMediaSeekForwardButton):
+        * platform/efl/RenderThemeEfl.h:
+
 2011-04-10  Chris Guillory  <chris.guillory@google.com>
 
         Reviewed by Eric Seidel.
index 8b5481d..3ce50e3 100644 (file)
@@ -606,6 +606,8 @@ const char* RenderThemeEfl::edjeGroupFromFormType(FormType type) const
 #if ENABLE(VIDEO)
         W("mediacontrol/playpause_button"),
         W("mediacontrol/mute_button"),
+        W("mediacontrol/seekforward_button"),
+        W("mediacontrol/seekbackward_button"),
 #endif
 #undef W
         0
@@ -1076,7 +1078,11 @@ bool RenderThemeEfl::emitMediaButtonSignal(FormType formType, MediaControlElemen
         edje_object_signal_emit(entry->o, "mute", "");
     else if (mediaElementType == MediaUnMuteButton)
         edje_object_signal_emit(entry->o, "sound", "");
-    else 
+    else if (mediaElementType == MediaSeekForwardButton)
+        edje_object_signal_emit(entry->o, "seekforward", "");
+    else if (mediaElementType == MediaSeekBackButton)
+        edje_object_signal_emit(entry->o, "seekbackward", "");
+    else
         return false;
 
     return true;
@@ -1107,35 +1113,49 @@ bool RenderThemeEfl::paintMediaMuteButton(RenderObject* object, const PaintInfo&
 
     HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(mediaNode);
 
-    if (!emitMediaButtonSignal(MediaMuteUnMuteButton, mediaElement->muted() ? MediaMuteButton : MediaUnMuteButton, rect))
+    if (!emitMediaButtonSignal(MuteUnMuteButton, mediaElement->muted() ? MediaMuteButton : MediaUnMuteButton, rect))
         return false;
 
-    return paintThemePart(object, MediaMuteUnMuteButton, info, rect);
+    return paintThemePart(object, MuteUnMuteButton, info, rect);
 }
 
 bool RenderThemeEfl::paintMediaPlayButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
     Node* node = object->node();
-    if (!node)
+    if (!node || !node->isMediaControlElement())
         return false;
 
     MediaControlPlayButtonElement* button = static_cast<MediaControlPlayButtonElement*>(node);
-    if (!emitMediaButtonSignal(MediaPlayPauseButton, button->displayType(), rect))
+    if (!emitMediaButtonSignal(PlayPauseButton, button->displayType(), rect))
         return false;
 
-    return paintThemePart(object, MediaPlayPauseButton, info, rect);
+    return paintThemePart(object, PlayPauseButton, info, rect);
 }
 
 bool RenderThemeEfl::paintMediaSeekBackButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
-    notImplemented();
-    return false;
+    Node* node = object->node();
+    if (!node || !node->isMediaControlElement())
+        return 0;
+
+    MediaControlSeekButtonElement* button = static_cast<MediaControlSeekButtonElement*>(node);
+    if (!emitMediaButtonSignal(SeekBackwardButton, button->displayType(), rect))
+        return false;
+
+    return paintThemePart(object, SeekBackwardButton, info, rect);
 }
 
 bool RenderThemeEfl::paintMediaSeekForwardButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
 {
-    notImplemented();
-    return false;
+    Node* node = object->node();
+    if (!node || !node->isMediaControlElement())
+        return 0;
+
+    MediaControlSeekButtonElement* button = static_cast<MediaControlSeekButtonElement*>(node);
+    if (!emitMediaButtonSignal(SeekForwardButton, button->displayType(), rect))
+        return false;
+
+    return paintThemePart(object, SeekForwardButton, info, rect);
 }
 
 bool RenderThemeEfl::paintMediaSliderTrack(RenderObject* object, const PaintInfo& info, const IntRect& rect)
index fe8e2d2..054f91d 100644 (file)
@@ -59,8 +59,10 @@ enum FormType { // KEEP IN SYNC WITH edjeGroupFromFormType()
     SliderVertical,
     SliderHorizontal,
 #if ENABLE(VIDEO)
-    MediaPlayPauseButton,
-    MediaMuteUnMuteButton,
+    PlayPauseButton,
+    MuteUnMuteButton,
+    SeekForwardButton,
+    SeekBackwardButton,
 #endif
     FormTypeLast
 };
index 6ad2217..f9133cb 100644 (file)
@@ -1,3 +1,18 @@
+2011-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Reviewed by Eric Carlson.
+
+        [EFL] Add seek forward / backward buttons to MediaControl UI.
+        https://bugs.webkit.org/show_bug.cgi?id=56810
+
+        Add seek forward / backward buttons to media control.
+
+        * DefaultTheme/default.edc:
+        * DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc: Added.
+        * DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png: Added.
+        * DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc: Added.
+        * DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png: Added.
+
 2011-04-04  MORITA Hajime  <morrita@google.com>
 
         Reviewed by Ryosuke Niwa.
index f77bd86..e6fbde5 100644 (file)
@@ -78,4 +78,6 @@ collections {
 #include "widget/slider/slider.edc"
 #include "widget/mediacontrol/playpausebutton/playpause_button.edc"
 #include "widget/mediacontrol/mutebutton/mute_button.edc"
+#include "widget/mediacontrol/seekforwardbutton/seekforward_button.edc"
+#include "widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc"
 }
diff --git a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc
new file mode 100644 (file)
index 0000000..1bb253c
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+    Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+    Copyright (C) 2009,2010 ProFUSION embedded systems
+    Copyright (C) 2011 Samsung Electronics
+
+    This file is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This file is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+   group {
+      name: "webkit/widget/mediacontrol/seekbackward_button";
+
+      images {
+         image: "widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png" COMP;
+      }
+
+      parts {
+         part {
+            name: "seekbackward_button";
+            type: IMAGE;
+            description { state: "default" 0.0;
+               min: 25 25;
+            }
+            description { state: "seekbackward" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png";
+            }
+         }
+      }
+
+      programs {
+         program {
+             signal: "seekbackward";
+             action: STATE_SET "seekbackward" 0.0;
+             target: "seekbackward_button";
+         }
+      }
+   }
diff --git a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png
new file mode 100755 (executable)
index 0000000..f3467cd
Binary files /dev/null and b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackwardbutton.png differ
diff --git a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc
new file mode 100644 (file)
index 0000000..e34e7f7
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+    Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
+    Copyright (C) 2009,2010 ProFUSION embedded systems
+    Copyright (C) 2011 Samsung Electronics
+
+    This file is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This file is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+   group {
+      name: "webkit/widget/mediacontrol/seekforward_button";
+
+      images {
+         image: "widget/mediacontrol/seekforwardbutton/seekforwardbutton.png" COMP;
+      }
+
+      parts {
+         part {
+            name: "seekforward_button";
+            type: IMAGE;
+            description { state: "default" 0.0;
+               min: 25 25;
+            }
+            description { state: "seekforward" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "widget/mediacontrol/seekforwardbutton/seekforwardbutton.png";
+            }
+         }
+      }
+
+      programs {
+         program {
+             signal: "seekforward";
+             action: STATE_SET "seekforward" 0.0;
+             target: "seekforward_button";
+         }
+      }
+   }
diff --git a/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png
new file mode 100755 (executable)
index 0000000..c2fe828
Binary files /dev/null and b/Source/WebKit/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforwardbutton.png differ