Merge pull request #14532 from Snuffleupagus/rm-moz-fullscreen-prefixes

[GENERIC viewer] Remove the `moz`-prefixed FullScreen API usage from the viewer
This commit is contained in:
Tim van der Meij 2022-02-05 14:44:09 +01:00 committed by GitHub
commit 97619ba949
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 15 deletions

View File

@ -677,9 +677,7 @@ const PDFViewerApplication = {
return shadow(
this,
"supportsFullscreen",
document.fullscreenEnabled ||
document.mozFullScreenEnabled ||
document.webkitFullscreenEnabled
document.fullscreenEnabled || document.webkitFullscreenEnabled
);
},

View File

@ -79,8 +79,6 @@ class PDFPresentationMode {
} else {
if (this.container.requestFullscreen) {
this.container.requestFullscreen();
} else if (this.container.mozRequestFullScreen) {
this.container.mozRequestFullScreen();
} else if (this.container.webkitRequestFullscreen) {
this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
} else {
@ -145,11 +143,7 @@ class PDFPresentationMode {
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
return !!document.fullscreenElement;
}
return !!(
document.fullscreenElement ||
document.mozFullScreen ||
document.webkitIsFullScreen
);
return !!(document.fullscreenElement || document.webkitIsFullScreen);
}
/**
@ -450,7 +444,6 @@ class PDFPresentationMode {
window.addEventListener("fullscreenchange", this.fullscreenChangeBind);
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
window.addEventListener("mozfullscreenchange", this.fullscreenChangeBind);
window.addEventListener(
"webkitfullscreenchange",
this.fullscreenChangeBind
@ -464,10 +457,6 @@ class PDFPresentationMode {
_removeFullscreenChangeListeners() {
window.removeEventListener("fullscreenchange", this.fullscreenChangeBind);
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
window.removeEventListener(
"mozfullscreenchange",
this.fullscreenChangeBind
);
window.removeEventListener(
"webkitfullscreenchange",
this.fullscreenChangeBind