[Modern Media Controls] Playing an <audio> element on iOS makes the controls disappear
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2017 16:20:18 +0000 (16:20 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2017 16:20:18 +0000 (16:20 +0000)
commit2b8ed55bf4af640b39c6c76dbcae7917e8698fbb
tree655a9c4b889caefacf9c41e56b29ee3a80e6d708
parentd56c1c18668ab8fed211ea307cb8428af64740f2
[Modern Media Controls] Playing an <audio> element on iOS makes the controls disappear
https://bugs.webkit.org/show_bug.cgi?id=168047
<rdar://problem/30441939>

Reviewed by Eric Carlson.

Source/WebCore:

The controls bar auto-hide behavior is disabled for <audio> elements, but on iOS we have
a TapGestureRecognizer to identify when controls are tapped to toggle controls visibility.
This gesture recognizer would be on at all times, but it should only be enabled when
fadesToIdle is set to true.

Test: media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html

* Modules/modern-media-controls/controls/controls-bar.js:
(ControlsBar.prototype.set fadesWhileIdle):

LayoutTests:

Add a new iOS-specific test that checks the TapGestureRecognizer is only enabled when
fadesToIdle is true.

* media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html: Added.
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle-expected.txt [new file with mode: 0644]
LayoutTests/media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/modern-media-controls/controls/controls-bar.js