Bug 1274146 part 1 - Not call setFullscreenButtonState() in fullscreenchange handler. r?gijs draft
authorXidorn Quan <me@upsuper.org>
Fri, 20 May 2016 16:00:13 +1000
changeset 369062 ae6e487a59c5820499e1cbb15b7edd549b1efb58
parent 369047 5a751abd6841ea0107e2cb39fefbc1a673669044
child 369063 ba4730390fe5c76486ddea08010c719d3858a74b
push id18720
push userxquan@mozilla.com
push dateFri, 20 May 2016 06:01:55 +0000
reviewersgijs
bugs1274146
milestone49.0a1
Bug 1274146 part 1 - Not call setFullscreenButtonState() in fullscreenchange handler. r?gijs Fullscreen change triggers resize reflow, and setFullscreenButtonState should be called by setupInitialState() then when the video control is rebound to the element. MozReview-Commit-ID: 9B2IoNEPDeX
toolkit/content/widgets/videocontrols.xml
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -1092,17 +1092,16 @@
                     else
                         this.fullscreenButton.removeAttribute("fullscreened");
                 },
 
                 onFullscreenChange: function () {
                     if (this.isVideoInFullScreen()) {
                         Utils._hideControlsTimeout = setTimeout(this._hideControlsFn, this.HIDE_CONTROLS_TIMEOUT_MS);
                     }
-                    this.setFullscreenButtonState();
                 },
 
                 clickToPlayClickHandler : function(e) {
                     if (e.button != 0)
                         return;
                     if (this.hasError() && !this.suppressError) {
                         // Errors that can be dismissed should be placed here as we discover them.
                         if (this.video.error.code != this.video.error.MEDIA_ERR_ABORTED)