From 7353927cf9c5db683dca29ee30ae7e94dd7063ba Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Wed, 18 May 2016 21:12:43 -0700 Subject: [PATCH] Back out bb1c5961b1e1 (bug 1273468) for failures in test_videocontrols.html CLOSED TREE --- toolkit/content/TopLevelVideoDocument.js | 6 +++--- toolkit/content/widgets/videocontrols.xml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/toolkit/content/TopLevelVideoDocument.js b/toolkit/content/TopLevelVideoDocument.js index 5a2b8a857c44..0642da258d0e 100644 --- a/toolkit/content/TopLevelVideoDocument.js +++ b/toolkit/content/TopLevelVideoDocument.js @@ -29,10 +29,10 @@ document.addEventListener("keypress", ev => { ev.preventDefault(); ev.stopPropagation(); - if (!document.mozFullScreenElement) { - videoElement.mozRequestFullScreen(); + if (!document.fullscreenElement) { + videoElement.requestFullscreen(); } else { - document.mozCancelFullScreen(); + document.exitFullscreen(); } return; } diff --git a/toolkit/content/widgets/videocontrols.xml b/toolkit/content/widgets/videocontrols.xml index 3cbe71edb5d1..56adea744080 100644 --- a/toolkit/content/widgets/videocontrols.xml +++ b/toolkit/content/widgets/videocontrols.xml @@ -1007,7 +1007,7 @@ } else { element.setAttribute("fadeout", true); if (element.classList.contains("controlBar") && !this.hasError() && - document.mozFullScreenElement == this.video) + document.fullscreenElement == this.video) this.controlsSpacer.setAttribute("hideCursor", true); } @@ -1065,17 +1065,17 @@ }, isVideoInFullScreen : function () { - return document.mozFullScreenElement == this.video; + return document.fullscreenElement == this.video; }, toggleFullscreen : function () { this.isVideoInFullScreen() ? - document.mozCancelFullScreen() : - this.video.mozRequestFullScreen(); + document.exitFullscreen() : + this.video.requestFullscreen(); }, setFullscreenButtonState : function () { - if (this.isAudioOnly || !document.mozFullScreenEnabled) { + if (this.isAudioOnly || !document.fullscreenEnabled) { this.controlBar.setAttribute("fullscreen-unavailable", true); this.adjustControlSize(); return; @@ -1525,7 +1525,7 @@ addListener(this.videocontrols, "resizevideocontrols", this.adjustControlSize); addListener(this.videocontrols, "transitionend", this.onTransitionEnd); - addListener(this.video.ownerDocument, "mozfullscreenchange", this.onFullscreenChange); + addListener(this.video.ownerDocument, "fullscreenchange", this.onFullscreenChange); addListener(this.video, "keypress", this.keyHandler); addListener(this.videocontrols, "dragstart", function(event) {