Bug 729111: Renable HTML5 centered play video button after video is resized.
authorCharles Chan <charles.wh.chan@gmail.com>
Tue, 13 Mar 2012 00:12:48 -0700 (2012-03-13)
changeset 88921 c7e4db80d28081c0e88955b6a972f286743fd40a
parent 88920 b2a4560c0af0534c4794e740904f0f8ac6cda6b0
child 88922 bf608f9ed9cabd17f3d2cf174f8c007b27f3b8ef
push id22231
push usertim.taubert@gmx.de
push dateTue, 13 Mar 2012 10:30:52 +0000 (2012-03-13)
treeherdermozilla-central@ee4e0c98cb02 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs729111
milestone13.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 729111: Renable HTML5 centered play video button after video is resized.
toolkit/content/widgets/videocontrols.xml
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -1256,18 +1256,21 @@
                 _overlayPlayButtonWidth : 64,
                 adjustControlSize : function adjustControlSize() {
                     if (this.isAudioOnly)
                         return;
 
                     let videoHeight = this.video.clientHeight;
                     let videoWidth = this.video.clientWidth;
 
-                    if (this._overlayPlayButtonHeight > videoHeight || this._overlayPlayButtonWidth > videoWidth)
+                    if ((this._overlayPlayButtonHeight + this._controlBarHeight) > videoHeight ||
+                        this._overlayPlayButtonWidth > videoWidth)
                         this.clickToPlay.hidden = true;
+                    else if (this.clickToPlay.hidden)
+                        this.clickToPlay.hidden = false;
 
                     // The scrubber has |flex=1|, therefore |minScrubberWidth|
                     // was generated by empirical testing.
                     let minScrubberWidth = 25;
                     let minWidthAllControls = this._playButtonWidth +
                                               minScrubberWidth +
                                               this._durationLabelWidth +
                                               this._muteButtonWidth +