Add an overlay play button to media controls on android
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jul 2012 19:23:50 +0000 (19:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jul 2012 19:23:50 +0000 (19:23 +0000)
commit7afeaa6e461676144d8ebc6c3e8bcd3adab7f4fc
tree2a004ff4632225ff9be0090fe2e9c3f6ac6aff69
parent14cba3313470d5df6dcd2094bb950d47480cabc4
Add an overlay play button to media controls on android
https://bugs.webkit.org/show_bug.cgi?id=92132

Patch by Min Qin <qinmin@chromium.org> on 2012-07-28
Reviewed by Adam Barth.

This change adds an overlay play button to the media controls for android.
No tests for now as this setting is not being used by other port.
Will add a test and adjust all the test expectations when we upstream the layout tests for android.

* WebCore.gypi:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in:
* css/mediaControls.css:
(audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
* css/mediaControlsChromiumAndroid.css:
(audio::-webkit-media-controls-overlay-enclosure):
(video::-webkit-media-controls-overlay-enclosure):
(audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
(video::-webkit-media-controls-overlay-play-button):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
(WebCore):
(WebCore::MediaControlOverlayPlayButtonElement::create):
(WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
(WebCore::MediaControlOverlayPlayButtonElement::updateDisplayType):
(WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
* html/shadow/MediaControlElements.h:
(MediaControlOverlayPlayButtonElement):
(WebCore):
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
(WebCore::MediaControlPanelEnclosureElement::create):
(WebCore):
(WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
(WebCore::MediaControlRootElementChromium::create):
(WebCore::MediaControlRootElementChromium::initializeControls):
* html/shadow/MediaControlRootElementChromium.h:
(MediaControlChromiumEnclosureElement):
(WebCore):
(MediaControlPanelEnclosureElement):
(MediaControlRootElementChromium):
* html/shadow/MediaControlRootElementChromiumAndroid.cpp: Added.
(WebCore):
(WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
(WebCore::MediaControlOverlayEnclosureElement::create):
(WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
(WebCore::MediaControlRootElementChromiumAndroid::MediaControlRootElementChromiumAndroid):
(WebCore::MediaControls::create):
(WebCore::MediaControlRootElementChromiumAndroid::create):
(WebCore::MediaControlRootElementChromiumAndroid::setMediaController):
(WebCore::MediaControlRootElementChromiumAndroid::playbackStarted):
(WebCore::MediaControlRootElementChromiumAndroid::playbackStopped):
* html/shadow/MediaControlRootElementChromiumAndroid.h: Added.
(WebCore):
(MediaControlOverlayEnclosureElement):
(MediaControlRootElementChromiumAndroid):
* platform/ThemeTypes.h:
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaOverlayPlayButton):
(WebCore):
(WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintMediaOverlayPlayButton):
* rendering/RenderThemeChromiumAndroid.cpp:
(WebCore::RenderThemeChromiumAndroid::paintMediaOverlayPlayButton):
(WebCore):
* rendering/RenderThemeChromiumAndroid.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.gypi
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/mediaControls.css
Source/WebCore/css/mediaControlsChromiumAndroid.css
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControlElements.h
Source/WebCore/html/shadow/MediaControlRootElementChromium.cpp
Source/WebCore/html/shadow/MediaControlRootElementChromium.h
Source/WebCore/html/shadow/MediaControlRootElementChromiumAndroid.cpp [new file with mode: 0644]
Source/WebCore/html/shadow/MediaControlRootElementChromiumAndroid.h [new file with mode: 0644]
Source/WebCore/platform/ThemeTypes.h
Source/WebCore/rendering/RenderMediaControlsChromium.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTheme.h
Source/WebCore/rendering/RenderThemeChromiumAndroid.cpp
Source/WebCore/rendering/RenderThemeChromiumAndroid.h