1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Merge pull request #17942 from Snuffleupagus/Safari-16

[api-minor] Update the minimum supported Safari version to 16.4
This commit is contained in:
Tim van der Meij 2024-04-15 15:02:51 +02:00 committed by GitHub
commit 00af2e7b7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 9 deletions

View file

@ -84,7 +84,7 @@ const ENV_TARGETS = [
"last 2 versions",
"Chrome >= 98",
"Firefox ESR",
"Safari >= 15.4",
"Safari >= 16.4",
"Node >= 18",
"> 1%",
"not IE > 0",

View file

@ -67,10 +67,7 @@ async function writeStream(stream, buffer, transform) {
// The number 256 is arbitrary, but it should be reasonable.
const MIN_LENGTH_FOR_COMPRESSING = 256;
if (
typeof CompressionStream !== "undefined" &&
(bytes.length >= MIN_LENGTH_FOR_COMPRESSING || isFilterZeroFlateDecode)
) {
if (bytes.length >= MIN_LENGTH_FOR_COMPRESSING || isFilterZeroFlateDecode) {
try {
const cs = new CompressionStream("deflate");
const writer = cs.writable.getWriter();

View file

@ -399,9 +399,6 @@ const PDFViewerApplication = {
const container = appConfig.mainContainer,
viewer = appConfig.viewerContainer;
const annotationEditorMode = AppOptions.get("annotationEditorMode");
const isOffscreenCanvasSupported =
AppOptions.get("isOffscreenCanvasSupported") &&
FeatureTest.isOffscreenCanvasSupported;
const pageColors =
AppOptions.get("forcePageColors") ||
window.matchMedia("(forced-colors: active)").matches
@ -478,7 +475,7 @@ const PDFViewerApplication = {
if (appConfig.annotationEditorParams) {
if (annotationEditorMode !== AnnotationEditorType.DISABLE) {
if (AppOptions.get("enableStampEditor") && isOffscreenCanvasSupported) {
if (AppOptions.get("enableStampEditor")) {
appConfig.toolbar?.editorStampButton?.classList.remove("hidden");
}