Update PDF.js to new version 19046a6949b8c423c1b1ae3307dedb15d39a3943 from 2026-06-02 19:57:16
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | affected |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: WpukHaqCSWqWkFpGSVxnjQ])
Attachments
(1 obsolete file)
This update covers 5 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/content/build/pdf.mjs | 106 +++++++++++--
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 10 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 8 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 44 +++--
toolkit/components/pdfjs/content/web/viewer.css | 8 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 44 +++--
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 156 insertions(+), 72 deletions(-)
a8cf37f6bca6cf5014c0d945ec55397b4c775ae8 by Titus Wormer <tituswormer@gmail.com>
https://github.com/mozilla/pdf.js/commit/a8cf37f6bca6cf5014c0d945ec55397b4c775ae8
Authored: 2026-06-02 12:57:04 +0200
Committed: 2026-06-02 12:57:04 +0200
Fix broken enableSelectionRendering: false
Closes GH-21374.
Related-to GH-20981.
Files Modified:
- web/pdf_page_view.js
- web/text_layer_builder.css
69e8d6900fad8f42c2e8f9e2a4797f7cbcf86671 by calixteman <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/69e8d6900fad8f42c2e8f9e2a4797f7cbcf86671
Authored: 2026-05-31 21:16:21 +0200
Committed: 2026-05-31 21:16:29 +0200
Render gray transparency groups in grayscale
It fixes #7998.
Files Added:
- test/pdfs/issue7998.pdf.link
Files Modified:
- src/core/evaluator.js
- src/display/canvas.js
- test/test_manifest.json
add30f3ca0cc10c93c571a713154b4ce1efc8f62 by Tim van der Meij <timvandermeij@gmail.com>
https://github.com/mozilla/pdf.js/commit/add30f3ca0cc10c93c571a713154b4ce1efc8f62
Authored: 2026-05-30 16:21:33 +0200
Committed: 2026-05-31 11:36:44 +0200
Fix intermittent failure in the "must check that a freetext is still there after having updated it and scroll the doc" freetext editor integration test
The problem is that we screenshot the page itself rather than the
canvas, even though we specifically care about the latter according to
the comment, which means that we manually have to take care of hiding and
showing the annotation editor. This is problematic because even though
we signal that the annotation editor should be hidden, we don't wait
until that is actually done, which leads to a situation where we can
take the screenshot before the annotation editor is actually invisible
in the view.
This commit fixes the issue by screenshotting the canvas instead, which
avoids the need for manually hiding/showing the annotation editor. This
makes the test less fragile, and matches other tests better.
Files Modified:
- test/integration/freetext_editor_spec.mjs
ce45d5a443ce0622a27e1eeaa7f24ec7223a2ac2 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/ce45d5a443ce0622a27e1eeaa7f24ec7223a2ac2
Authored: 2026-05-27 11:06:57 +0200
Committed: 2026-05-27 11:06:57 +0200
Implement proper serialization of OptionalContentConfig
I happened to notice that the way the OptionalContentConfig-data handled in the PR that implements worker-rendering leaves a lot to be desired:
-
The way that the optional content state is handled is not correct, since that PR collects the "effective visibility" of the optional content groups rather than their actual internal state.
-
The necessary
OptionalContentConfig-data is collected piecemeal in the API, which leads to quite frankly very messy code that's hard to read and will be even harder to maintain.
The solution to all of these issues seem really simple though, just add a couple of OptionalContentConfig methods that serialize/de-serialize the necessary data.
In the API calling optionalContentConfig.serializable will get all of the needed data for transferring to the worker-renderer, and once received there calling OptionalContentConfig.fromSerializable(/* transferred data here */) will create an OptionalContentConfig instance with the correct internal state.
As part of this patch, to avoid increasing bundle-size unnecessarily, a couple of existing methods are stubbed out when the OptionalContentConfig class ends up in a worker-file (since they're unused there).
This part assumes that the new worker-renderer is built correctly, note how the existing pdf.worker.mjs is handled in https://github.com/mozilla/pdf.js/blob/03eda70d7e75267bc58ee4f446a20f7f38792b47/gulpfile.mjs#L539-L545
(Note: Submitting a PR was a lot faster than trying to provide review comments, since writing this commit message took longer than writing the patch.)
Files Modified:
- src/display/optional_content_config.js
8e6e35473fa2de9b4f826081d3c8aba98cc0f67a by Calixte Denizet <calixte.denizet@gmail.com>
https://github.com/mozilla/pdf.js/commit/8e6e35473fa2de9b4f826081d3c8aba98cc0f67a
Authored: 2026-05-26 22:09:58 +0200
Committed: 2026-05-26 22:27:35 +0200
Restore editor layer state for unchanged pages after page mutations
It fixes #21240.
Files Modified:
- test/integration/reorganize_pages_spec.mjs
- web/pdf_page_view.js
| Reporter | ||
Comment 1•6 months ago
|
||
| WpukHaqCSWqWkFpGSVxnjQ | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=abbbd43b3d69a101ee668098fdf15bd26ec3d23f
| Reporter | ||
Comment 2•6 months ago
|
||
Updated•6 months ago
|
| Reporter | ||
Comment 3•5 months ago
|
||
| Rc-2PTWXRvKtEcdFpGYnUg | ||
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 months ago
|
||
| Rc-2PTWXRvKtEcdFpGYnUg | ||
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 months ago
|
Description
•