https://bugs.webkit.org/show_bug.cgi?id=70437
Reviewed by Eric Carlson.
Source/WebCore:
No new tests. Updated platform/mac/accessibility/media-element-expected.txt.
Renamed MediaFullscreenButton to MediaEnterFullscreenButton and added MediaExitFullscreenButton:
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::controlTypeName):
(WebCore::AccessibilityMediaControl::roleValue):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in:
* platform/ThemeTypes.h:
Added setIsFullscreen which controls the display of the enter/exit fullscreen button:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlFullscreenButtonElement::setIsFullscreen): Added.
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControlRootElement.cpp:
(WebCore::MediaControlRootElement::enteredFullscreen):
(WebCore::MediaControlRootElement::exitedFullscreen):
Paint the enter/exit fullscreen button accordingly:
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
* rendering/RenderThemeChromiumAndroid.cpp:
(WebCore::RenderThemeChromiumAndroid::paintMediaFullscreenButton):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaFullscreenButton):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::paintMediaControlsPart):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::paintMediaFullscreenButton):
Update the localized strings for the exit and enter fullscreen buttons:
* English.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
(WebCore::localizedMediaControlElementString):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::localizedMediaControlElementString):
(WebCore::localizedMediaControlElementHelpText):
WebKitLibraries:
* WebKitSystemInterface.h: Added WKMediaUIPartExitFullscreenButton.
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceSnowLeopard.a:
* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib/WebKitSystemInterface.lib:
LayoutTests:
* platform/mac/accessibility/media-element-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111041
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-14 Jer Noble <jer.noble@apple.com>
+
+ Wrong icon to restore to windowed mode in full screen video panel
+ https://bugs.webkit.org/show_bug.cgi?id=70437
+
+ Reviewed by Eric Carlson.
+
+ * platform/mac/accessibility/media-element-expected.txt:
+
2012-03-16 Jer Noble <jer.noble@apple.com>
Rebaseline window-properties-expected on GTK; add two new tests
role: AXRole: AXStaticText
- description: AXDescription: fullscreen
+ description: AXDescription: enter fullscreen
role: AXRole: AXButton
+2012-03-14 Jer Noble <jer.noble@apple.com>
+
+ Wrong icon to restore to windowed mode in full screen video panel
+ https://bugs.webkit.org/show_bug.cgi?id=70437
+
+ Reviewed by Eric Carlson.
+
+ No new tests. Updated platform/mac/accessibility/media-element-expected.txt.
+
+ Renamed MediaFullscreenButton to MediaEnterFullscreenButton and added MediaExitFullscreenButton:
+ * accessibility/AccessibilityMediaControls.cpp:
+ (WebCore::AccessibilityMediaControl::controlTypeName):
+ (WebCore::AccessibilityMediaControl::roleValue):
+ * html/shadow/MediaControlElements.cpp:
+ (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ * css/CSSValueKeywords.in:
+ * platform/ThemeTypes.h:
+
+ Added setIsFullscreen which controls the display of the enter/exit fullscreen button:
+ * html/shadow/MediaControlElements.cpp:
+ (WebCore::MediaControlFullscreenButtonElement::setIsFullscreen): Added.
+ * html/shadow/MediaControlElements.h:
+ * html/shadow/MediaControlRootElement.cpp:
+ (WebCore::MediaControlRootElement::enteredFullscreen):
+ (WebCore::MediaControlRootElement::exitedFullscreen):
+
+ Paint the enter/exit fullscreen button accordingly:
+ * rendering/RenderMediaControlsChromium.cpp:
+ (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
+ * rendering/RenderTheme.cpp:
+ (WebCore::RenderTheme::paint):
+ * rendering/RenderThemeChromiumAndroid.cpp:
+ (WebCore::RenderThemeChromiumAndroid::paintMediaFullscreenButton):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMediaFullscreenButton):
+ * rendering/RenderMediaControls.cpp:
+ (WebCore::RenderMediaControls::paintMediaControlsPart):
+ * rendering/RenderThemeSafari.cpp:
+ (WebCore::RenderThemeSafari::paintMediaFullscreenButton):
+
+ Update the localized strings for the exit and enter fullscreen buttons:
+ * English.lproj/Localizable.strings:
+ * platform/LocalizedStrings.cpp:
+ (WebCore::localizedMediaControlElementString):
+ * platform/gtk/LocalizedStringsGtk.cpp:
+ (WebCore::localizedMediaControlElementString):
+ (WebCore::localizedMediaControlElementHelpText):
+ * platform/qt/LocalizedStringsQt.cpp:
+ (WebCore::localizedMediaControlElementString):
+ (WebCore::localizedMediaControlElementHelpText):
+
2012-03-16 Levi Weintraub <leviw@chromium.org>
Update LayoutUnit usage in RenderListBox
String AccessibilityMediaControl::controlTypeName() const
{
- DEFINE_STATIC_LOCAL(const String, mediaFullscreenButtonName, ("FullscreenButton"));
+ DEFINE_STATIC_LOCAL(const String, mediaEnterFullscreenButtonName, ("EnterFullscreenButton"));
+ DEFINE_STATIC_LOCAL(const String, mediaExitFullscreenButtonName, ("ExitFullscreenButton"));
DEFINE_STATIC_LOCAL(const String, mediaMuteButtonName, ("MuteButton"));
DEFINE_STATIC_LOCAL(const String, mediaPlayButtonName, ("PlayButton"));
DEFINE_STATIC_LOCAL(const String, mediaSeekBackButtonName, ("SeekBackButton"));
DEFINE_STATIC_LOCAL(const String, mediaHideClosedCaptionsButtonName, ("HideClosedCaptionsButton"));
switch (controlType()) {
- case MediaFullscreenButton:
- return mediaFullscreenButtonName;
+ case MediaEnterFullscreenButton:
+ return mediaEnterFullscreenButtonName;
+ case MediaExitFullscreenButton:
+ return mediaExitFullscreenButtonName;
case MediaMuteButton:
return mediaMuteButtonName;
case MediaPlayButton:
AccessibilityRole AccessibilityMediaControl::roleValue() const
{
switch (controlType()) {
- case MediaFullscreenButton:
+ case MediaEnterFullscreenButton:
+ case MediaExitFullscreenButton:
case MediaMuteButton:
case MediaPlayButton:
case MediaSeekBackButton:
case ListItemPart:
m_value.ident = CSSValueListitem;
break;
- case MediaFullscreenButtonPart:
- m_value.ident = CSSValueMediaFullscreenButton;
+ case MediaEnterFullscreenButtonPart:
+ m_value.ident = CSSValueMediaEnterFullscreenButton;
+ break;
+ case MediaExitFullscreenButtonPart:
+ m_value.ident = CSSValueMediaExitFullscreenButton;
break;
case MediaPlayButtonPart:
m_value.ident = CSSValueMediaPlayButton;
list-button
listbox
listitem
-media-fullscreen-button
+media-enter-fullscreen-button
+media-exit-fullscreen-button
media-fullscreen-volume-slider
media-fullscreen-volume-slider-thumb
media-mute-button
// ----------------------------
inline MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement(Document* document, MediaControls* controls)
- : MediaControlInputElement(document, MediaFullscreenButton)
+ : MediaControlInputElement(document, MediaEnterFullscreenButton)
, m_controls(controls)
{
}
return id;
}
+void MediaControlFullscreenButtonElement::setIsFullscreen(bool isFullscreen)
+{
+ setDisplayType(isFullscreen ? MediaExitFullscreenButton : MediaEnterFullscreenButton);
+}
+
// ----------------------------
inline MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement(Document* document)
// Must match WebKitSystemInterface.h
enum MediaControlElementType {
- MediaFullscreenButton = 0,
+ MediaEnterFullscreenButton = 0,
MediaMuteButton,
MediaPlayButton,
MediaSeekBackButton,
MediaVolumeSliderMuteButton,
MediaTextTrackDisplayContainer,
MediaTextTrackDisplay,
+ MediaExitFullscreenButton,
};
HTMLMediaElement* toParentMediaElement(Node*);
static PassRefPtr<MediaControlFullscreenButtonElement> create(Document*, MediaControls*);
virtual void defaultEventHandler(Event*);
+ void setIsFullscreen(bool);
private:
MediaControlFullscreenButtonElement(Document*, MediaControls*);
}
m_panel->setCanBeDragged(true);
+ m_fullScreenButton->setIsFullscreen(true);
if (Page* page = document()->page())
page->chrome()->setCursorHiddenUntilMouseMoves(true);
m_returnToRealTimeButton->show();
m_panel->setCanBeDragged(false);
+ m_fullScreenButton->setIsFullscreen(false);
// We will keep using the panel, but we want it to go back to the standard position.
// This will matter right away because we use the panel even when not fullscreen.
return WEB_UI_STRING("remaining time", "accessibility role description for time remaining display");
if (name == "StatusDisplay")
return WEB_UI_STRING("status", "accessibility role description for movie status");
- if (name == "FullscreenButton")
- return WEB_UI_STRING("fullscreen", "accessibility role description for enter fullscreen button");
+ if (name == "EnterFullscreenButton")
+ return WEB_UI_STRING("enter fullscreen", "accessibility role description for enter fullscreen button");
+ if (name == "ExitFullscreenButton")
+ return WEB_UI_STRING("exit fullscreen", "accessibility role description for exit fullscreen button");
if (name == "SeekForwardButton")
return WEB_UI_STRING("fast forward", "accessibility role description for fast forward button");
if (name == "SeekBackButton")
enum ControlPart {
NoControlPart, CheckboxPart, RadioPart, PushButtonPart, SquareButtonPart, ButtonPart,
ButtonBevelPart, DefaultButtonPart, InnerSpinButtonPart, InputSpeechButtonPart, ListButtonPart, ListboxPart, ListItemPart,
- MediaFullscreenButtonPart, MediaFullScreenVolumeSliderPart, MediaFullScreenVolumeSliderThumbPart, MediaMuteButtonPart, MediaPlayButtonPart, MediaSeekBackButtonPart,
+ MediaEnterFullscreenButtonPart, MediaExitFullscreenButtonPart, MediaFullScreenVolumeSliderPart, MediaFullScreenVolumeSliderThumbPart, MediaMuteButtonPart, MediaPlayButtonPart, MediaSeekBackButtonPart,
MediaSeekForwardButtonPart, MediaRewindButtonPart, MediaReturnToRealtimeButtonPart, MediaToggleClosedCaptionsButtonPart,
MediaSliderPart, MediaSliderThumbPart, MediaVolumeSliderContainerPart, MediaVolumeSliderPart, MediaVolumeSliderThumbPart,
MediaVolumeSliderMuteButtonPart, MediaControlsBackgroundPart, MediaControlsFullscreenBackgroundPart, MediaCurrentTimePart, MediaTimeRemainingPart,
return String::fromUTF8(_("remaining time"));
if (name == "StatusDisplay")
return String::fromUTF8(_("status"));
- if (name == "FullscreenButton")
- return String::fromUTF8(_("fullscreen"));
+ if (name == "EnterFullscreenButton")
+ return String::fromUTF8(_("enter fullscreen"));
+ if (name == "ExitFullscreenButton")
+ return String::fromUTF8(_("exit fullscreen"));
if (name == "SeekForwardButton")
return String::fromUTF8(_("fast forward"));
if (name == "SeekBackButton")
return String::fromUTF8(_("seek quickly back"));
if (name == "SeekForwardButton")
return String::fromUTF8(_("seek quickly forward"));
- if (name == "FullscreenButton")
+ if (name == "EnterFullscreenButton")
return String::fromUTF8(_("Play movie in fullscreen mode"));
+ if (name == "EnterFullscreenButton")
+ return String::fromUTF8(_("Exit fullscreen mode"));
if (name == "ShowClosedCaptionsButton")
return String::fromUTF8(_("start displaying closed captions"));
if (name == "HideClosedCaptionsButton")
return QCoreApplication::translate("QWebPage", "Remaining Time", "Media controller element");
if (name == "StatusDisplay")
return QCoreApplication::translate("QWebPage", "Status Display", "Media controller element");
- if (name == "FullscreenButton")
- return QCoreApplication::translate("QWebPage", "Fullscreen Button", "Media controller element");
+ if (name == "EnterFullscreenButton")
+ return QCoreApplication::translate("QWebPage", "EnterFullscreen Button", "Media controller element");
+ if (name == "ExitFullscreenButton")
+ return QCoreApplication::translate("QWebPage", "ExitFullscreen Button", "Media controller element");
if (name == "SeekForwardButton")
return QCoreApplication::translate("QWebPage", "Seek Forward Button", "Media controller element");
if (name == "SeekBackButton")
return QCoreApplication::translate("QWebPage", "Remaining movie time", "Media controller element");
if (name == "StatusDisplay")
return QCoreApplication::translate("QWebPage", "Current movie status", "Media controller element");
- if (name == "FullscreenButton")
+ if (name == "EnterFullscreenButton")
return QCoreApplication::translate("QWebPage", "Play movie in full-screen mode", "Media controller element");
+ if (name == "ExitFullscreenButton")
+ return QCoreApplication::translate("QWebPage", "Exit full-screen mode", "Media controller element");
if (name == "SeekForwardButton")
return QCoreApplication::translate("QWebPage", "Seek quickly back", "Media controller element");
if (name == "SeekBackButton")
GraphicsContextStateSaver stateSaver(*paintInfo.context);
switch (part) {
- case MediaFullscreenButton:
- wkDrawMediaUIPart(WKMediaUIPartFullscreenButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaShowClosedCaptionsButton:
- case MediaHideClosedCaptionsButton:
- if (MediaControlToggleClosedCaptionsButtonElement* btn = static_cast<MediaControlToggleClosedCaptionsButtonElement*>(o->node())) {
- bool captionsVisible = btn->displayType() == MediaHideClosedCaptionsButton;
- wkDrawMediaUIPart(captionsVisible ? WKMediaUIPartHideClosedCaptionsButton : WKMediaUIPartShowClosedCaptionsButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- }
- break;
- case MediaMuteButton:
- case MediaUnMuteButton:
- if (MediaControlMuteButtonElement* btn = static_cast<MediaControlMuteButtonElement*>(o->node())) {
- bool audioEnabled = btn->displayType() == MediaMuteButton;
- wkDrawMediaUIPart(audioEnabled ? WKMediaUIPartMuteButton : WKMediaUIPartUnMuteButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- }
- break;
- case MediaPauseButton:
- case MediaPlayButton:
- if (MediaControlPlayButtonElement* btn = static_cast<MediaControlPlayButtonElement*>(o->node())) {
- bool canPlay = btn->displayType() == MediaPlayButton;
- wkDrawMediaUIPart(canPlay ? WKMediaUIPartPlayButton : WKMediaUIPartPauseButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- }
- break;
- case MediaRewindButton:
- wkDrawMediaUIPart(WKMediaUIPartRewindButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaReturnToRealtimeButton:
- wkDrawMediaUIPart(WKMediaUIPartSeekToRealtimeButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaSeekBackButton:
- wkDrawMediaUIPart(WKMediaUIPartSeekBackButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaSeekForwardButton:
- wkDrawMediaUIPart(WKMediaUIPartSeekForwardButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaSlider: {
- if (HTMLMediaElement* mediaElement = toParentMediaElement(o)) {
- FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
- wkDrawMediaSliderTrack(themeStyle, paintInfo.context->platformContext(), unzoomedRect, mediaElement->percentLoaded() * mediaElement->duration(), mediaElement->currentTime(), mediaElement->duration(), determineState(o));
- }
- break;
+ case MediaEnterFullscreenButton:
+ case MediaExitFullscreenButton:
+ if (MediaControlFullscreenButtonElement* btn = static_cast<MediaControlFullscreenButtonElement*>(o->node())) {
+ bool enterButton = btn->displayType() == MediaEnterFullscreenButton;
+ wkDrawMediaUIPart(enterButton ? WKMediaUIPartFullscreenButton : WKMediaUIPartExitFullscreenButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
}
- case MediaSliderThumb:
- wkDrawMediaUIPart(WKMediaUIPartTimelineSliderThumb, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaVolumeSliderContainer:
- wkDrawMediaUIPart(WKMediaUIPartVolumeSliderContainer, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaVolumeSlider:
- wkDrawMediaUIPart(WKMediaUIPartVolumeSlider, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaVolumeSliderThumb:
- wkDrawMediaUIPart(WKMediaUIPartVolumeSliderThumb, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaFullScreenVolumeSlider:
- wkDrawMediaUIPart(WKMediaUIPartFullScreenVolumeSlider, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaFullScreenVolumeSliderThumb:
- wkDrawMediaUIPart(WKMediaUIPartFullScreenVolumeSliderThumb, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaTimelineContainer:
- wkDrawMediaUIPart(WKMediaUIPartBackground, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
- break;
- case MediaCurrentTimeDisplay:
- ASSERT_NOT_REACHED();
- break;
- case MediaTimeRemainingDisplay:
- ASSERT_NOT_REACHED();
- break;
- case MediaControlsPanel:
- ASSERT_NOT_REACHED();
- case MediaTextTrackDisplayContainer:
- case MediaTextTrackDisplay:
- ASSERT_NOT_REACHED();
- break;
+ break;
+ case MediaShowClosedCaptionsButton:
+ case MediaHideClosedCaptionsButton:
+ if (MediaControlToggleClosedCaptionsButtonElement* btn = static_cast<MediaControlToggleClosedCaptionsButtonElement*>(o->node())) {
+ bool captionsVisible = btn->displayType() == MediaHideClosedCaptionsButton;
+ wkDrawMediaUIPart(captionsVisible ? WKMediaUIPartHideClosedCaptionsButton : WKMediaUIPartShowClosedCaptionsButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ }
+ break;
+ case MediaMuteButton:
+ case MediaUnMuteButton:
+ if (MediaControlMuteButtonElement* btn = static_cast<MediaControlMuteButtonElement*>(o->node())) {
+ bool audioEnabled = btn->displayType() == MediaMuteButton;
+ wkDrawMediaUIPart(audioEnabled ? WKMediaUIPartMuteButton : WKMediaUIPartUnMuteButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ }
+ break;
+ case MediaPauseButton:
+ case MediaPlayButton:
+ if (MediaControlPlayButtonElement* btn = static_cast<MediaControlPlayButtonElement*>(o->node())) {
+ bool canPlay = btn->displayType() == MediaPlayButton;
+ wkDrawMediaUIPart(canPlay ? WKMediaUIPartPlayButton : WKMediaUIPartPauseButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ }
+ break;
+ case MediaRewindButton:
+ wkDrawMediaUIPart(WKMediaUIPartRewindButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaReturnToRealtimeButton:
+ wkDrawMediaUIPart(WKMediaUIPartSeekToRealtimeButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaSeekBackButton:
+ wkDrawMediaUIPart(WKMediaUIPartSeekBackButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaSeekForwardButton:
+ wkDrawMediaUIPart(WKMediaUIPartSeekForwardButton, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaSlider: {
+ if (HTMLMediaElement* mediaElement = toParentMediaElement(o)) {
+ FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
+ wkDrawMediaSliderTrack(themeStyle, paintInfo.context->platformContext(), unzoomedRect, mediaElement->percentLoaded() * mediaElement->duration(), mediaElement->currentTime(), mediaElement->duration(), determineState(o));
+ }
+ break;
}
+ case MediaSliderThumb:
+ wkDrawMediaUIPart(WKMediaUIPartTimelineSliderThumb, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaVolumeSliderContainer:
+ wkDrawMediaUIPart(WKMediaUIPartVolumeSliderContainer, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaVolumeSlider:
+ wkDrawMediaUIPart(WKMediaUIPartVolumeSlider, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaVolumeSliderThumb:
+ wkDrawMediaUIPart(WKMediaUIPartVolumeSliderThumb, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaFullScreenVolumeSlider:
+ wkDrawMediaUIPart(WKMediaUIPartFullScreenVolumeSlider, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaFullScreenVolumeSliderThumb:
+ wkDrawMediaUIPart(WKMediaUIPartFullScreenVolumeSliderThumb, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaTimelineContainer:
+ wkDrawMediaUIPart(WKMediaUIPartBackground, themeStyle, paintInfo.context->platformContext(), r, determineState(o));
+ break;
+ case MediaCurrentTimeDisplay:
+ ASSERT_NOT_REACHED();
+ break;
+ case MediaTimeRemainingDisplay:
+ ASSERT_NOT_REACHED();
+ break;
+ case MediaControlsPanel:
+ ASSERT_NOT_REACHED();
+ case MediaTextTrackDisplayContainer:
+ case MediaTextTrackDisplay:
+ ASSERT_NOT_REACHED();
+ break;
+}
return false;
}
return paintMediaVolumeSliderThumb(object, paintInfo, rect);
case MediaTimelineContainer:
return paintMediaTimelineContainer(object, paintInfo, rect);
- case MediaFullscreenButton:
+ case MediaEnterFullscreenButton:
+ case MediaExitFullscreenButton:
return paintMediaFullscreenButton(object, paintInfo, rect);
case MediaVolumeSliderMuteButton:
case MediaSeekBackButton:
case SliderThumbHorizontalPart:
case SliderThumbVerticalPart:
return paintSliderThumb(o, paintInfo, r);
- case MediaFullscreenButtonPart:
+ case MediaEnterFullscreenButtonPart:
+ case MediaExitFullscreenButtonPart:
return paintMediaFullscreenButton(o, paintInfo, r);
case MediaPlayButtonPart:
return paintMediaPlayButton(o, paintInfo, r);
bool RenderThemeChromiumAndroid::paintMediaFullscreenButton(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)
{
#if ENABLE(VIDEO)
- return RenderMediaControlsChromium::paintMediaControlsPart(MediaFullscreenButton, object, paintInfo, rect);
+ return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscreenButton, object, paintInfo, rect);
#else
UNUSED_PARAM(object);
UNUSED_PARAM(paintInfo);
if (!node)
return false;
- LocalCurrentGraphicsContext localContext(paintInfo.context);
- wkDrawMediaUIPart(MediaFullscreenButton, mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+ if (MediaControlFullscreenButtonElement* btn = static_cast<MediaControlFullscreenButtonElement*>(o->node())) {
+ LocalCurrentGraphicsContext localContext(paintInfo.context);
+ wkDrawMediaUIPart(btn->displayType(), mediaControllerTheme(), localContext.cgContext(), r, getMediaUIPartStateFlags(node));
+ }
return false;
}
#if ENABLE(VIDEO)
bool RenderThemeSafari::paintMediaFullscreenButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
- return RenderMediaControls::paintMediaControlsPart(MediaFullscreenButton, o, paintInfo, r);
+ return RenderMediaControls::paintMediaControlsPart(MediaEnterFullscreenButton, o, paintInfo, r);
}
bool RenderThemeSafari::paintMediaMuteButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
bool RenderThemeWin::paintMediaFullscreenButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
- return RenderMediaControls::paintMediaControlsPart(MediaFullscreenButton, o, paintInfo, r);
+ return RenderMediaControls::paintMediaControlsPart(MediaEnterFullscreenButton, o, paintInfo, r);
}
bool RenderThemeWin::paintMediaMuteButton(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
+2012-03-14 Jer Noble <jer.noble@apple.com>
+
+ Wrong icon to restore to windowed mode in full screen video panel
+ https://bugs.webkit.org/show_bug.cgi?id=70437
+
+ Reviewed by Eric Carlson.
+
+ * WebKitSystemInterface.h: Added WKMediaUIPartExitFullscreenButton.
+ * libWebKitSystemInterfaceLeopard.a:
+ * libWebKitSystemInterfaceLion.a:
+ * libWebKitSystemInterfaceSnowLeopard.a:
+ * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+ * win/lib/WebKitSystemInterface.lib:
+
2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
/*
WebKitSystemInterface.h
- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
Public header file.
*/
WKMediaUIPartVolumeSliderThumb,
WKMediaUIPartFullScreenVolumeSlider,
WKMediaUIPartFullScreenVolumeSliderThumb,
+ WKMediaUIPartVolumeSliderMuteButton,
+ WKMediaUIPartTextTrackDisplayContainer,
+ WKMediaUIPartTextTrackDisplay,
+ WKMediaUIPartExitFullscreenButton,
} WKMediaUIPart;
typedef enum {
WKMediaUIPartVolumeSliderThumb,
WKMediaUIPartFullScreenVolumeSlider,
WKMediaUIPartFullScreenVolumeSliderThumb,
+ WKMediaUIPartVolumeSliderMuteButton,
+ WKMediaUIPartTextTrackDisplayContainer,
+ WKMediaUIPartTextTrackDisplay,
+ WKMediaUIPartExitFullscreenButton,
} WKMediaUIPart;
typedef enum {