Update PDF.js to new version b83274803cd4c6771ea59934e42f0715d4181c84 from 2026-07-19 12:11:08
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | affected |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: KAePq3bHTkizve3zKpxGGw])
Attachments
(1 obsolete file)
This update covers 8 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/content/build/pdf.mjs | 30 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 123 ++++++++-----
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 29 +--
toolkit/components/pdfjs/content/web/viewer.mjs | 29 +--
toolkit/components/pdfjs/moz.yaml | 4 +-
6 files changed, 105 insertions(+), 114 deletions(-)
344736bcad2993886cac31ad1ed0872a900b981a by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/344736bcad2993886cac31ad1ed0872a900b981a
Authored: 2026-07-18 14:03:46 +0200
Committed: 2026-07-18 14:15:24 +0200
Re-factor the bCache, used with /Mesh Shadings
- Initialize the
bCachelazily, since many/most PDF documents don't need it. - Change the
bCacheto aMap, rather than an Object, which thanks togetOrInsertComputedallows thebuildBfunction to be inlined.
Also, while unrelated here, move the this.matrix = null; definition to the BaseShadingPattern class to reduce (a tiny bit of) unnecessary duplication.
Files Modified:
- src/core/pattern.js
- src/display/pattern_helper.js
b2cf8527c6cf53051aed1da8a5f46aeed45692e2 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/b2cf8527c6cf53051aed1da8a5f46aeed45692e2
Authored: 2026-07-18 11:44:27 +0200
Committed: 2026-07-18 11:44:27 +0200
Change the CompiledFont glyph/charCode caches to use Maps
This code is old enough that it predates the general availability of Map, and these changes allow us to shorten the code a tiny bit.
Files Modified:
- src/core/font_renderer.js
47f2b2284253e20307ba062fa253b35bb28da5ed by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/47f2b2284253e20307ba062fa253b35bb28da5ed
Authored: 2026-07-17 20:55:58 +0200
Committed: 2026-07-17 21:23:08 +0200
Use Iterator methods to avoid some unnecessary Array creation
Currently there are some spots in the code-base where intermediate Arrays are unnecessarily created from Iterators, before filter and map is used to create a final Array.
Thanks to newer Iterators methods, see e.g. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iterator/filter, that can be now be avoided.
Files Modified:
- src/core/xfa/xfa_object.js
- src/display/draw_layer.js
- web/struct_tree_layer_builder.js
922d57631bbaabfed767ba64fb63ebb89d9811ea by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/922d57631bbaabfed767ba64fb63ebb89d9811ea
Authored: 2026-07-13 11:20:15 +0200
Committed: 2026-07-17 13:51:08 +0200
Rebuild missing AcroForm fields
Files Modified:
- src/core/editor/pdf_editor.js
- test/unit/api_spec.js
0f060e1e64a8eb745f32ce1f67203ccac07545ad by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/0f060e1e64a8eb745f32ce1f67203ccac07545ad
Authored: 2026-07-17 12:49:29 +0200
Committed: 2026-07-17 12:49:29 +0200
Use getOrInsertComputed in the CanvasGraphics.prototype._getPattern method
Files Modified:
- src/display/canvas.js
eb58ccc1000669ba1b994ac0906938b38eb968c9 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/eb58ccc1000669ba1b994ac0906938b38eb968c9
Authored: 2026-07-13 11:08:15 +0200
Committed: 2026-07-16 22:18:26 +0200
Handle revisioned structure attributes
Files Modified:
- src/core/editor/pdf_editor.js
- test/unit/api_spec.js
f554d0c9c89b8e4bb837f2193c767f63ea8869a0 by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/f554d0c9c89b8e4bb837f2193c767f63ea8869a0
Authored: 2026-07-16 21:04:45 +0200
Committed: 2026-07-16 21:04:45 +0200
Implement SmaskInData == 2 for JPX images
Files Added:
- test/pdfs/jpx_smaskindata.pdf
Files Modified:
- src/core/image.js
- test/pdfs/.gitignore
- test/test_manifest.json
9a7335d26bded3e11be4eb7ba98d8eb6b1b2e7dc by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/9a7335d26bded3e11be4eb7ba98d8eb6b1b2e7dc
Authored: 2026-07-16 19:00:34 +0200
Committed: 2026-07-16 20:45:01 +0200
Start using Iterator.prototype.join in the code-base
This is an upcoming JavaScript feature, which helps avoid creating intermediate Arrays in some cases; see https://github.com/tc39/proposal-iterator-join
Firefox implemented this in bug 2004803, and it was enabled by default in bug 2047995.
This patch changes two Objects to Maps, in the XFA-parsing respectively the find-implementation, to make use of the new feature.
Files Modified:
- src/core/document.js
- src/core/xfa/factory.js
- src/shared/util.js
- test/unit/xfa_tohtml_spec.js
- web/pdf_find_controller.js
| Reporter | ||
Comment 1•6 days ago
|
||
| KAePq3bHTkizve3zKpxGGw | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=e6c7d343d72efc6a2f1fbb80583664e385e70605
| Reporter | ||
Comment 2•6 days ago
|
||
| Reporter | ||
Comment 3•5 days ago
|
||
| G-tplCYATT-3nl18wphvxg | ||
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 4•5 days ago
|
||
| G-tplCYATT-3nl18wphvxg | ||
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).
Updated•5 days ago
|
Description
•