Update PDF.js to new version 22f5df1269b3ac950f80dd9fc25523ab4836c124 from 2026-10-29 15:48:41 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: F-y5dao7QE24uwK5w6flkQ])
This update covers 16 commits, including 3 new upstream commits I've never filed a bug on before. (They're the top 3.). 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 | 473 +-
toolkit/components/pdfjs/content/build/pdf.renderer.mjs | 47 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 1991 ++++++------
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 3 +
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 12 +-
toolkit/components/pdfjs/content/web/viewer.css | 30 +
toolkit/components/pdfjs/content/web/viewer.mjs | 12 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
10 files changed, 1330 insertions(+), 1248 deletions(-)
d7e358bd3cebd98b05b68e433a407ea942f41a38 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/d7e358bd3cebd98b05b68e433a407ea942f41a38
Authored: 2026-10-29 14:00:46 +0100
Committed: 2026-10-29 15:37:55 +0100
Decode small Flate streams through asyncGetBytes (bug 2086217)
Keep small Flate streams marked async and return their JS-decoded bytes so
callers wrap them in plain Streams.
For small image streams, prefer native decoding when the expected output
exceeds 16 KiB. Preserve repeated reads when requested lengths change.
Files Modified:
- src/core/flate_stream.js
- test/unit/stream_spec.js
437bce69223df51c842484c3c0db9937bd363d19 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/437bce69223df51c842484c3c0db9937bd363d19
Authored: 2026-10-29 13:25:40 +0100
Committed: 2026-10-29 13:41:05 +0100
Prevent errors when extracting textContent with zero initial font size (issue 22381)
Files Added:
- test/pdfs/issue22381.pdf
Files Modified:
- src/core/evaluator.js
- test/pdfs/.gitignore
- test/unit/api_spec.js
a2a5f6a8eb576446ff58fb7f72690aedc711aea0 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/a2a5f6a8eb576446ff58fb7f72690aedc711aea0
Authored: 2026-10-29 13:02:32 +0100
Committed: 2026-10-29 13:02:32 +0100
Pause translation when changing scroll/spread modes in the viewer
This is similar to e.g. PRs 17177 and 17192, and it should be slightly more efficient especially in long documents.
Files Modified:
- web/pdf_viewer.js
3c0b42974121c43e88ef4edef5ec57bedac3289a by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/3c0b42974121c43e88ef4edef5ec57bedac3289a
Authored: 2026-10-28 20:17:30 +0100
Committed: 2026-10-28 20:22:44 +0100
Reduce duplication in the PostScript Lexer.prototype.next method
The "." case can be combined with the "+" and "-" cases, thus reducing the code size a tiny bit.
Files Modified:
- src/core/postscript/lexer.js
2d4949c1e7c912b3de286e009bc7c6cd742d63a3 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/2d4949c1e7c912b3de286e009bc7c6cd742d63a3
Authored: 2026-10-28 18:17:44 +0100
Committed: 2026-10-28 18:26:15 +0100
Advance the position in the PostScript Lexer on invalid operators/numbers (bug 2086012)
Without this parsing hangs and the document never renders, since the same character will be re-parsed indefinitely.
Files Added:
- test/pdfs/bug2086012.pdf
Files Modified:
- src/core/postscript/lexer.js
- test/pdfs/.gitignore
- test/test_manifest.json
- test/unit/postscript_spec.js
8fd32bf481bc1e9a360bd8ccdde312ac290be871 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/8fd32bf481bc1e9a360bd8ccdde312ac290be871
Authored: 2026-10-28 10:19:56 +0100
Committed: 2026-10-28 10:31:33 +0100
Fix the vertical offset of text selections in Firefox
Display the SVG as a block so baseline space does not stretch the selection clip in Firefox.
Files Modified:
- web/pdf_viewer.css
7b02e20c9765cf6848bd0038ff0932f6833fb122 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/7b02e20c9765cf6848bd0038ff0932f6833fb122
Authored: 2026-10-28 09:41:43 +0100
Committed: 2026-10-28 10:31:08 +0100
Don't wait for WebGPU during document loading (bug 2086057)
Start WebGPU initialization without blocking GetDocRequest. For main-thread
rendering, wait only after receiving a mesh pattern.
Remove the unused worker-side hasGPU flag.
Files Modified:
- src/core/evaluator.js
- src/core/pattern.js
- src/core/pdf_manager.js
- src/display/api.js
4446c1cbd53fb53e4739d7699b57b3fd61e50b75 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/4446c1cbd53fb53e4739d7699b57b3fd61e50b75
Authored: 2026-10-27 17:12:49 +0100
Committed: 2026-10-27 19:13:05 +0100
Only wait for WebGPU after receiving mesh patterns (bug 2086057)
Avoid blocking graphics initialization on WebGPU. Wait before executing
operators once a mesh pattern has arrived, including Type 3 patterns.
Files Modified:
- src/display/renderer_worker.js
0cf78e64db871b595eaaf231581a7a6fa414e29f by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/0cf78e64db871b595eaaf231581a7a6fa414e29f
Authored: 2026-10-26 22:33:13 +0100
Committed: 2026-10-27 18:24:06 +0100
Avoid an infinite loop when parsing a truncated format 1 CFF charset
Files Modified:
- src/core/cff_parser.js
- test/unit/cff_parser_spec.js
ac0bdfd8927137b414239e86da8e244f73cb4354 by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/ac0bdfd8927137b414239e86da8e244f73cb4354
Authored: 2026-10-27 17:28:44 +0100
Committed: 2026-10-27 17:57:22 +0100
Hide Nova toolbar items at wider breakpoints (bug 2084084)
Increase Nova's breakpoints from 750/690/560px to 880/800/700px
to accommodate its larger toolbar buttons.
Files Modified:
- web/viewer.css
f7ad02d046313deaf7af46c1a02f9d43d955b48c by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/f7ad02d046313deaf7af46c1a02f9d43d955b48c
Authored: 2026-10-27 12:16:38 +0000
Committed: 2026-10-27 12:16:38 +0000
Bump github/codeql-action/autobuild from 4.38.3 to 4.39.0
Bumps github/codeql-action/autobuild from 4.38.3 to 4.39.0.
updated-dependencies:
- dependency-name: github/codeql-action/autobuild
dependency-version: 4.39.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/codeql.yml
8de1a6f6851664706deae514d2df843c12abdea3 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/8de1a6f6851664706deae514d2df843c12abdea3
Authored: 2026-10-27 12:15:28 +0000
Committed: 2026-10-27 12:15:28 +0000
Bump github/codeql-action/analyze from 4.38.3 to 4.39.0
Bumps github/codeql-action/analyze from 4.38.3 to 4.39.0.
updated-dependencies:
- dependency-name: github/codeql-action/analyze
dependency-version: 4.39.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/codeql.yml
fc5f35cc2a8743ce4e19648aacba47f5e4c62f0b by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
https://github.com/mozilla/pdf.js/commit/fc5f35cc2a8743ce4e19648aacba47f5e4c62f0b
Authored: 2026-10-27 12:14:07 +0000
Committed: 2026-10-27 12:14:07 +0000
Bump github/codeql-action/init from 4.38.3 to 4.39.0
Bumps github/codeql-action/init from 4.38.3 to 4.39.0.
updated-dependencies:
- dependency-name: github/codeql-action/init
dependency-version: 4.39.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Files Modified:
- .github/workflows/codeql.yml
7b0a38d2a2871a5709b0153bcd22f7d69d62651c by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/7b0a38d2a2871a5709b0153bcd22f7d69d62651c
Authored: 2026-10-27 11:39:22 +0100
Committed: 2026-10-27 11:59:01 +0100
Only set the Glyph.prototype.originalCharCode property when debugging
This property was added in PR 13494 specifically for the debugger, however it wasn't actually used anywhere else.
More recently PR 20334 started using that property in getTextContent, however it's not clear to me that doing so was necessarily correct. First of all, note that Glyph instances already contain an isSpace property. Secondly, and more importantly, using the "raw" charCode may be wrong in composite fonts with multi-byte strings.
Note how the isSpace property is determined in the PDF.js code:
https://github.com/mozilla/pdf.js/blob/8e62d2475645a9a625b3e98964fc241d3f9c144f/src/core/fonts.js#L3721-L3732
which is based on the following specification text:
Word spacing shall be applied to every occurrence of the single-byte character code 32 in a string when using
a simple font or a composite font that defines code 32 as a single-byte code. It shall not apply to occurrences of
the byte value 32 in multiple-byte codes.
Files Modified:
- src/core/evaluator.js
- src/core/fonts.js
17b85dbbdfcf063505cb99d3a7a78fdf52c8461f by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/17b85dbbdfcf063505cb99d3a7a78fdf52c8461f
Authored: 2026-10-26 22:20:10 +0100
Committed: 2026-10-26 22:23:55 +0100
Shorten the calculationOrderIds getter a little bit
Avoid using two separate return shadow(...) lines, and shorten a variable name.
Files Modified:
- src/core/document.js
9eb1b54fe17412b82fe052782a4b46297d889458 by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/9eb1b54fe17412b82fe052782a4b46297d889458
Authored: 2026-10-26 22:04:14 +0100
Committed: 2026-10-26 22:18:38 +0100
Align tiling patterns on rotated fallback glyphs
Compensate for glyph rotation even when no width scaling is needed.
Files Added:
- test/pdfs/pattern_text_rotated_fallback_glyphs.pdf
Files Modified:
- src/display/canvas.js
- test/pdfs/.gitignore
- test/test_manifest.json
| Reporter | ||
Comment 2•23 days ago
|
||
| F-y5dao7QE24uwK5w6flkQ | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=8bdcf020898cbc55840b99721be0e4ae1e58848e
| Reporter | ||
Comment 3•23 days ago
|
||
| F-y5dao7QE24uwK5w6flkQ | ||
Updatebot encountered an error while trying to submit to phabricator.
Updatebot will be unable to do anything more for this library version.
Updated•23 days ago
|
Updated•23 days ago
|
| Reporter | ||
Comment 5•23 days ago
|
||
| PiQM2ZdKQz-BXy_XM-N5vQ | ||
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
•