Changeset 92189 in webkit


Ignore:
Timestamp:
Aug 2, 2011 8:08:45 AM (13 years ago)
Author:
gyuyoung.kim@samsung.com
Message:

[EFL] Add fullscreen button to media control UI.
https://bugs.webkit.org/show_bug.cgi?id=64428

Source/WebCore:

Implement paintMediaFullscreenButton and emit fullscreen signal.

Reviewed by Antonio Gomes.

  • platform/efl/RenderThemeEfl.cpp:

(WebCore::RenderThemeEfl::edjeGroupFromFormType):
(WebCore::RenderThemeEfl::emitMediaButtonSignal):
(WebCore::RenderThemeEfl::paintMediaFullscreenButton):

  • platform/efl/RenderThemeEfl.h:

Source/WebKit/efl:

Implement functions for full screen in ChromeClientEfl in order to display a full screen button on media control UI.
When full screen mode is activated by pressing the button, the functions are called by Document. So, if there is no implemented
function, full screen button will not be shown.
In addition, a .edc file and an image file are added for full screen button.

Reviewed by Antonio Gomes.

  • DefaultTheme/default.edc:
  • DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc: Added.
  • DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreenbutton.png: Added.
  • WebCoreSupport/ChromeClientEfl.cpp:

(WebCore::ChromeClientEfl::supportsFullScreenForElement):
(WebCore::ChromeClientEfl::enterFullScreenForElement):
(WebCore::ChromeClientEfl::exitFullScreenForElement):

  • WebCoreSupport/ChromeClientEfl.h:
Location:
trunk/Source
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r92187 r92189  
     12011-08-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        [EFL] Add fullscreen button to media control UI.
     4        https://bugs.webkit.org/show_bug.cgi?id=64428
     5
     6        Implement paintMediaFullscreenButton and emit fullscreen signal.
     7
     8        Reviewed by Antonio Gomes.
     9
     10        * platform/efl/RenderThemeEfl.cpp:
     11        (WebCore::RenderThemeEfl::edjeGroupFromFormType):
     12        (WebCore::RenderThemeEfl::emitMediaButtonSignal):
     13        (WebCore::RenderThemeEfl::paintMediaFullscreenButton):
     14        * platform/efl/RenderThemeEfl.h:
     15
    1162011-08-01  Andrey Kosyakov  <caseq@chromium.org>
    217
  • trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp

    r91769 r92189  
    623623        W("mediacontrol/seekforward_button"),
    624624        W("mediacontrol/seekbackward_button"),
     625        W("mediacontrol/fullscreen_button"),
    625626#endif
    626627#undef W
     
    11371138    else if (mediaElementType == MediaSeekBackButton)
    11381139        edje_object_signal_emit(entry->o, "seekbackward", "");
     1140    else if (mediaElementType == MediaFullscreenButton)
     1141        edje_object_signal_emit(entry->o, "fullscreen", "");
    11391142    else
    11401143        return false;
     
    11551158bool RenderThemeEfl::paintMediaFullscreenButton(RenderObject* object, const PaintInfo& info, const IntRect& rect)
    11561159{
    1157     notImplemented();
    1158     return false;
     1160    Node* mediaNode = object->node() ? object->node()->shadowAncestorNode() : 0;
     1161    if (!mediaNode || (!mediaNode->hasTagName(videoTag)))
     1162        return false;
     1163
     1164    if (!emitMediaButtonSignal(FullScreenButton, MediaFullscreenButton, rect))
     1165        return false;
     1166
     1167    return paintThemePart(object, FullScreenButton, info, rect);
    11591168}
    11601169
  • trunk/Source/WebCore/platform/efl/RenderThemeEfl.h

    r90382 r92189  
    6464    SeekForwardButton,
    6565    SeekBackwardButton,
     66    FullScreenButton,
    6667#endif
    6768    FormTypeLast
  • trunk/Source/WebKit/efl/ChangeLog

    r92039 r92189  
     12011-08-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        [EFL] Add fullscreen button to media control UI.
     4        https://bugs.webkit.org/show_bug.cgi?id=64428
     5
     6        Implement functions for full screen in ChromeClientEfl in order to display a full screen button on media control UI.
     7        When full screen mode is activated by pressing the button, the functions are called by Document. So, if there is no implemented
     8        function, full screen button will not be shown.
     9        In addition, a .edc file and an image file are added for full screen button.
     10
     11        Reviewed by Antonio Gomes.
     12
     13        * DefaultTheme/default.edc:
     14        * DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc: Added.
     15        * DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreenbutton.png: Added.
     16        * WebCoreSupport/ChromeClientEfl.cpp:
     17        (WebCore::ChromeClientEfl::supportsFullScreenForElement):
     18        (WebCore::ChromeClientEfl::enterFullScreenForElement):
     19        (WebCore::ChromeClientEfl::exitFullScreenForElement):
     20        * WebCoreSupport/ChromeClientEfl.h:
     21
    1222011-07-29  Michal Pakula vel Rutka  <m.pakula@samsung.com>
    223
  • trunk/Source/WebKit/efl/DefaultTheme/default.edc

    r83410 r92189  
    8181#include "widget/mediacontrol/seekforwardbutton/seekforward_button.edc"
    8282#include "widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc"
     83#include "widget/mediacontrol/fullscreenbutton/fullscreen_button.edc"
    8384}
  • trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp

    r91910 r92189  
    581581#endif
    582582
    583 }
     583#if ENABLE(FULLSCREEN_API)
     584bool ChromeClientEfl::supportsFullScreenForElement(const WebCore::Element* element, bool withKeyboard)
     585{
     586    if (withKeyboard)
     587        return false;
     588
     589    return true;
     590}
     591
     592void ChromeClientEfl::enterFullScreenForElement(WebCore::Element* element)
     593{
     594    element->document()->webkitWillEnterFullScreenForElement(element);
     595    element->document()->webkitDidEnterFullScreenForElement(element);
     596}
     597
     598void ChromeClientEfl::exitFullScreenForElement(WebCore::Element* element)
     599{
     600    element->document()->webkitWillExitFullScreenForElement(element);
     601    element->document()->webkitDidExitFullScreenForElement(element);
     602}
     603#endif
     604}
  • trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h

    r91910 r92189  
    137137#endif
    138138
     139#if ENABLE(FULLSCREEN_API)
     140    virtual bool supportsFullScreenForElement(const WebCore::Element*, bool withKeyboard);
     141    virtual void enterFullScreenForElement(WebCore::Element*);
     142    virtual void exitFullScreenForElement(WebCore::Element*);
     143#endif
     144
    139145    virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
    140146    virtual void loadIconForFiles(const Vector<String>&, FileIconLoader*);
Note: See TracChangeset for help on using the changeset viewer.