Closed Bug 2076313 Opened 2 months ago Closed 1 month ago

Update PDF.js to new version 91041fb94d6744bc2a5bccd9aad28d617faa8195 from 2026-09-28 22:37:30

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

(Whiteboard: [3pl-filed][task_id: EfgHilyAQO--envB8RcS2A])

Attachments

(1 external file)

This update covers 4 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 | 62 +++++---------
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 55 +++++-------
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 8 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 8 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
7 files changed, 58 insertions(+), 85 deletions(-)


bdbbfbe2696c99af300901a37a80ebdbce6f1f8c by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/bdbbfbe2696c99af300901a37a80ebdbce6f1f8c
Authored: 2026-09-27 15:05:45 +0200
Committed: 2026-09-27 15:38:29 +0200

Avoid scanning identity /ToUnicode maps for font fallback (bug 2075550)

For non-embedded composite standard fonts, iterate existing toFontChar
entries when filtering against an incomplete /CIDToGIDMap. Deleting absent
entries is a no-op; retain entries outside the identity /ToUnicode range
to preserve the previous behavior.

Files Modified:

  • src/core/fonts.js

77ebaf094b17efe89ed2ae62713c5bc69f580030 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/77ebaf094b17efe89ed2ae62713c5bc69f580030
Authored: 2026-09-27 12:25:53 +0200
Committed: 2026-09-27 14:29:45 +0200

Use a Uint8Array to track missing TrueType glyphs (bug 2075570)

Replace the Set introduced in PR #21911 with one byte per glyph.
Glyph IDs are integer indices in [0, numGlyphs).
It'll help to slightly improve performance.

Files Modified:

  • src/core/fonts.js

5e18cef66758ec91d9c5c4a8bd21b58b36ecbf13 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/5e18cef66758ec91d9c5c4a8bd21b58b36ecbf13
Authored: 2026-09-26 13:41:26 +0200
Committed: 2026-09-26 13:45:12 +0200

Add a helper function for writing buffer-data in compileFontInfo

Currently we duplicate the same exact code twice when writing the systemFontInfoBuffer and cssFontInfoBuffer data.

Note: This reduces the size of the gulp mozcentral bundle by 271 bytes, which isn't a lot but still cannot hurt.

Files Modified:

  • src/core/obj_bin_transform_core.js

78348aa61a70d720a478cef5c59249137aea39ee by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/78348aa61a70d720a478cef5c59249137aea39ee
Authored: 2026-09-25 11:06:56 +0200
Committed: 2026-09-25 11:07:39 +0200

Introduce a helper to reduce duplication when reading compiled string-data from fonts

Currently the CssFontInfo, SystemFontInfo, and FontInfo classes duplicate virtually the same code when reading string-data, which seems completely unnecessary.
The SystemFontInfo.prototype.style getter can also be re-factored to use the new helper function, rather than manually reading those strings.

Note: This reduces the size of the gulp mozcentral bundle by 627 bytes, and with the upcoming worker-rendering this saving will be doubled.

Files Modified:

  • src/display/obj_bin_transform_display.js

Duplicate of this bug: 2076245

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.

Assignee: nobody → cdenizet
Pushed by cdenizet@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f0d874330af3 https://hg.mozilla.org/integration/autoland/rev/18bfbf1a355a Update PDF.js to 91041fb94d6744bc2a5bccd9aad28d617faa8195 r=pdfjs-reviewers,calixte
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
QA Whiteboard: [qa-triage-done-c160/b159]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: