[Modern Media Controls] Media Controller: PiP support
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Nov 2016 07:58:42 +0000 (07:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Nov 2016 07:58:42 +0000 (07:58 +0000)
commit345baabb3e669a9db0e2988937030a21f61fc317
tree9731819793377efbf46c95995bb65eb16a18819d
parent6a00921c1bd933793fc7491a8478b42308bf0289
[Modern Media Controls] Media Controller: PiP support
https://bugs.webkit.org/show_bug.cgi?id=163730
<rdar://problem/27989485>

Patch by Antoine Quint <graouts@apple.com> on 2016-11-02
Reviewed by Dean Jackson.

Source/WebCore:

We introduce the PiPSupport class which brings support for entering picture-in-picture
by clicking on the PiP button in the media controls and enabling the button only when
picture-in-picture mode is available.

Tests: media/modern-media-controls/pip-support/pip-support-click.html
       media/modern-media-controls/pip-support/pip-support-enabled.html

* Modules/modern-media-controls/js-files:
* Modules/modern-media-controls/media/media-controller.js:
(MediaController):
* Modules/modern-media-controls/media/pip-support.js: Added.
(PiPSupport.prototype.get control):
(PiPSupport.prototype.get mediaEvents):
(PiPSupport.prototype.buttonWasClicked):
(PiPSupport.prototype.syncControl):
(PiPSupport):
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Adding new picture-in-picture tests.

* media/modern-media-controls/pip-support/pip-support-click-expected.txt: Added.
* media/modern-media-controls/pip-support/pip-support-click.html: Added.
* media/modern-media-controls/pip-support/pip-support-enabled-expected.txt: Added.
* media/modern-media-controls/pip-support/pip-support-enabled.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/media/modern-media-controls/pip-support/pip-support-click-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/pip-support/pip-support-click.html [new file with mode: 0644]
LayoutTests/media/modern-media-controls/pip-support/pip-support-enabled-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/pip-support/pip-support-enabled.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/modern-media-controls/js-files
Source/WebCore/Modules/modern-media-controls/media/media-controller.js
Source/WebCore/Modules/modern-media-controls/media/pip-support.js [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj