diff --git a/toolkit/components/pdfjs/content/build/pdf.mjs b/toolkit/components/pdfjs/content/build/pdf.mjs --- a/toolkit/components/pdfjs/content/build/pdf.mjs +++ b/toolkit/components/pdfjs/content/build/pdf.mjs @@ -8153,11 +8153,11 @@ worker = workerParams.port ? PDFWorker.fromPort(workerParams) : new PDFWorker(workerParams); task._worker = worker; } const fetchDocParams = { docId, - apiVersion: '4.0.240', + apiVersion: '4.0.246', data, password, disableAutoFetch, rangeChunkSize, length, @@ -9777,12 +9777,12 @@ this.callback(); } } } } -const version = '4.0.240'; -const build = 'ffbfd680e'; +const version = '4.0.246'; +const build = '086a5921d'; ;// CONCATENATED MODULE: ./src/display/text_layer.js const MAX_TEXT_DIVS_TO_RENDER = 100000; @@ -14963,12 +14963,12 @@ -const pdfjsVersion = '4.0.240'; -const pdfjsBuild = 'ffbfd680e'; +const pdfjsVersion = '4.0.246'; +const pdfjsBuild = '086a5921d'; var __webpack_exports__AbortException = __webpack_exports__.AbortException; var __webpack_exports__AnnotationEditorLayer = __webpack_exports__.AnnotationEditorLayer; var __webpack_exports__AnnotationEditorParamsType = __webpack_exports__.AnnotationEditorParamsType; var __webpack_exports__AnnotationEditorType = __webpack_exports__.AnnotationEditorType; diff --git a/toolkit/components/pdfjs/content/build/pdf.scripting.mjs b/toolkit/components/pdfjs/content/build/pdf.scripting.mjs --- a/toolkit/components/pdfjs/content/build/pdf.scripting.mjs +++ b/toolkit/components/pdfjs/content/build/pdf.scripting.mjs @@ -3994,10 +3994,10 @@ }; } ;// CONCATENATED MODULE: ./src/pdf.scripting.js -const pdfjsVersion = '4.0.240'; -const pdfjsBuild = 'ffbfd680e'; +const pdfjsVersion = '4.0.246'; +const pdfjsBuild = '086a5921d'; globalThis.pdfjsScripting = { initSandbox: initSandbox }; diff --git a/toolkit/components/pdfjs/content/build/pdf.worker.mjs b/toolkit/components/pdfjs/content/build/pdf.worker.mjs --- a/toolkit/components/pdfjs/content/build/pdf.worker.mjs +++ b/toolkit/components/pdfjs/content/build/pdf.worker.mjs @@ -7165,10 +7165,13 @@ throw new JpegError("JpegImage.parse - unknown marker: " + fileMarker.toString(16)); } fileMarker = readUint16(data, offset); offset += 2; } + if (!frame) { + throw new JpegError("JpegImage.parse - no frame data found."); + } this.width = frame.samplesPerLine; this.height = frame.scanLines; this.jfif = jfif; this.adobe = adobe; this.components = []; @@ -56399,11 +56402,11 @@ const verbosity = getVerbosityLevel(); const { docId, apiVersion } = docParams; - const workerVersion = '4.0.240'; + const workerVersion = '4.0.246'; if (apiVersion !== workerVersion) { throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`); } const workerHandlerName = docId + "_worker"; let handler = new MessageHandler(workerHandlerName, docId, port); @@ -56960,10 +56963,10 @@ WorkerMessageHandler.initializeFromPort(self); } ;// CONCATENATED MODULE: ./src/pdf.worker.js -const pdfjsVersion = '4.0.240'; -const pdfjsBuild = 'ffbfd680e'; +const pdfjsVersion = '4.0.246'; +const pdfjsBuild = '086a5921d'; var __webpack_exports__WorkerMessageHandler = __webpack_exports__.WorkerMessageHandler; export { __webpack_exports__WorkerMessageHandler as WorkerMessageHandler }; diff --git a/toolkit/components/pdfjs/content/web/viewer-geckoview.mjs b/toolkit/components/pdfjs/content/web/viewer-geckoview.mjs --- a/toolkit/components/pdfjs/content/web/viewer-geckoview.mjs +++ b/toolkit/components/pdfjs/content/web/viewer-geckoview.mjs @@ -789,10 +789,11 @@ value: "resource://pdf.js/build/pdf.worker.mjs", kind: OptionKind.WORKER } }; ; +; const userOptions = Object.create(null); class AppOptions { constructor() { throw new Error("Cannot initialize AppOptions."); } @@ -4968,11 +4969,11 @@ #scrollModePageState = null; #onVisibilityChange = null; #scaleTimeoutId = null; #textLayerMode = TextLayerMode.ENABLE; constructor(options) { - const viewerVersion = '4.0.240'; + const viewerVersion = '4.0.246'; if (version !== viewerVersion) { throw new Error(`The API version "${version}" does not match the Viewer version "${viewerVersion}".`); } this.container = options.container; this.viewer = options.viewer || options.container.firstElementChild; @@ -9202,12 +9203,12 @@ -const pdfjsVersion = '4.0.240'; -const pdfjsBuild = 'ffbfd680e'; +const pdfjsVersion = '4.0.246'; +const pdfjsBuild = '086a5921d'; const AppConstants = null; window.PDFViewerApplication = PDFViewerApplication; window.PDFViewerApplicationConstants = AppConstants; window.PDFViewerApplicationOptions = AppOptions; function getViewerConfiguration() { diff --git a/toolkit/components/pdfjs/content/web/viewer.css b/toolkit/components/pdfjs/content/web/viewer.css --- a/toolkit/components/pdfjs/content/web/viewer.css +++ b/toolkit/components/pdfjs/content/web/viewer.css @@ -1306,11 +1306,11 @@ .altText{ display:flex; align-items:center; justify-content:center; padding-inline:4px; - width:auto; + width:max-content; height:24px; min-width:88px; z-index:1; pointer-events:all; diff --git a/toolkit/components/pdfjs/content/web/viewer.mjs b/toolkit/components/pdfjs/content/web/viewer.mjs --- a/toolkit/components/pdfjs/content/web/viewer.mjs +++ b/toolkit/components/pdfjs/content/web/viewer.mjs @@ -789,10 +789,11 @@ value: "resource://pdf.js/build/pdf.worker.mjs", kind: OptionKind.WORKER } }; ; +; const userOptions = Object.create(null); class AppOptions { constructor() { throw new Error("Cannot initialize AppOptions."); } @@ -7562,11 +7563,11 @@ #scrollModePageState = null; #onVisibilityChange = null; #scaleTimeoutId = null; #textLayerMode = TextLayerMode.ENABLE; constructor(options) { - const viewerVersion = '4.0.240'; + const viewerVersion = '4.0.246'; if (version !== viewerVersion) { throw new Error(`The API version "${version}" does not match the Viewer version "${viewerVersion}".`); } this.container = options.container; this.viewer = options.viewer || options.container.firstElementChild; @@ -12256,12 +12257,12 @@ -const pdfjsVersion = '4.0.240'; -const pdfjsBuild = 'ffbfd680e'; +const pdfjsVersion = '4.0.246'; +const pdfjsBuild = '086a5921d'; const AppConstants = null; window.PDFViewerApplication = PDFViewerApplication; window.PDFViewerApplicationConstants = AppConstants; window.PDFViewerApplicationOptions = AppOptions; function getViewerConfiguration() { diff --git a/toolkit/components/pdfjs/moz.yaml b/toolkit/components/pdfjs/moz.yaml --- a/toolkit/components/pdfjs/moz.yaml +++ b/toolkit/components/pdfjs/moz.yaml @@ -18,12 +18,12 @@ # Usually different from repository url url: https://github.com/mozilla/pdf.js # Human-readable identifier for this version/release # Generally "version NNN", "tag SSS", "bookmark SSS" - release: ffbfd680ec418c05afdcafb6b3e6e962f978f8b0 (2023-11-15T11:59:52Z). - revision: ffbfd680ec418c05afdcafb6b3e6e962f978f8b0 + release: 086a5921dc34dfd0e06dd994032dcf7e69305fe0 (2023-11-20T17:53:35Z). + revision: 086a5921dc34dfd0e06dd994032dcf7e69305fe0 # The package's license, where possible using the mnemonic from # https://spdx.org/licenses/ # Multiple licenses can be specified (as a YAML list) # A "LICENSE" file must exist containing the full license text