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:
commit
00af2e7b7a
3 changed files with 3 additions and 9 deletions
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue