Update PDF.js to new version e2a5e1d34517b7e544f234d54eec3aa37df0b846 from 2026-10-24 20:05:33 UTC
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | affected |
People
(Reporter: update-bot, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: bH3wjJFXTzCgLhoNKvfagw])
This update covers 17 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/content/PdfJsVersion.sys.mjs | 2 +-
toolkit/components/pdfjs/content/build/pdf.mjs | 553 ++++++++-----
toolkit/components/pdfjs/content/build/pdf.renderer.mjs | 6 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 224 ++++-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 25 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 25 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 557 insertions(+), 286 deletions(-)
003311751a5a5ae8810b6ea15c57e83fd043c51b by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/003311751a5a5ae8810b6ea15c57e83fd043c51b
Authored: 2026-10-22 19:26:24 +0200
Committed: 2026-10-24 22:04:52 +0200
[Editor] End ink curves at the last accepted point
Append a final Bézier segment ending at the last accepted point.
Do the same when rebuilding curves from annotation points.
Files Modified:
- src/display/editor/drawers/inkdraw.js
- test/unit/editor_spec.js
8cf2aacb2987bac253aeaf54dda00dc149b3410c by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/8cf2aacb2987bac253aeaf54dda00dc149b3410c
Authored: 2026-10-24 20:17:49 +0200
Committed: 2026-10-24 20:17:49 +0200
Fix vulnerabilities in dependency versions
This patch is generated automatically using npm audit fix, and brings
the number of reported vulnerabilities to zero.
Files Modified:
- package-lock.json
a6a4d03beecdef1af6248188d74545cfaffd6d8e by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/a6a4d03beecdef1af6248188d74545cfaffd6d8e
Authored: 2026-10-24 20:04:36 +0200
Committed: 2026-10-24 20:17:28 +0200
Update dependencies to the most recent versions
Files Modified:
- gulpfile.mjs
- package-lock.json
- package.json
- test/benchmarks/vitest.config.mjs
f913cc0141d5a04c135c69e95740562c6c363da1 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/f913cc0141d5a04c135c69e95740562c6c363da1
Authored: 2026-10-24 18:50:45 +0200
Committed: 2026-10-24 18:50:45 +0200
Update getTextContent to use getReader instead
Given that PR 22276 just replaced a for await loop, since a while loop over getReader invocations is apparently faster, let's do the same thing in the getTextContent method.
Files Modified:
- src/display/api.js
aa6ebe3b7d766bc5b037fae5add97aae4204bb98 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/aa6ebe3b7d766bc5b037fae5add97aae4204bb98
Authored: 2026-10-18 18:33:47 +0200
Committed: 2026-10-24 18:44:54 +0200
Upgrade Vitest to version 5
We only use Vitest for benchmarking, and in this major version the
benchmarking API got rewritten [1] which requires changes on our end.
This means that bench is no longer a top-level import, that under
water created a test on its own, but it's now a fixture inside regular
test() scopes.
For us this would mean quite a bit of additional boilerplate because
we'd have to wrap every existing benchmark into a separate test()
scope [2]. To keep the individual benchmarks small and expressive this
commit introduces a helper wrapper function that takes care of this,
basically mirroring the behavior of Vitest 4.
[1] https://vitest.dev/blog/vitest-5#benchmarking-rewrite
[2] https://vitest.dev/guide/migration/#benchmarking-api-rewrite
Files Modified:
- package-lock.json
- package.json
- test/benchmarks/api.bench.js
- test/benchmarks/autolinker.bench.js
- test/benchmarks/bench_utils.js
- test/benchmarks/core.bench.js
- test/benchmarks/crypto.bench.js
- test/benchmarks/editor.bench.js
- test/benchmarks/evaluator.bench.js
- test/benchmarks/fonts.bench.js
- test/benchmarks/functions.bench.js
- test/benchmarks/images.bench.js
- test/benchmarks/parser.bench.js
- test/benchmarks/render.bench.js
- test/benchmarks/streams.bench.js
- test/benchmarks/wasm.bench.js
- test/benchmarks/xml.bench.js
860ba837909b12bcdc9e6f80d49e4fef2303f20e by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/860ba837909b12bcdc9e6f80d49e4fef2303f20e
Authored: 2026-10-18 19:50:43 +0200
Committed: 2026-10-24 17:27:37 +0200
Apply annotation changes when extracting pages
Skip deleted annotations and popups. Update edited annotations in place.
Files Modified:
- src/core/editor/pdf_editor.js
- test/unit/api_spec.js
0e3a0002bd7b0e27bfcd67a0af801a11106c6dd0 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/0e3a0002bd7b0e27bfcd67a0af801a11106c6dd0
Authored: 2026-10-04 15:59:32 +0200
Committed: 2026-10-24 16:49:45 +0200
Introduce more find bar integration tests
This commit brings code coverage for the web/pdf_find_bar.js file to
100% by covering all missing cases, which include:
- searching with no results;
- searching with multiple results;
- highlighting all search results using keyboard navigation;
- closing the find bar via the toolbar button and the Escape key.
Files Modified:
- test/integration/find_spec.mjs
- test/integration/test_utils.mjs
45e5783c2159351afc32b6485fada07d5db8e7f5 by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/45e5783c2159351afc32b6485fada07d5db8e7f5
Authored: 2026-10-04 15:37:45 +0200
Committed: 2026-10-24 16:49:45 +0200
Reword the names of the find bar integration tests
This makes the test names more consistent to improve clarity on what the
tests aim to check, and avoids using duplicate test names to make
discovery of e.g. failed tests easier in the logs.
Files Modified:
- test/integration/find_spec.mjs
6019d28a40bba9b2f55ba4a60c24fca1b5419baa by Tim van der Meij <info@timvandermeij.nl>
https://github.com/mozilla/pdf.js/commit/6019d28a40bba9b2f55ba4a60c24fca1b5419baa
Authored: 2026-10-04 14:47:32 +0200
Committed: 2026-10-24 16:49:34 +0200
Extract the search logic to a helper function in the find bar integration tests
This refactoring makes the existing tests more compact/expressive, and
makes it easier to add more find bar tests in a next commit without
having to duplicate this logic more often.
Files Modified:
- test/integration/find_spec.mjs
16185b478a66102281557c7a8a2b311e48c72721 by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/16185b478a66102281557c7a8a2b311e48c72721
Authored: 2026-10-24 14:44:30 +0200
Committed: 2026-10-24 15:48:22 +0200
Remove extra operands from CFF stack-clearing operators
The fonts in issue10175 repeat width operands before later rmoveto
operators. FreeType ignores them, but OTS rejects the fonts.
Remove extra literal operands from glyph charstrings. Preserve shared
subroutines, where the same operand may be a valid width in another glyph.
Fixes #10175.
Files Added:
- test/pdfs/issue10175.pdf
Files Modified:
- src/core/cff_parser.js
- test/pdfs/.gitignore
- test/test_manifest.json
- test/unit/cff_parser_spec.js
fd42c3960fdc8462bd3bee797fc526c1613e4f50 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/fd42c3960fdc8462bd3bee797fc526c1613e4f50
Authored: 2026-10-24 14:13:29 +0200
Committed: 2026-10-24 14:20:22 +0200
Avoid re-parsing inferred links when rotating/zooming the document
Given that an AnnotationLayerBuilder instance can only have inferred links inserted once, and that we normally keep the annotationLayer when rotating/zooming the document, avoid unnecessarily invoking Autolinker.processLinks when its result will be ignored.
Files Modified:
- web/annotation_layer_builder.js
- web/pdf_page_view.js
2cacfdbf8a07fb0e75342bd5b47d3f037b886eea by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/2cacfdbf8a07fb0e75342bd5b47d3f037b886eea
Authored: 2026-10-23 19:11:22 +0200
Committed: 2026-10-24 14:08:16 +0200
Reuse shared CFF Private DICTs and Subrs
Reject fonts when accumulated private data exceeds the font length.
Files Modified:
- src/core/cff_parser.js
- test/unit/cff_parser_spec.js
29825499478c4f8cfa01b6fa6636c1e4d8b5b6b7 by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/29825499478c4f8cfa01b6fa6636c1e4d8b5b6b7
Authored: 2026-10-23 22:31:31 +0200
Committed: 2026-10-24 13:54:02 +0200
Render glyph 0 in full CFF fonts
With 65535 glyphs, CFF cannot append a copy of glyph 0. The old mapping
used the last glyph instead.
Reuse an empty slot and copy glyph 0's outline, width and FDSelect entry.
Keep the replaced glyph's original characters unmapped.
It fixes #5377.
Files Added:
- test/pdfs/issue5377.pdf
Files Modified:
- src/core/cff_font.js
- src/core/cff_parser.js
- src/core/fonts.js
- test/pdfs/.gitignore
- test/test_manifest.json
- test/unit/cff_parser_spec.js
842fc67ab614ae1e9d618d0b5060c3d674e4a121 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/842fc67ab614ae1e9d618d0b5060c3d674e4a121
Authored: 2026-10-24 12:20:23 +0200
Committed: 2026-10-24 12:55:48 +0200
Skip unnecessary parsing in Autolinker.processLinks
If there is no text content on the page there's nothing to parse and we can return immediately. This can happen e.g. if the page is completely empty, or if it only contains images and/or path rendering operators.
Furthermore, if there are no inferred links found we can also avoid a pointless TextHighlighter.prototype._convertMatches call and the creation of an unused Range instance.
Finally, avoid pointless checking in AnnotationLayerBuilder.prototype.injectLinkAnnotations when there are no inferred links.
Files Modified:
- web/annotation_layer_builder.js
- web/autolinker.js
f0a22daa27084b0fae6195e86db89c1d15113a1e by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/f0a22daa27084b0fae6195e86db89c1d15113a1e
Authored: 2026-10-23 21:05:09 +0200
Committed: 2026-10-23 21:05:09 +0200
Use fixed V8 hash and random seeds in the benchmarks
The walltime results vary between runs of the same code by up to ~10% for
some benchmarks, while being stable within a run. Fixing the seeds roughly
halved the number of benchmarks differing by more than 5% between runs.
Files Modified:
- test/benchmarks/vitest.config.mjs
09b34d498c44f5d784107b54fe28d1db07b280d8 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/09b34d498c44f5d784107b54fe28d1db07b280d8
Authored: 2026-10-22 19:21:22 +0200
Committed: 2026-10-22 21:40:59 +0200
[Editor] Append curves to the stored ink path
Preview the first two points until a curve can be appended. Share SVG
serialization with outlines and undo so a remaining two- or three-point
stroke no longer overwrites the preceding stroke.
Files Modified:
- src/display/editor/drawers/inkdraw.js
- test/integration/ink_editor_spec.mjs
- test/unit/editor_spec.js
4b1f17d4994f44e4c602196514bb4fe2a813e722 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/4b1f17d4994f44e4c602196514bb4fe2a813e722
Authored: 2026-10-22 11:05:33 +0200
Committed: 2026-10-22 21:40:59 +0200
[Editor] Smooth ink input over a sliding time window
Average linearly interpolated positions over a centered 20 ms window,
narrowed near stroke endpoints. Upsample sparse input and preview pending
points up to the pointer.
Use input points for cancellation, discard obsolete samples and reuse
point buffers. Compare coalesced input using recorded positions and timing.
Based on Google Ink's SlidingWindowInputModeler.
Files Added:
- src/display/editor/drawers/input_smoother.js
Files Modified:
- src/display/editor/draw.js
- src/display/editor/drawers/inkdraw.js
- src/display/editor/drawers/outline.js
- src/display/editor/ink.js
- test/integration/ink_editor_spec.mjs
- test/unit/editor_spec.js
| Reporter | ||
Comment 2•1 month ago
|
||
| bH3wjJFXTzCgLhoNKvfagw | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=ae18fa0105728b90cab4ee2f1949e9e025e339e6
| Reporter | ||
Comment 3•1 month ago
|
||
| bH3wjJFXTzCgLhoNKvfagw | ||
Updatebot encountered an error while trying to submit to phabricator.
Updatebot will be unable to do anything more for this library version.
Updated•1 month ago
|
| Reporter | ||
Comment 4•1 month ago
|
||
| An3M6gClRrKmUc7XmySI_w | ||
This bug is being closed because a newer revision of the library is available.
This bug will be marked as a duplicate of it (because although this bug is older, it is superseded by the newer one).
Description
•