Closed Bug 2090783 Opened 18 days ago Closed 17 days ago

Update PDF.js to new version 6619bf0c6fa6f7797e6b109cb6d431b0ab1ed00d from 2026-11-08 17:29:27 UTC

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

(Whiteboard: [3pl-filed][task_id: DHYhqUi7Scmrh1pqB0BJZg])

Attachments

(1 external file)

This update covers 9 commits, including 6 new upstream commits I've never filed a bug on before. (They're the top 6.). Here are the overall diff statistics, and then the commit information.


toolkit/components/pdfjs/PdfJsDefaultPrefs.js | 1 -
toolkit/components/pdfjs/content/PdfJsVersion.sys.mjs | 2 +-
toolkit/components/pdfjs/content/build/pdf.mjs | 24 +++---
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 | 21 +-----
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 31 +-------
toolkit/components/pdfjs/content/web/viewer.mjs | 51 +++-----------
toolkit/components/pdfjs/moz.yaml | 4 +-
toolkit/locales/en-US/toolkit/pdfviewer/viewer.ftl | 3 +-
10 files changed, 44 insertions(+), 103 deletions(-)


4067701be4b4f2845df1b19d2fae62350d794514 by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/4067701be4b4f2845df1b19d2fae62350d794514
Authored: 2026-11-08 16:29:42 +0100
Committed: 2026-11-08 16:29:42 +0100

Upgrade stylelint to version 18.0.0

This is a major version bump, but the changelog at
https://github.com/stylelint/stylelint/releases/tag/18.0.0
doesn't indicate any breaking changes that should impact us.

Files Modified:

  • package-lock.json
  • package.json

2d79bbf02c667529ef79bbb30ea19cc8bff5ee52 by Tim van der Meij <info@timvandermeij.nl>

https://github.com/mozilla/pdf.js/commit/2d79bbf02c667529ef79bbb30ea19cc8bff5ee52
Authored: 2026-11-08 16:23:14 +0100
Committed: 2026-11-08 16:24:46 +0100

Update dependencies to the most recent versions

Files Modified:

  • gulpfile.mjs
  • package-lock.json
  • package.json

8a18b3d15bb12159599164ecf8a2a9d3e3951520 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/8a18b3d15bb12159599164ecf8a2a9d3e3951520
Authored: 2026-11-08 15:42:32 +0100
Committed: 2026-11-08 15:52:07 +0100

Limit all defaultRenderingQueue logic in PDFViewer to GENERIC builds

Avoid bundling dead code in the Firefox PDF Viewer, since it already can't work without a renderingQueue option provided.

Files Modified:

  • web/pdf_viewer.js

bd919672132316d217a85a2ee5177e7dad20ea40 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/bd919672132316d217a85a2ee5177e7dad20ea40
Authored: 2026-11-08 11:44:21 +0100
Committed: 2026-11-08 11:44:21 +0100

Re-factor the unit-test for issue18768_word_spaces.pdf

Currently the test-cases are "generated" within a loop, which is an unfortunate pattern since it e.g. makes the exact test-names more difficult to search for.
Hence we re-factor the unit-test to avoid that, using withContext(...) to provide more helpful failure messages. This way the unit-test should also be a tiny bit more efficient, since we only need to load the PDF document once.

Files Modified:

  • test/unit/api_spec.js

a30646be03dd37b47e39582a73b8889ead402840 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/a30646be03dd37b47e39582a73b8889ead402840
Authored: 2026-11-07 16:49:48 +0100
Committed: 2026-11-07 17:02:45 +0100

[api-major] Remove the maxImageSize option from getDocument

This option is removed now, since:

  • It was originally added for the Boot to Gecko (B2G) project, later renamed to Firefox OS, which was discontinued in 2016.
    This option was needed then, since B2G was intended to also run on low-end hardware.

  • Outside of one example, which is a left-over from the B2G viewer, this option has been unused in the PDF.js project itself for a decade.

  • This option has never been covered by any tests.

  • The result of setting this option to a non-default value is that some images will not renderer, with only a console warning, which could easily make PDF.js appear "broken" to an end-user.

  • Image decoding performance, in particular for large and/or complex images, has been significantly improved compared to a decade ago.

  • If such an option was requested today, it seems unlikely that we'd actually consider adding it.

Files Modified:

  • examples/mobile-viewer/viewer.mjs
  • src/core/evaluator.js
  • src/display/api.js
  • web/app_options.js

86216229819515f5c2736e225354008df33304b6 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/86216229819515f5c2736e225354008df33304b6
Authored: 2026-11-06 17:55:33 +0100
Committed: 2026-11-06 17:55:33 +0100

Add an aria-label to signature editor (bug 2084956)

Files Modified:

  • l10n/en-US/viewer.ftl
  • src/display/editor/signature.js

945dbf6785f925ff8aafdc6f36ac3eea19544e0b by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/945dbf6785f925ff8aafdc6f36ac3eea19544e0b
Authored: 2026-09-25 13:52:44 +0200
Committed: 2026-11-07 17:16:39 +0100

Combine the enableMerge and enableSplitMerge options/preferences (issue 21679)

This removes the separate enableMerge option/preference, since the enableSplitMerge name already suggests that it controls both aspects.

Files Modified:

  • test/integration/reorganize_pages_spec.mjs
  • web/app.js
  • web/app_options.js
  • web/pdf_thumbnail_viewer.js
  • web/views_manager.js

a2f67dad8a3b576e82c103ed4504dd08d9d376cf by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/a2f67dad8a3b576e82c103ed4504dd08d9d376cf
Authored: 2026-11-07 12:44:36 +0100
Committed: 2026-11-07 13:55:43 +0100

[api-major] Remove the maxCanvasPixels = 0 option, i.e. forced CSS-only zooming, from PDFViewer

This option is removed now, since:

  • It was originally added for the Boot to Gecko (B2G) project, later renamed to Firefox OS, which was discontinued in 2016.
    The option was needed then, since B2G was intended to also run on low-end hardware.

  • Outside of one example, which is a left-over from the B2G viewer, CSS-only zooming has not been used in the PDF.js project itself for a decade.
    (However, there are a couple of integration-tests for it though.)

  • CSS-only zooming often renders the document "useless" at higher zoom-levels, because of the blurriness.

  • Given the current implementation of CSS-only zooming it can break if the initial scale is very large, or if a page has huge dimensions, since the rendering is done without enforcing any limits.

  • Removing the option allows us to simplify the code a little bit.

Note: A much better user-experience can be had nowadays by setting the maxCanvasPixels, maxCanvasDim, and/or capCanvasAreaFactor options to fairly low values, and then via the enableDetailCanvas option (which is true by default) re-render only the currently visible viewport at high-resolution.

Files Modified:

  • examples/mobile-viewer/viewer.mjs
  • src/display/display_utils.js
  • test/integration/viewer_spec.mjs
  • web/pdf_page_view.js
  • web/pdf_thumbnail_view.js
  • web/pdf_thumbnail_viewer.js
  • web/pdf_viewer.js

3a326e3a8088f6eacd19c0a961b6f4f21e7fa812 by b84330808 <b84330808@gmail.com>

https://github.com/mozilla/pdf.js/commit/3a326e3a8088f6eacd19c0a961b6f4f21e7fa812
Authored: 2026-11-04 23:52:32 +0900
Committed: 2026-11-04 23:52:32 +0900

Fix the x 1 idiv and x -1 exp simplifications in PSStackToTree

x 1 idiv was simplified to x, so the Wasm and JS compilers returned a
non-integer x unchanged (e.g. 7.5), whereas the interpreter truncates it
(7). It's now simplified to truncate(x).

x -1 exp was rewritten as 1 x div, which gives 0 for x = 0 since a
division by zero returns 0, whereas the interpreter computes Infinity,
which is then clipped to the range. This rewrite is removed.

Files Modified:

  • src/core/postscript/ast.js
  • test/unit/postscript_spec.js

Duplicate of this bug: 2090751

All jobs completed, we found the following issues.

Known Issues:

  • test-windows11-64-25h2/debug-test-verify-path-4 - 1 of 4 failed on the same (retriggered) task (failed: Ds2YI8sEQkObVZKNkEUEQQ)

These failures may mean that the library update succeeded; you'll need to review
them yourself and decide. If there are lint failures, you will need to fix them in
a follow-up patch. (Or ignore the patch I made, and recreate it yourself with
./mach vendor toolkit/components/pdfjs/moz.yaml.)

In either event, I have done all I can, so you will need to take it from here.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.

Assignee: nobody → cdenizet
Pushed by cdenizet@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c60e471ea1f3 https://hg.mozilla.org/integration/autoland/rev/a2a2a35836f1 Update PDF.js to 6619bf0c6fa6f7797e6b109cb6d431b0ab1ed00d r=pdfjs-reviewers,calixte
Status: NEW → RESOLVED
Closed: 17 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: