[Media] Always update controls for <audio> since they are always visible
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Oct 2014 20:35:06 +0000 (20:35 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Oct 2014 20:35:06 +0000 (20:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=137829
<rdar://problem/18693987>

Reviewed by Brent Fulgham.

Revision 174756 made a change to only update the display of the controls
while they are visible. However, <audio> elements didn't detect visibility
the same way, since their controls do not auto-hide.

Change controlsAreHidden to check if we're an audio element.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174832 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/mediaControlsApple.js

index ef7542f..e99ab1a 100644 (file)
@@ -1,3 +1,20 @@
+2014-10-17  Dean Jackson  <dino@apple.com>
+
+        [Media] Always update controls for <audio> since they are always visible
+        https://bugs.webkit.org/show_bug.cgi?id=137829
+        <rdar://problem/18693987>
+
+        Reviewed by Brent Fulgham.
+
+        Revision 174756 made a change to only update the display of the controls
+        while they are visible. However, <audio> elements didn't detect visibility
+        the same way, since their controls do not auto-hide.
+
+        Change controlsAreHidden to check if we're an audio element.
+
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.
+
 2014-10-17  peavo@outlook.com  <peavo@outlook.com>
 
         [WinCairo] Accelerated compositing is not implemented.
index 44a1ebd..30c18f4 100644 (file)
@@ -1037,7 +1037,7 @@ Controller.prototype = {
 
     controlsAreHidden: function()
     {
-        return !this.controls.panel.classList.contains(this.ClassNames.show) || this.controls.panel.classList.contains(this.ClassNames.hidden);
+        return !this.isAudio() && !this.controls.panel.classList.contains(this.ClassNames.show) || this.controls.panel.classList.contains(this.ClassNames.hidden);
     },
 
     removeControls: function()