Revert "Bundle the <dialog>
polyfill-CSS in the GENERIC legacy/
-viewer (PR 14710 follow-up)"
This reverts commit bb8f5ec20bf6a2fed1f962178b06bc4d99d1e2ef now that Safari-compatibility is updated.
This commit is contained in:
parent
cfa15bbf59
commit
c5eb79577a
10
gulpfile.js
10
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([
|
||||
|
@ -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 => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user