Closed Bug 2086866 Opened 24 days ago Closed 23 days ago

Update PDF.js to new version 87b369cd9d4cfe415b587b26a8d81f486db02874 from 2026-10-28 22:00:56 UTC

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 2087223
Tracking Status
firefox161 --- affected

People

(Reporter: update-bot, Unassigned)

References

(Blocks 1 open bug)

Details

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

This update covers 13 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 | 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 | 1972 ++++++------
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 3 +
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 8 +-
toolkit/components/pdfjs/content/web/viewer.css | 30 +
toolkit/components/pdfjs/content/web/viewer.mjs | 8 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
10 files changed, 1309 insertions(+), 1242 deletions(-)


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:

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

Duplicate of this bug: 2086572

Updatebot encountered an error while trying to submit to phabricator.
Updatebot will be unable to do anything more for this library version.

Flags: needinfo?(cdenizet)

:tjr, for all the recent updates, the bot failed to submit on phab. I thought it was because of the phab migration from last week but it seems it isn't.

Flags: needinfo?(cdenizet) → needinfo?(tom)

Sorry I missed bug 2086874.

Flags: needinfo?(tom)

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).

Status: NEW → RESOLVED
Closed: 23 days ago
Duplicate of bug: 2087223
Resolution: --- → DUPLICATE
No longer blocks: 2086057
No longer blocks: 2084084, 2086012
You need to log in before you can comment on or make changes to this bug.