Skip to content

[GENERIC viewer] Remove the moz-prefixed FullScreen API usage from the viewer #14532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,7 @@ const PDFViewerApplication = {
return shadow(
this,
"supportsFullscreen",
document.fullscreenEnabled ||
document.mozFullScreenEnabled ||
document.webkitFullscreenEnabled
document.fullscreenEnabled || document.webkitFullscreenEnabled
);
},

Expand Down
13 changes: 1 addition & 12 deletions web/pdf_presentation_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down