From c5eb79577ae9926111e68382aa6f47fe8086166a Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 29 Apr 2023 08:51:39 +0200 Subject: [PATCH] Revert "Bundle the `` polyfill-CSS in the GENERIC `legacy/`-viewer (PR 14710 follow-up)" This reverts commit bb8f5ec20bf6a2fed1f962178b06bc4d99d1e2ef now that Safari-compatibility is updated. --- gulpfile.js | 10 ---------- web/overlay_manager.js | 9 --------- 2 files changed, 19 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index a25dd399c..71bd903a4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -192,8 +192,6 @@ function createWebpackConfig( DEFAULT_PREFERENCES: defaultPreferencesDir ? getDefaultPreferences(defaultPreferencesDir) : {}, - DIALOG_POLYFILL_CSS: - defines.GENERIC && !defines.SKIP_BABEL ? getDialogPolyfillCSS() : "", }); const licenseHeaderLibre = fs .readFileSync("./src/license_header_libre.js") @@ -821,12 +819,6 @@ function getDefaultPreferences(dir) { return AppOptions.getAll(OptionKind.PREFERENCE); } -function getDialogPolyfillCSS() { - return fs - .readFileSync("node_modules/dialog-polyfill/dist/dialog-polyfill.css") - .toString(); -} - gulp.task("locale", function () { const VIEWER_LOCALE_OUTPUT = "web/locale/"; @@ -1585,8 +1577,6 @@ function buildLib(defines, dir) { DEFAULT_PREFERENCES: getDefaultPreferences( defines.SKIP_BABEL ? "lib/" : "lib-legacy/" ), - DIALOG_POLYFILL_CSS: - defines.GENERIC && !defines.SKIP_BABEL ? getDialogPolyfillCSS() : "", }); const inputStream = merge([ diff --git a/web/overlay_manager.js b/web/overlay_manager.js index 885066106..e4d7378e1 100644 --- a/web/overlay_manager.js +++ b/web/overlay_manager.js @@ -44,15 +44,6 @@ class OverlayManager { ) { const dialogPolyfill = require("dialog-polyfill/dist/dialog-polyfill.js"); dialogPolyfill.registerDialog(dialog); - - if (!this._dialogPolyfillCSS) { - this._dialogPolyfillCSS = true; - - const style = document.createElement("style"); - style.textContent = PDFJSDev.eval("DIALOG_POLYFILL_CSS"); - - document.head.prepend(style); - } } dialog.addEventListener("cancel", evt => {