Update media controls JS and CSS to use picture-in-picture
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jun 2015 20:53:49 +0000 (20:53 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jun 2015 20:53:49 +0000 (20:53 +0000)
commitaaf1306f042ca254a1d8c2299ee59e6650f8718a
tree7578503c2e49dc2074178915d55e0fd2305d6377
parent8f78ef75421701a83be409f04d38a4bbbb1b5276
Update media controls JS and CSS to use picture-in-picture
https://bugs.webkit.org/show_bug.cgi?id=145827
<rdar://problem/21311576>

Reviewed by Dean Jackson.

Source/WebCore:

* English.lproj/mediaControlsLocalizedStrings.js: Update localized strings.
Add a string for the placeholder text, and for the aria-label of the
placard.

* Modules/mediacontrols/MediaControlsHost.idl: Remove uncalled functions.
* Modules/mediacontrols/MediaControlsHost.h: Also remove optimizedFullscreenSupported(),
which was never used.
* Modules/mediacontrols/MediaControlsHost.cpp: Remove uncalled functions and media part IDs.
(WebCore::MediaControlsHost::enterFullscreenOptimized): Deleted.
(WebCore::MediaControlsHost::mediaUIImageData): Deleted.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-picture-in-picture-button): Update pseudo-element name.
(audio::-webkit-media-controls-optimized-fullscreen-button): Deleted.
* Modules/mediacontrols/mediaControlsApple.js: Update global variable name, and classes.
(Controller.prototype.createControls): Update button name. Add aria-label to the placeholder.
(Controller.prototype.updateFullscreenButtons):
(Controller.prototype.updateLayoutForDisplayedWidth):
(Controller.prototype.handlePictureInPictureButtonClicked): Update handler names.
(Controller.prototype.handleOptimizedFullscreenButtonClicked): Deleted.

* Modules/mediacontrols/mediaControlsiOS.css: Rename pseudo-element.
(audio::-webkit-media-controls-picture-in-picture-button): Add mask images.
(audio::-webkit-media-controls-picture-in-picture-button:active):
(video::-webkit-media-controls-picture-in-picture-button):
(video::-webkit-media-controls-picture-in-picture-button.return-from-picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
(audio::-webkit-media-controls-optimized-fullscreen-button): Deleted.
(audio::-webkit-media-controls-optimized-fullscreen-button:active): Deleted.
(video::-webkit-media-controls-optimized-fullscreen-button): Deleted.
(audio::-webkit-media-controls-wireless-playback-status.optimized): Deleted. The placard
pseudo-element should be updated from wireless-playback-status to just playback-status
since it serves both for pip and AirPlay.
(audio::-webkit-media-controls-wireless-playback-text-top.optimized): Deleted.
(audio::-webkit-media-controls-wireless-playback-text-bottom.optimized): Deleted.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createControls): Update button names.
(ControllerIOS.prototype.configureInlineControls):
(ControllerIOS.prototype.handlePictureInPictureButtonClicked): Update handler name.
(ControllerIOS.prototype.handlePictureInPictureTouchStart):
(ControllerIOS.prototype.handlePictureInPictureTouchEnd):
(ControllerIOS.prototype.handlePictureInPictureTouchCancel):
(ControllerIOS.prototype.handlePresentationModeChange): Remove changes to the inline bg
image style, and rely on the CSS to fill those in. Use localized strings for the placard.
Move the aria-label to createControls().
(ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): Deleted.
(ControllerIOS.prototype.handleOptimizedFullscreenTouchStart): Deleted.
(ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): Deleted.
(ControllerIOS.prototype.handleOptimizedFullscreenTouchCancel): Deleted.

* html/HTMLMediaElement.cpp: Remove enterFullscreenOptimized since it is never called.
(WebCore::HTMLMediaElement::enterFullscreenOptimized): Deleted.
* html/HTMLMediaElement.h:
* platform/ios/WebCoreSystemInterfaceIOS.h: Remove wkGetMediaUIImageData.
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsStyleSheet): Remove calls to wkGetMediaUIImageData.

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted GetMediaUIImageData.

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Deleted GetMediaUIImageData.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js
Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl
Source/WebCore/Modules/mediacontrols/mediaControlsApple.css
Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css
Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.h
Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm