Only call showControls if controls are hidden.
authorroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Mar 2015 20:22:15 +0000 (20:22 +0000)
committerroger_fong@apple.com <roger_fong@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Mar 2015 20:22:15 +0000 (20:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142496.
<rdar://problem/20083732>
Reviewed by Dean Jackson.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handleWrapperMouseMove):
(Controller.prototype.controlsAreHidden):
Controls are hidden if the ‘show’ class name is not present,
not if the ‘hidden’ class name is.

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

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

index b7fa737..5d045ee 100644 (file)
 
 2015-03-09  Roger Fong  <roger_fong@apple.com>
 
+        Only call showControls if controls are hidden.
+        https://bugs.webkit.org/show_bug.cgi?id=142496.
+        <rdar://problem/20083732>
+
+        Reviewed by Dean Jackson.
+
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.handleWrapperMouseMove):
+        (Controller.prototype.controlsAreHidden):
+        Controls are hidden if the ‘show’ class name is not present,
+        not if the ‘hidden’ class name is.
+
+2015-03-09  Roger Fong  <roger_fong@apple.com>
+
         Unreviewed. Re-add CSS property that was unintentionally removed in r180893
         <rdar://problem/20083715>
 
index 45ab26c..11b005f 100644 (file)
@@ -139,7 +139,7 @@ audio::-webkit-media-controls-play-button {
 
 video::-webkit-media-controls-play-button.paused,
 audio::-webkit-media-controls-play-button.paused {
-    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 15" fill="white"><path d="M 0,.5 12,7 0,13.5 z"/></svg>');
+    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 15" fill="white"><path d="M 0,0 12,7 0,13 z"/></svg>');
     width: 12px;
 }
 
index 95447e0..af7f120 100644 (file)
@@ -676,7 +676,8 @@ Controller.prototype = {
 
     handleWrapperMouseMove: function(event)
     {
-        this.showControls();
+        if (this.controlsAreHidden())
+            this.showControls();
         this.resetHideControlsTimer();
 
         if (!this.isDragging)
@@ -1230,7 +1231,7 @@ Controller.prototype = {
 
     controlsAreHidden: function()
     {
-        return !this.isAudio() && this.controls.panel.classList.contains(this.ClassNames.hidden);
+        return !this.isAudio() && !this.controls.panel.classList.contains(this.ClassNames.show);
     },
 
     removeControls: function()