Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions src/display/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
AbortException,
AnnotationMode,
assert,
FeatureTest,
getVerbosityLevel,
info,
isNodeJS,
Expand Down Expand Up @@ -172,17 +171,6 @@ const RENDERING_CANCELLED_TIMEOUT = 100; // ms
* `ImageDecoder` in the worker. Primarily used to improve performance of
* image conversion/rendering.
* The default value is `true` in web environments and `false` in Node.js.
*
* NOTE: Also temporarily disabled in Chromium browsers, until we no longer
* support the affected browser versions, because of various bugs:
*
* - Crashes when using the BMP decoder with huge images, e.g. issue6741.pdf;
* see https://issues.chromium.org/issues/374807001
*
* - Broken images when using the JPEG decoder with images that have custom
* colour profiles, e.g. GitHub discussion 19030;
* see https://issues.chromium.org/issues/378869810
*
* @property {number} [canvasMaxAreaInBytes] - The integer value is used to
* know when an image must be resized (uses `OffscreenCanvas` in the worker).
* If it's -1 then a possibly slow algorithm is used to guess the max value.
Expand Down Expand Up @@ -291,15 +279,9 @@ function getDocument(src = {}) {
? src.isOffscreenCanvasSupported
: !isNodeJS;
const isImageDecoderSupported =
// eslint-disable-next-line no-nested-ternary
typeof src.isImageDecoderSupported === "boolean"
? src.isImageDecoderSupported
: // eslint-disable-next-line no-nested-ternary
typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")
? true
: typeof PDFJSDev !== "undefined" && PDFJSDev.test("CHROME")
? false
: !isNodeJS && (FeatureTest.platform.isFirefox || !globalThis.chrome);
: !isNodeJS;
const canvasMaxAreaInBytes = Number.isInteger(src.canvasMaxAreaInBytes)
? src.canvasMaxAreaInBytes
: -1;
Expand Down
Loading