Merge pull request #16305 from Snuffleupagus/PDFJSDev-skip-PRODUCTION

Remove the `PRODUCTION` build-target
This commit is contained in:
Tim van der Meij 2023-04-22 14:53:30 +02:00 committed by GitHub
commit c9359957e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 89 additions and 269 deletions

View file

@ -165,10 +165,7 @@ class PDFPageView {
this.renderTask = null;
this.resume = null;
if (
typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || GENERIC")
) {
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
this._isStandalone = !this.renderingQueue?.hasViewer();
}
@ -194,8 +191,7 @@ class PDFPageView {
container?.append(div);
if (
(typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
this._isStandalone
) {
// Ensure that the various layers always get the correct initial size,
@ -549,8 +545,7 @@ class PDFPageView {
this.#setDimensions();
if (
(typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
(typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) &&
this._isStandalone
) {
this.div.parentNode?.style.setProperty(
@ -687,8 +682,7 @@ class PDFPageView {
}) {
// Scale target (canvas), its wrapper and page container.
if (
(typeof PDFJSDev === "undefined" ||
PDFJSDev.test("!PRODUCTION || TESTING")) &&
(typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) &&
!(target instanceof HTMLCanvasElement)
) {
throw new Error("Expected `target` to be a canvas.");