Bug 1379030 - Only set calculated size to controlbar for audio element since audio-only video has already had given size from layout. r=jaws
authorRay Lin <ralin@mozilla.com>
Mon, 10 Jul 2017 11:25:01 +0800
changeset 368054 ad99094c54de0b90ee0d6ac596ee73c61f72f3e0
parent 368053 99b67f1f10a528aa6a9bcce4583d618390ff5ddd
child 368055 cf54cb59762c049b6aed33b4cf75e89d19ce6970
push id32156
push userkwierso@gmail.com
push dateMon, 10 Jul 2017 21:54:17 +0000
treeherdermozilla-central@5d794bf4c465 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1379030
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1379030 - Only set calculated size to controlbar for audio element since audio-only video has already had given size from layout. r=jaws MozReview-Commit-ID: 5H5U18DMVxO
toolkit/content/widgets/videocontrols.xml
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -1673,17 +1673,17 @@
 
         // Use flexible spacer to separate controls when scrubber is hidden.
         // As long as muteButton hidden, which means only play button presents,
         // hide spacer and make playButton centered.
         this.controlBarSpacer.hidden = !this.scrubberStack.hidden || this.muteButton.hidden;
 
         // Since the size of videocontrols is expanded with controlBar in <audio>, we
         // should fix the dimensions in order not to recursively trigger reflow afterwards.
-        if (this.isAudioOnly) {
+        if (this.video instanceof HTMLAudioElement) {
           if (givenHeight) {
             this.controlBar.style.height = `${Math.max(givenHeight, this.controlBarMinVisibleHeight)}px`;
           }
           this.controlBar.style.width = `${videoWidth - minControlBarPaddingWidth}px`;
           return;
         }
 
         if (videoHeight < this.controlBarMinHeight ||