REGRESSION (r201474): Should set overflow: hidden on -webkit-media-controls when...
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Jun 2016 00:36:55 +0000 (00:36 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Jun 2016 00:36:55 +0000 (00:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158377

Reviewed by Darin Adler.

In r201474, we defer removing the hidden class from inlinePlaybackPlaceholder until
showInlinePlaybackPlaceholderWhenSafe(). We also need to move the code that adds the
placeholder-showing class to -webkit-media-controls to that method.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.showInlinePlaybackPlaceholderWhenSafe):
Add the "placeholder-showing" class to -webkit-media-controls when we show the placeholder.
(Controller.prototype.handlePresentationModeChange):
Remove the "placeholder-showing" class from -webkit-media-controls when we hide the
placeholder. Remove the old code that adds and removes that class.

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

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

index 2f42f67..4833ef0 100644 (file)
@@ -1,3 +1,21 @@
+2016-06-03  Ada Chan  <adachan@apple.com>
+
+        REGRESSION (r201474): Should set overflow: hidden on -webkit-media-controls when placeholder is showing
+        https://bugs.webkit.org/show_bug.cgi?id=158377
+
+        Reviewed by Darin Adler.
+
+        In r201474, we defer removing the hidden class from inlinePlaybackPlaceholder until
+        showInlinePlaybackPlaceholderWhenSafe(). We also need to move the code that adds the
+        placeholder-showing class to -webkit-media-controls to that method.
+
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.showInlinePlaybackPlaceholderWhenSafe):
+        Add the "placeholder-showing" class to -webkit-media-controls when we show the placeholder.
+        (Controller.prototype.handlePresentationModeChange):
+        Remove the "placeholder-showing" class from -webkit-media-controls when we hide the
+        placeholder. Remove the old code that adds and removes that class.
+
 2016-06-04  Darin Adler  <darin@apple.com>
 
         leaks seen in fast/css/variables tests
index 061aa95..6cc4cdb 100644 (file)
@@ -842,9 +842,10 @@ Controller.prototype = {
         if (this.presentationMode() != 'picture-in-picture')
             return;
 
-        if (!this.host.isVideoLayerInline)
+        if (!this.host.isVideoLayerInline) {
             this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.hidden);
-        else
+            this.base.classList.add(this.ClassNames.placeholderShowing);
+        } else
             setTimeout(this.showInlinePlaybackPlaceholderWhenSafe.bind(this), this.PlaceholderPollingDelay);
     },
 
@@ -859,6 +860,7 @@ Controller.prototype = {
                 this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.pictureInPicture);
                 this.controls.inlinePlaybackPlaceholderTextTop.classList.remove(this.ClassNames.pictureInPicture);
                 this.controls.inlinePlaybackPlaceholderTextBottom.classList.remove(this.ClassNames.pictureInPicture);
+                this.base.classList.remove(this.ClassNames.placeholderShowing);
 
                 this.controls.pictureInPictureButton.classList.remove(this.ClassNames.returnFromPictureInPicture);
                 break;
@@ -884,11 +886,6 @@ Controller.prototype = {
                 break;
         }
 
-        if (this.controls.inlinePlaybackPlaceholder.classList.contains(this.ClassNames.hidden))
-            this.base.classList.remove(this.ClassNames.placeholderShowing);
-        else
-            this.base.classList.add(this.ClassNames.placeholderShowing);
-
         this.updateControls();
         this.updateCaptionContainer();
         this.resetHideControlsTimer();