diff --git a/toolkit/components/pdfjs/README.mozilla b/toolkit/components/pdfjs/README.mozilla --- a/toolkit/components/pdfjs/README.mozilla +++ b/toolkit/components/pdfjs/README.mozilla @@ -1,5 +1,5 @@ This is the PDF.js project output, https://github.com/mozilla/pdf.js -Current extension version is: 2.14.224 +Current extension version is: 2.14.233 -Taken from upstream commit: 2be19e828 +Taken from upstream commit: b72a44832 diff --git a/toolkit/components/pdfjs/content/build/pdf.js b/toolkit/components/pdfjs/content/build/pdf.js --- a/toolkit/components/pdfjs/content/build/pdf.js +++ b/toolkit/components/pdfjs/content/build/pdf.js @@ -1340,11 +1340,11 @@ source.contentDispositionFilename = pdfDataRangeTransport.contentDispositionFilename; } const workerId = await worker.messageHandler.sendWithPromise("GetDocRequest", { docId, - apiVersion: '2.14.224', + apiVersion: '2.14.233', source: { data: source.data, url: source.url, password: source.password, disableAutoFetch: source.disableAutoFetch, @@ -3360,13 +3360,13 @@ } } } -const version = '2.14.224'; +const version = '2.14.233'; exports.version = version; -const build = '2be19e828'; +const build = 'b72a44832'; exports.build = build; /***/ }), /* 5 */ /***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { @@ -12636,14 +12636,14 @@ var _svg = __w_pdfjs_require__(23); var _xfa_layer = __w_pdfjs_require__(21); -const pdfjsVersion = '2.14.224'; -const pdfjsBuild = '2be19e828'; +const pdfjsVersion = '2.14.233'; +const pdfjsBuild = 'b72a44832'; ; })(); /******/ return __webpack_exports__; /******/ })() ; }); \ No newline at end of file diff --git a/toolkit/components/pdfjs/content/build/pdf.scripting.js b/toolkit/components/pdfjs/content/build/pdf.scripting.js --- a/toolkit/components/pdfjs/content/build/pdf.scripting.js +++ b/toolkit/components/pdfjs/content/build/pdf.scripting.js @@ -4954,13 +4954,13 @@ } })); var _initialization = __w_pdfjs_require__(1); -const pdfjsVersion = '2.14.224'; -const pdfjsBuild = '2be19e828'; +const pdfjsVersion = '2.14.233'; +const pdfjsBuild = 'b72a44832'; })(); /******/ return __webpack_exports__; /******/ })() ; }); \ No newline at end of file diff --git a/toolkit/components/pdfjs/content/build/pdf.worker.js b/toolkit/components/pdfjs/content/build/pdf.worker.js --- a/toolkit/components/pdfjs/content/build/pdf.worker.js +++ b/toolkit/components/pdfjs/content/build/pdf.worker.js @@ -115,11 +115,11 @@ let terminated = false; let cancelXHRs = null; const WorkerTasks = []; const verbosity = (0, _util.getVerbosityLevel)(); const apiVersion = docParams.apiVersion; - const workerVersion = '2.14.224'; + const workerVersion = '2.14.233'; if (apiVersion !== workerVersion) { throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`); } @@ -42293,11 +42293,11 @@ if (obj instanceof _name_number_tree.NameTree) { for (const [key, value] of obj.getAll()) { const dest = fetchDestination(value); if (dest) { - dests[key] = dest; + dests[(0, _util.stringToPDFString)(key)] = dest; } } } else if (obj instanceof _primitives.Dict) { obj.forEach(function (key, value) { const dest = fetchDestination(value); @@ -42720,11 +42720,11 @@ for (const [key, value] of nameTree.getAll()) { if (!xfaImages) { xfaImages = new _primitives.Dict(this.xref); } - xfaImages.set(key, value); + xfaImages.set((0, _util.stringToPDFString)(key), value); } } return (0, _util.shadow)(this, "xfaImages", xfaImages); } @@ -42760,11 +42760,11 @@ if (obj instanceof _primitives.Dict && obj.has("JavaScript")) { const nameTree = new _name_number_tree.NameTree(obj.getRaw("JavaScript"), this.xref); for (const [key, value] of nameTree.getAll()) { - appendIfJavaScriptDict(key, value); + appendIfJavaScriptDict((0, _util.stringToPDFString)(key), value); } } const openAction = this._catDict.get("OpenAction"); @@ -43411,13 +43411,15 @@ } if (obj.has("Kids")) { const kids = obj.get("Kids"); - for (let i = 0, ii = kids.length; i < ii; i++) { - const kid = kids[i]; - + if (!Array.isArray(kids)) { + continue; + } + + for (const kid of kids) { if (processed.has(kid)) { throw new _util.FormatError(`Duplicate entry in "${this._type}" tree.`); } queue.push(kid); @@ -43474,11 +43476,11 @@ if (key < xref.fetchIfRef(limits[0])) { r = m - 1; } else if (key > xref.fetchIfRef(limits[1])) { l = m + 1; } else { - kidsOrEntries = xref.fetchIfRef(kids[m]); + kidsOrEntries = kid; break; } } if (l > r) { @@ -62405,13 +62407,13 @@ } })); var _worker = __w_pdfjs_require__(1); -const pdfjsVersion = '2.14.224'; -const pdfjsBuild = '2be19e828'; +const pdfjsVersion = '2.14.233'; +const pdfjsBuild = 'b72a44832'; })(); /******/ return __webpack_exports__; /******/ })() ; }); \ No newline at end of file diff --git a/toolkit/components/pdfjs/content/web/viewer.html b/toolkit/components/pdfjs/content/web/viewer.html --- a/toolkit/components/pdfjs/content/web/viewer.html +++ b/toolkit/components/pdfjs/content/web/viewer.html @@ -122,13 +122,10 @@
- @@ -234,13 +231,10 @@
- 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 @@ -834,11 +834,10 @@ --toolbarButton-pageDown-icon: url(images/toolbarButton-pageDown.svg); --toolbarButton-zoomOut-icon: url(images/toolbarButton-zoomOut.svg); --toolbarButton-zoomIn-icon: url(images/toolbarButton-zoomIn.svg); --toolbarButton-presentationMode-icon: url(images/toolbarButton-presentationMode.svg); --toolbarButton-print-icon: url(images/toolbarButton-print.svg); - --toolbarButton-openFile-icon: url(images/toolbarButton-openFile.svg); --toolbarButton-download-icon: url(images/toolbarButton-download.svg); --toolbarButton-bookmark-icon: url(images/toolbarButton-bookmark.svg); --toolbarButton-viewThumbnail-icon: url(images/toolbarButton-viewThumbnail.svg); --toolbarButton-viewOutline-icon: url(images/toolbarButton-viewOutline.svg); --toolbarButton-viewAttachments-icon: url(images/toolbarButton-viewAttachments.svg); @@ -1378,15 +1377,12 @@ opacity: 0.5; } .splitToolbarButton > .toolbarButton:hover, .splitToolbarButton > .toolbarButton:focus-visible, -.dropdownToolbarButton:hover, -.toolbarButton.textButton:hover, -.toolbarButton.textButton:focus-visible { +.dropdownToolbarButton:hover { background-color: var(--button-hover-color); - z-index: 199; } .splitToolbarButton > .toolbarButton { position: relative; margin: 0; } @@ -1394,16 +1390,14 @@ margin-inline-end: 2px; } .splitToolbarButtonSeparator { float: inline-start; - padding: 10px 0; + margin: 4px 0; width: 1px; + height: 20px; background-color: var(--separator-color); - z-index: 99; - display: inline-block; - margin: 4px 0; } .toolbarButton, .dropdownToolbarButton, .secondaryToolbarButton, @@ -1574,15 +1568,10 @@ .toolbarButton.print::before, .secondaryToolbarButton.print::before { mask-image: var(--toolbarButton-print-icon); } -.toolbarButton.openFile::before, -.secondaryToolbarButton.openFile::before { - mask-image: var(--toolbarButton-openFile-icon); -} - .toolbarButton.download::before, .secondaryToolbarButton.download::before { mask-image: var(--toolbarButton-download-icon); } @@ -1714,22 +1703,21 @@ mask-image: var(--secondaryToolbarButton-documentProperties-icon); } .verticalToolbarSeparator { display: block; - padding: 11px 0; margin: 5px 2px; width: 1px; + height: 22px; background-color: var(--separator-color); } - .horizontalToolbarSeparator { display: block; - margin: 6px 0 5px; + margin: 6px 0; height: 1px; width: 100%; - border-top: 1px solid var(--doorhanger-separator-color); + background-color: var(--doorhanger-separator-color); } .toolbarField { padding: 4px 7px; margin: 3px 0; diff --git a/toolkit/components/pdfjs/content/web/viewer.js b/toolkit/components/pdfjs/content/web/viewer.js --- a/toolkit/components/pdfjs/content/web/viewer.js +++ b/toolkit/components/pdfjs/content/web/viewer.js @@ -2113,12 +2113,10 @@ appConfig, eventBus } = PDFViewerApplication; let file; file = window.location.href; - appConfig.toolbar.openFile.hidden = true; - appConfig.secondaryToolbar.openFileButton.hidden = true; if (!PDFViewerApplication.supportsDocumentFonts) { _app_options.AppOptions.set("disableFontFace", true); PDFViewerApplication.l10n.get("web_fonts_disabled").then(msg => { @@ -9681,11 +9679,11 @@ constructor(options) { if (this.constructor === BaseViewer) { throw new Error("Cannot initialize BaseViewer."); } - const viewerVersion = '2.14.224'; + const viewerVersion = '2.14.233'; if (_pdfjsLib.version !== viewerVersion) { throw new Error(`The API version "${_pdfjsLib.version}" does not match the Viewer version "${viewerVersion}".`); } @@ -12916,14 +12914,10 @@ this.buttons = [{ element: options.presentationModeButton, eventName: "presentationmode", close: true }, { - element: options.openFileButton, - eventName: "openfile", - close: true - }, { element: options.printButton, eventName: "print", close: true }, { element: options.downloadButton, @@ -13268,13 +13262,10 @@ eventName: "zoomin" }, { element: options.zoomOut, eventName: "zoomout" }, { - element: options.openFile, - eventName: "openfile" - }, { element: options.print, eventName: "print" }, { element: options.presentationModeButton, eventName: "presentationmode" @@ -14505,12 +14496,12 @@ var _app_options = __webpack_require__(1); var _app = __webpack_require__(2); -const pdfjsVersion = '2.14.224'; -const pdfjsBuild = '2be19e828'; +const pdfjsVersion = '2.14.233'; +const pdfjsBuild = 'b72a44832'; window.PDFViewerApplication = _app.PDFViewerApplication; window.PDFViewerApplicationOptions = _app_options.AppOptions; ; { __webpack_require__(39); @@ -14536,22 +14527,22 @@ previous: document.getElementById("previous"), next: document.getElementById("next"), zoomIn: document.getElementById("zoomIn"), zoomOut: document.getElementById("zoomOut"), viewFind: document.getElementById("viewFind"), - openFile: document.getElementById("openFile"), + openFile: null, print: document.getElementById("print"), presentationModeButton: document.getElementById("presentationMode"), download: document.getElementById("download"), viewBookmark: document.getElementById("viewBookmark") }, secondaryToolbar: { toolbar: document.getElementById("secondaryToolbar"), toggleButton: document.getElementById("secondaryToolbarToggle"), toolbarButtonContainer: document.getElementById("secondaryToolbarButtonContainer"), presentationModeButton: document.getElementById("secondaryPresentationMode"), - openFileButton: document.getElementById("secondaryOpenFile"), + openFileButton: null, printButton: document.getElementById("secondaryPrint"), downloadButton: document.getElementById("secondaryDownload"), viewBookmarkButton: document.getElementById("secondaryViewBookmark"), firstPageButton: document.getElementById("firstPage"), lastPageButton: document.getElementById("lastPage"), 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: commit e18edf38db46d74f8b1d801ac20663ed4e98197a - revision: e18edf38db46d74f8b1d801ac20663ed4e98197a + release: b72a4483276d65bef32cff269eb40923c1363f2d (2022-04-27T12:32:23Z). + revision: b72a4483276d65bef32cff269eb40923c1363f2d # 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