Skip to content
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

[api-minor] Update minimum supported browser versions (PR 13361 follow-up) #13379

Merged
merged 1 commit into from
May 15, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ const config = JSON.parse(fs.readFileSync(CONFIG_FILE).toString());
const AUTOPREFIXER_CONFIG = {
overrideBrowserslist: [
"last 2 versions",
"Chrome >= 49", // Last supported on Windows XP
"Firefox >= 52", // Last supported on Windows XP
"Chrome >= 68",
"Firefox ESR",
"Safari >= 10",
"Safari >= 11.1",
"> 0.5%",
"not IE > 0",
"not dead",
Expand Down Expand Up @@ -1321,7 +1320,7 @@ gulp.task(
),
preprocessCSS("web/viewer.css", "chrome", defines, true)
.pipe(
postcss([autoprefixer({ overrideBrowserslist: ["chrome >= 49"] })])
postcss([autoprefixer({ overrideBrowserslist: ["chrome >= 68"] })])
)
.pipe(gulp.dest(CHROME_BUILD_CONTENT_DIR + "web")),

Expand Down
42 changes: 3 additions & 39 deletions src/shared/compatibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (
})();

// Provides support for Object.fromEntries in legacy browsers.
// Support: Firefox<63, Chrome<73, Safari<12.1
// Support: Firefox<63, Chrome<73, Safari<12.1, Node.js<12.0.0
(function checkObjectFromEntries() {
if (Object.fromEntries) {
return;
Expand All @@ -61,7 +61,7 @@ if (

// 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
// Support: Firefox<71, Chrome<76, Safari<13, Node.js<12.9.0
(function checkPromise() {
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("IMAGE_DECODERS")) {
// The current image decoders are synchronous, hence `Promise` shouldn't
Expand All @@ -74,7 +74,7 @@ if (
globalThis.Promise = require("core-js/es/promise/index.js");
})();

// Support: Safari<10.1, Node.js
// Support: Node.js
(function checkReadableStream() {
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("IMAGE_DECODERS")) {
// The current image decoders are synchronous, hence `ReadableStream`
Expand Down Expand Up @@ -102,40 +102,4 @@ if (
}
globalThis.ReadableStream = require("web-streams-polyfill/dist/ponyfill.js").ReadableStream;
})();

// Provides support for String.prototype.padStart in legacy browsers.
// Support: Chrome<57, Safari<10
(function checkStringPadStart() {
if (String.prototype.padStart) {
return;
}
require("core-js/es/string/pad-start.js");
})();

// Provides support for String.prototype.padEnd in legacy browsers.
// Support: Chrome<57, Safari<10
(function checkStringPadEnd() {
if (String.prototype.padEnd) {
return;
}
require("core-js/es/string/pad-end.js");
})();

// Provides support for Object.values in legacy browsers.
// Support: Chrome<54, Safari<10.1
(function checkObjectValues() {
if (Object.values) {
return;
}
Object.values = require("core-js/es/object/values.js");
})();

// Provides support for Object.entries in legacy browsers.
// Support: Chrome<54, Safari<10.1
(function checkObjectEntries() {
if (Object.entries) {
return;
}
Object.entries = require("core-js/es/object/entries.js");
})();
}