Remove unnecessary `const double` method arguments
[WebKit-https.git] / Source / WebCore / Modules / mediacontrols / mediaControlsiOS.js
index fbc02e2..9d6d28a 100644 (file)
@@ -27,7 +27,7 @@ ControllerIOS.StartPlaybackControls = 2;
 
 ControllerIOS.prototype = {
     /* Constants */
-    MinimumTimelineWidth: 200,
+    MinimumTimelineWidth: 150,
     ButtonWidth: 42,
 
     get idiom()
@@ -536,7 +536,12 @@ ControllerIOS.prototype = {
         Controller.prototype.setShouldListenForPlaybackTargetAvailabilityEvent.call(this, shouldListen);
     },
 
-    handlePresentationModeChange: function(event)
+    shouldReturnVideoLayerToInline: function()
+    {
+        return this.presentationMode() === 'inline';
+    },
+
+    updatePictureInPicturePlaceholder: function(event)
     {
         var presentationMode = this.presentationMode();
 
@@ -552,7 +557,7 @@ ControllerIOS.prototype = {
                 break;
         }
 
-        Controller.prototype.handlePresentationModeChange.call(this, event);
+        Controller.prototype.updatePictureInPicturePlaceholder.call(this, event);
     },
 
     // Due to the bad way we are faking inheritance here, in particular the extends method
@@ -584,22 +589,30 @@ ControllerIOS.prototype = {
 
         var scaleValue = 1 / newScaleFactor;
         var scaleTransform = "scale(" + scaleValue + ")";
+
+        function applyScaleFactorToElement(element) {
+            if (scaleValue > 1) {
+                element.style.zoom = scaleValue;
+                element.style.webkitTransform = "scale(1)";
+            } else {
+                element.style.zoom = 1;
+                element.style.webkitTransform = scaleTransform;
+            }
+        }
+
         if (this.controls.startPlaybackButton)
-            this.controls.startPlaybackButton.style.webkitTransform = scaleTransform;
+            applyScaleFactorToElement(this.controls.startPlaybackButton);
         if (this.controls.panel) {
+            applyScaleFactorToElement(this.controls.panel);
             if (scaleValue > 1) {
                 this.controls.panel.style.width = "100%";
-                this.controls.panel.style.zoom = scaleValue;
-                this.controls.panel.style.webkitTransform = "scale(1)";
                 this.controls.timelineBox.style.webkitTextSizeAdjust = (100 * scaleValue) + "%";
             } else {
                 var bottomAligment = -2 * scaleValue;
                 this.controls.panel.style.bottom = bottomAligment + "px";
                 this.controls.panel.style.paddingBottom = -(newScaleFactor * bottomAligment) + "px";
                 this.controls.panel.style.width = Math.round(newScaleFactor * 100) + "%";
-                this.controls.panel.style.webkitTransform = scaleTransform;
                 this.controls.timelineBox.style.webkitTextSizeAdjust = "auto";
-                this.controls.panel.style.zoom = 1;
             }
             this.controls.panelBackground.style.height = (50 * scaleValue) + "px";