Update PDF.js to new version 5d143c409514675aa0fc9ee2a18346cfebafd770 from 2026-10-21 12:31:58 UTC
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: BvOjfCEKRPmhCi4kS5K2aA])
Attachments
(1 external file)
This update covers 7 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 | 38 +++-
toolkit/components/pdfjs/content/build/pdf.renderer.mjs | 30 +++-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 113 +++++--------
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 8 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 8 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 115 insertions(+), 92 deletions(-)
c725c6e8399af4f73e7f4cf8b680ef47558edaf0 by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/c725c6e8399af4f73e7f4cf8b680ef47558edaf0
Authored: 2026-10-19 22:28:56 +0200
Committed: 2026-10-21 14:10:25 +0200
Bound format 12 cmap expansion
Malformed cmap groups can expand into billions of mappings; oversized
group counts can keep the parser reading past EOF.
Bound group counts by the declared length and remaining stream bytes.
Restrict ranges to valid glyph IDs and Unicode code points, and stop
reading groups after the mapping count exceeds 0x110000.
Add tests for oversized ranges, forged lengths/counts, overlapping
groups, and valid mappings, plus a regression PDF.
Files Added:
- test/pdfs/issue_cmap12.pdf
Files Modified:
- src/core/fonts.js
- test/pdfs/.gitignore
- test/test_manifest.json
- test/unit/fonts_spec.js
e45b149ebc8ef13b266af9b7f5a7b80a1ea4c554 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/e45b149ebc8ef13b266af9b7f5a7b80a1ea4c554
Authored: 2026-10-21 13:26:03 +0200
Committed: 2026-10-21 14:07:31 +0200
Start directly drawn tiling pattern cells from the initial graphics state
Files Added:
- test/pdfs/tiling_pattern_cell_state.pdf
Files Modified:
- src/display/canvas.js
- src/display/pattern_helper.js
- test/pdfs/.gitignore
- test/test_manifest.json
b29e70ed98792e277298d7db3afafe99357649b4 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/b29e70ed98792e277298d7db3afafe99357649b4
Authored: 2026-10-21 13:21:32 +0200
Committed: 2026-10-21 13:21:37 +0200
Reset the alpha of colored Type3 glyphs in the glyph's graphics state
Files Added:
- test/pdfs/type3_d0_alpha.pdf
Files Modified:
- src/display/canvas.js
- test/pdfs/.gitignore
- test/test_manifest.json
819faeebe3e1e52f02e9107c67d543161d808c50 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/819faeebe3e1e52f02e9107c67d543161d808c50
Authored: 2026-10-21 11:47:02 +0200
Committed: 2026-10-21 11:59:00 +0200
Move more functionality into the Parser.prototype.inlineStreamSkipEI method
The code at the end of the findDCTDecodeInlineStreamEnd, findASCII85DecodeInlineStreamEnd, and findASCIIHexDecodeInlineStreamEnd methods is, with the exception of the warm-messages, completely identical.
Hence, to remove unnecessary duplication, we move that into the inlineStreamSkipEI method instead.
Files Modified:
- src/core/parser.js
- test/unit/parser_spec.js
1b4a92532ad397dc5c436fc1fd167cf206c25b01 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/1b4a92532ad397dc5c436fc1fd167cf206c25b01
Authored: 2026-10-20 18:02:24 +0200
Committed: 2026-10-20 18:07:01 +0200
Simplify the Parser.prototype.findASCII85DecodeInlineStreamEnd method
Since Ascii85Stream stops reading immediately upon encountering TILDE, we can do the same thing when parsing inline /ASCII85Decode images since that simplifies the code.
Files Modified:
- src/core/parser.js
cffc31692392977e40aeff5ad92141026fba9103 by Nicolò Ribaudo <nribaudo@igalia.com>
https://github.com/mozilla/pdf.js/commit/cffc31692392977e40aeff5ad92141026fba9103
Authored: 2026-10-20 16:14:40 +0200
Committed: 2026-10-20 16:14:40 +0200
Deflate small streams synchronously
The browser native DecompressionStream is faster per kB than our JS
implementation. However, it has a larger fixed setup overhead that is
not amortized for small streams.
This patch changes our FlateStream so that if the compressed length is
below a certain threshold (1024 bytes) it will be decompressed in JS.
Files Modified:
- src/core/flate_stream.js
5a59fa908cded35a3f2f2a1ee9b6486f31934a9e by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/5a59fa908cded35a3f2f2a1ee9b6486f31934a9e
Authored: 2026-10-19 16:31:11 +0200
Committed: 2026-10-19 16:31:11 +0200
Use the toHexDigit parser-helper in the Type1Parser code
The way that hexadecimal numbers are read in the Type1Parser code seems a little inefficient, since we first convert the values to strings and then immediately convert those back to integers.
Files Modified:
- src/core/parser.js
- src/core/type1_parser.js
| Reporter | ||
Comment 2•1 month ago
|
||
| BvOjfCEKRPmhCi4kS5K2aA | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=1b27019ae81adc00e4053cadb52ae8a1249ae8c9
| Reporter | ||
Comment 3•1 month ago
|
||
| Reporter | ||
Comment 4•1 month ago
|
||
| Vm7vqEHtS3SVRInmiTNKCg | ||
All the jobs in the try run succeeded. Like literally all of them, there weren't
even any intermittents. That is pretty surprising to me, so maybe you should double
check to make sure I didn't misinterpret things and that the correct tests ran...
Anyway, I've done all I can, so I'm passing to you to review and land the patch.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.
| Reporter | ||
Comment 5•1 month ago
|
||
| Vm7vqEHtS3SVRInmiTNKCg | ||
Updatebot encountered an error while trying to set you as a reviewer in phabricator.
Updatebot will be unable to do anything more for this library version.
Comment 7•1 month ago
|
||
| bugherder | ||
| Assignee | ||
Updated•1 month ago
|
Updated•29 days ago
|
Description
•