Merge pull request #14538 from Snuffleupagus/update-compat

[api-minor] Update the minimum supported browser versions
This commit is contained in:
Tim van der Meij 2022-02-06 14:11:33 +01:00 committed by GitHub
commit acc758c40c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 19 deletions

View File

@ -78,9 +78,9 @@ const config = JSON.parse(fs.readFileSync(CONFIG_FILE).toString());
const AUTOPREFIXER_CONFIG = {
overrideBrowserslist: [
"last 2 versions",
"Chrome >= 68",
"Chrome >= 73",
"Firefox ESR",
"Safari >= 11.1",
"Safari >= 12.1",
"> 0.5%",
"not IE > 0",
"not dead",
@ -1346,7 +1346,7 @@ gulp.task(
),
preprocessCSS("web/viewer.css", "chrome", defines, true)
.pipe(
postcss([autoprefixer({ overrideBrowserslist: ["chrome >= 68"] })])
postcss([autoprefixer({ overrideBrowserslist: ["Chrome >= 73"] })])
)
.pipe(gulp.dest(CHROME_BUILD_CONTENT_DIR + "web")),

View File

@ -18,14 +18,8 @@ import { isNodeJS } from "./is_node.js";
// Skip compatibility checks for modern builds and if we already ran the module.
if (
(typeof PDFJSDev === "undefined" || !PDFJSDev.test("SKIP_BABEL")) &&
(typeof globalThis === "undefined" || !globalThis._pdfjsCompatibilityChecked)
!globalThis._pdfjsCompatibilityChecked
) {
// Provides support for `globalThis` in legacy browsers.
// Support: Firefox<65, Chrome<71, Safari<12.1, Node.js<12.0.0
if (typeof globalThis === "undefined" || globalThis.Math !== Math) {
// eslint-disable-next-line no-global-assign
globalThis = require("core-js/es/global-this");
}
globalThis._pdfjsCompatibilityChecked = true;
// Support: Node.js
@ -58,15 +52,6 @@ if (
globalThis.DOMMatrix = require("dommatrix/dist/dommatrix.js");
})();
// Provides support for Object.fromEntries in legacy browsers.
// Support: Firefox<63, Chrome<73, Safari<12.1, Node.js<12.0.0
(function checkObjectFromEntries() {
if (Object.fromEntries) {
return;
}
require("core-js/es/object/from-entries.js");
})();
// Provides support for *recent* additions to the Promise specification,
// however basic Promise support is assumed to be available natively.
// Support: Firefox<71, Chrome<76, Safari<13, Node.js<12.9.0