REGRESSION(r156546): media/video-no-audio.html broken
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Sep 2013 16:09:37 +0000 (16:09 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Sep 2013 16:09:37 +0000 (16:09 +0000)
commit737dbe4fe5e79668f818110e7f4c1a0ddab657a5
treeceb5bf55084c1a6a39e6bfca27028284daa51d36
parentcddbbda202e5f0a2e3692d191a4d31f57bdaab44
REGRESSION(r156546): media/video-no-audio.html broken
https://bugs.webkit.org/show_bug.cgi?id=122049

Reviewed by Eric Carlson.

Source/WebCore:

Now that our video elements have audio tracks, use their presence or
absense to show or hide the volume controls.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller):
(Controller.prototype.addVideoListeners): Listen for audioTrack changes.
(Controller.prototype.removeVideoListeners): Stop listening to same.
(Controller.prototype.handleAudioTrackChange): Call this.updateHasAudio()
(Controller.prototype.handleAudioTrackAdd): Ditto.
(Controller.prototype.handleAudioTrackRemove): Ditto.
(Controller.prototype.updateHasAudio): Hide the volume controls if no
    audioTracks are present, and vice versa.

LayoutTests:

* platform/mac/TestExpectations:
* platform/mac/media/video-no-audio-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/mac/media/video-no-audio-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/mediaControlsApple.js