From e6fe42b1fa368f3833883c5f9c5dc3139906baad Mon Sep 17 00:00:00 2001 From: Ray Lin Date: Mon, 21 Nov 2016 10:21:28 +0800 Subject: [PATCH] Bug 1302310 - Make the width of video control match video container. r=jaws MozReview-Commit-ID: B2pyiVfXBMF --HG-- extra : rebase_source : 6ce4768f338a02d7789a71e9ca02a15c940ecd7b --- toolkit/content/widgets/videocontrols.xml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/toolkit/content/widgets/videocontrols.xml b/toolkit/content/widgets/videocontrols.xml index b3cdc7b625d5..40eef5793de4 100644 --- a/toolkit/content/widgets/videocontrols.xml +++ b/toolkit/content/widgets/videocontrols.xml @@ -1615,22 +1615,6 @@ let videoHeight = this.video.clientHeight; const minControlBarPaddingWidth = 18; - if (this.video.readyState >= this.video.HAVE_METADATA) { - if (!this.isAudioOnly && this.video.videoWidth && this.video.videoHeight) { - let rect = this.video.getBoundingClientRect(); - let widthRatio = rect.width / this.video.videoWidth; - let heightRatio = rect.height / this.video.videoHeight; - let resizedWidth = this.video.videoWidth * Math.min(widthRatio, heightRatio); - - this.controlsContainer.style.width = `${resizedWidth}px`; - this.controlsContainer.style.left = `${(videoWidth - resizedWidth) / 2}px`; - - videoWidth = resizedWidth; - } else { - this.controlsContainer.style.width = ""; - this.controlsContainer.style.left = ""; - } - } // Hide and show control in order. const prioritizedControls = [ this.playButton,