Title: [183782] trunk/Source/WebCore
- Revision
- 183782
- Author
- [email protected]
- Date
- 2015-05-04 17:08:28 -0700 (Mon, 04 May 2015)
Log Message
[Mac] Audio-only files should not have a device picker
https://bugs.webkit.org/show_bug.cgi?id=144606
<rdar://problem/20806387>
Reviewed by Dean Jackson.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.hasVideo): New.
(Controller.prototype.updateFullscreenButtons): Use hasVideo.
(Controller.prototype.updateHasVideo): Ditto.
(Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
unless a file has video.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (183781 => 183782)
--- trunk/Source/WebCore/ChangeLog 2015-05-04 23:58:32 UTC (rev 183781)
+++ trunk/Source/WebCore/ChangeLog 2015-05-05 00:08:28 UTC (rev 183782)
@@ -1,3 +1,18 @@
+2015-05-04 Eric Carlson <[email protected]>
+
+ [Mac] Audio-only files should not have a device picker
+ https://bugs.webkit.org/show_bug.cgi?id=144606
+ <rdar://problem/20806387>
+
+ Reviewed by Dean Jackson.
+
+ * Modules/mediacontrols/mediaControlsApple.js:
+ (Controller.prototype.hasVideo): New.
+ (Controller.prototype.updateFullscreenButtons): Use hasVideo.
+ (Controller.prototype.updateHasVideo): Ditto.
+ (Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
+ unless a file has video.
+
2015-05-04 Chris Dumez <[email protected]>
Crash at com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::createWindow + 185
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (183781 => 183782)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-05-04 23:58:32 UTC (rev 183781)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2015-05-05 00:08:28 UTC (rev 183782)
@@ -986,10 +986,14 @@
return true;
},
+ hasVideo: function()
+ {
+ return this.video.videoTracks && this.video.videoTracks.length;
+ },
+
updateFullscreenButtons: function()
{
- var hasVisualMedia = this.video.videoTracks && this.video.videoTracks.length > 0;
- var shouldBeHidden = !this.video.webkitSupportsFullscreen || !hasVisualMedia;
+ var shouldBeHidden = !this.video.webkitSupportsFullscreen || !this.hasVideo();
this.controls.fullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden);
this.controls.optimizedFullscreenButton.classList.toggle(this.ClassNames.hidden, shouldBeHidden);
},
@@ -1725,7 +1729,7 @@
updateHasVideo: function()
{
- if (this.video.videoTracks.length)
+ if (this.hasVideo())
this.controls.panel.classList.remove(this.ClassNames.noVideo);
else
this.controls.panel.classList.add(this.ClassNames.noVideo);
@@ -1838,7 +1842,7 @@
if (this.wirelessPlaybackDisabled)
wirelessPlaybackTargetsAvailable = false;
- if (wirelessPlaybackTargetsAvailable && this.isPlayable())
+ if (wirelessPlaybackTargetsAvailable && this.isPlayable() && this.hasVideo())
this.controls.wirelessTargetPicker.classList.remove(this.ClassNames.hidden);
else
this.controls.wirelessTargetPicker.classList.add(this.ClassNames.hidden);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes