Closed Bug 2099079 Opened 19 hours ago Closed 9 hours ago

Update PDF.js to new version 9e2f31c8438ce32e38c4ef686c4698778315e708 from 2026-11-29 19:49:48 UTC

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 external file)

This update covers 7 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 | 551 +++++----
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.crypto.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.editor.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.flatten.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.jbig2.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.jpeg.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 356 +++++-
toolkit/components/pdfjs/content/build/pdf.worker.openjpeg.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.postscript.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.print-appearances.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.qcms.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.rich-text.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.writer.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.xfa.mjs | 4 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 12 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 8 +-
toolkit/components/pdfjs/content/web/viewer.css | 12 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 35 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
22 files changed, 707 insertions(+), 331 deletions(-)

Commits by author:
3 calixteman <calixte.denizet@gmail.com> (all signed but unverified)
2 Calixte Denizet <calixte.denizet@gmail.com> (all unsigned)
2 Jonas Jenwald <jonas.jenwald@gmail.com> (all unsigned)


198220539a66fb4744790ef1aea699bfc3fc8215 by Jonas Jenwald <jonas.jenwald@gmail.com>

https://github.com/mozilla/pdf.js/commit/198220539a66fb4744790ef1aea699bfc3fc8215
Authored: 2026-11-29 18:30:03 +0100
Committed: 2026-11-29 19:31:02 +0100

Reset the pageNumberToDestHash Map, in the outline, when the pages are edited

Given that page-editing will change the pageNumber mapping, we cannot keep the pageNumberToDestHash Map since that may cause the currentOutlineItem functionality to highlight the wrong outline-item.

Additionally, ensure that the #getPageNumberToDestHash method will always resolve its capability since previously e.g. closing of a document could leave promises pending indefinitely.

Files Modified:

  • web/pdf_outline_viewer.js

31fefbf1138efc5b67a0e49deb9a415acbe2b548 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/31fefbf1138efc5b67a0e49deb9a415acbe2b548
Authored: 2026-11-28 21:31:31 +0100
Committed: 2026-11-29 18:57:44 +0100

Restore editor page geometry when undoing or redoing a drag

Restore the saved page dimensions, origin, and rotation when the page
layer is absent. Adjust positions for zoom-dependent drawing padding
and replay moves without clamping again.

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/draw.js
  • src/display/editor/drawers/inkdraw.js
  • src/display/editor/drawers/outline.js
  • src/display/editor/editor.js
  • src/display/editor/tools.js
  • test/integration/ink_editor_spec.mjs
  • test/unit/editor_spec.js

13488cd659e8d9dd4105b2eb53340e3b94e993b6 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/13488cd659e8d9dd4105b2eb53340e3b94e993b6
Authored: 2026-11-28 21:31:25 +0100
Committed: 2026-11-29 18:52:54 +0100

Keep editors upright when dragging between pages (bug 2088921)

Use each editor's current page rotation to convert drag deltas and
remap its position through screen coordinates when switching pages.
Update the page origin, preserve the editor's size, and compensate for
rotation changes where supported. Reject pages that are too small.

Files Modified:

  • src/display/editor/annotation_editor_layer.js
  • src/display/editor/draw.js
  • src/display/editor/drawers/inkdraw.js
  • src/display/editor/drawers/outline.js
  • src/display/editor/editor.js
  • src/display/editor/highlight.js
  • src/display/editor/tools.js
  • test/integration/ink_editor_spec.mjs
  • test/unit/editor_spec.js

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

https://github.com/mozilla/pdf.js/commit/b952a35894866a5e2194da94e006c184c9070fad
Authored: 2026-11-28 21:30:16 +0100
Committed: 2026-11-29 18:50:45 +0100

Share editor positioning and ink outline helpers

Reuse rotation and zoom helpers. Build ink SVG updates in one place
and refresh the path transform after translation.

Files Modified:

  • src/display/editor/draw.js
  • src/display/editor/drawers/inkdraw.js
  • src/display/editor/drawers/outline.js
  • src/display/editor/editor.js
  • src/display/editor/highlight.js

b4390e4220ce1dc46fadb1409ef29f1d8a3cbe62 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/b4390e4220ce1dc46fadb1409ef29f1d8a3cbe62
Authored: 2026-11-27 15:52:11 +0100
Committed: 2026-11-29 15:16:35 +0100

Add an test to check that the text layer font passes OTS

Files Added:

  • test/font/fontdriver.mjs
  • test/font/text_layer_font_spec.js

Files Deleted:

  • test/font/ttxdriver.mjs

Files Modified:

  • .github/font_tests_requirements.txt
  • .github/workflows/font_tests.yml
  • src/core/text_extraction.js
  • src/core/text_layer_font.js
  • test/font/README.md
  • test/font/fontutils.js
  • test/font/jasmine-boot.js
  • test/test.mjs

2477bb1aed45860647000e807060882d8e906d6f by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/2477bb1aed45860647000e807060882d8e906d6f
Authored: 2026-11-21 20:05:17 +0100
Committed: 2026-11-29 15:04:20 +0100

Add the kerning of the PDF glyphs to the text layer fonts

The pairs adjusted the same way are kerned in the generated font, so the
characters of a span stay at their PDF position. The highlights are painted
with a box shadow to avoid breaking the kerning.

Files Added:

  • test/pdfs/text_layer_kerning.pdf

Files Modified:

  • src/core/bidi.js
  • src/core/text_extraction.js
  • src/core/text_layer_font.js
  • src/display/text_layer.js
  • test/integration/find_spec.mjs
  • test/pdfs/.gitignore
  • test/unit/api_spec.js
  • test/unit/font_test_utils.js
  • test/unit/text_layer_font_spec.js
  • web/text_layer_builder.css

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

https://github.com/mozilla/pdf.js/commit/f03c33a0887b338c2a11dae557f0c1e6fed2f949
Authored: 2026-11-29 14:55:09 +0100
Committed: 2026-11-29 14:55:09 +0100

Fix the currentOutlineItem functionality when pages are initialized lazily

For PDFs with more than PagesCountLimit.FORCE_LAZY_PAGE_INIT pages, currently set at 5000, pages are initialized lazily to improve performance.
This causes finding/highlighting of the current outline-item to not work correctly, hence we need to fallback to the getPageIndex API-method.

Steps to reproduce:

Expected behaviour:
The last outline-item is scrolled into view and highlighted.

Actual behaviour:
The first outline-item is highlighted, when testing in master.

Files Modified:

  • web/pdf_outline_viewer.js

Assignee: nobody → update-bot
Status: NEW → ASSIGNED

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: update-bot → cdenizet
Pushed by cdenizet@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d1313403a148 https://hg.mozilla.org/integration/autoland/rev/dd6fd66d3b4c Update PDF.js to 9e2f31c8438ce32e38c4ef686c4698778315e708 r=pdfjs-reviewers,calixte
Status: ASSIGNED → RESOLVED
Closed: 9 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: