Closed Bug 2094901 Opened 9 days ago Closed 8 days ago

Update PDF.js to new version fc0822a07ea0b2fde125dec4754ce4da4c52e956 from 2026-11-18 19:48:51 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

(Keywords: perf-alert, Whiteboard: [3pl-filed][task_id: dg0EiaDXQpiQcJKtpyPcug])

Attachments

(1 external file)

This update covers 9 commits, including 2 new upstream commits I've never filed a bug on before. (They're the top 2.). 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 | 53 ++-
toolkit/components/pdfjs/content/build/pdf.renderer.mjs | 28 +-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 264 ++++++++-----
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 27 +-
toolkit/components/pdfjs/content/web/viewer.mjs | 27 +-
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 246 insertions(+), 163 deletions(-)

Commits by author:
3 Calixte Denizet <calixte.denizet@gmail.com> (all unsigned)
3 dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (all signed but unverified)
1 Jonas Jenwald <jonas.jenwald@gmail.com> (unsigned)
1 Olivia Hall <ohall@mozilla.com> (unsigned)
1 calixteman <calixte.denizet@gmail.com> (signed but unverified)


f6f0b8dd98e94280378f3951ddf04e8e8f3d85bd by Olivia Hall <ohall@mozilla.com>

https://github.com/mozilla/pdf.js/commit/f6f0b8dd98e94280378f3951ddf04e8e8f3d85bd
Authored: 2026-11-18 10:46:50 -0500
Committed: 2026-11-18 10:46:50 -0500

Bug 2084998 - Improve the presentation of signature elements that no longer have an edit toolbar

On Android, a signature that has already been placed (its edit toolbar is
closed) isn't presented as an actionable element. Android supports fewer
roles than desktop, so in this state it makes sense to expose the signature
as a "button", which makes it clear that it can be reactivated. This patch
sets that role on Android while the signature is unselected.

Files Modified:

  • src/display/editor/signature.js
  • src/display/editor/tools.js
  • test/integration/geckoview_spec.mjs
  • test/integration/signature_editor_spec.mjs
  • web/pdf_viewer.js

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

https://github.com/mozilla/pdf.js/commit/8ee5560ab555f4ba1ff1e2d10c4464a9ecc92821
Authored: 2026-11-18 16:29:37 +0100
Committed: 2026-11-18 16:39:52 +0100

Remove isOffscreenCanvasSupported from the AppOptions

At this point in time OffscreenCanvas should be available in all supported browsers, see https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas#browser_compatibility, which means that in practice it'll only be disabled in Node.js (and during some browser/unit tests).
Hence it seems unnecessary to list this in AppOptions in the viewer, since isOffscreenCanvasSupported = false will generally lead to worse performance by e.g. forcibly disabling worker-rendering.

Files Modified:

  • web/app_options.js

4e15347578526c97bda69458b846f569a2adf822 by calixteman <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/4e15347578526c97bda69458b846f569a2adf822
Authored: 2026-11-18 14:31:52 +0100
Committed: 2026-11-18 15:42:35 +0100

Restore family names for tricky TrueType subsets

Some old CJK fonts (e.g. DFKai-SB) rely on their glyph programs to position
their components. OTS fixes the glyph bounding boxes unless the font has a
known "tricky" family name, and on macOS this moves the components, hence the
glyphs are garbled.
Subsetted fonts embedded in PDFs have often lost their original name, so
identify them, as FreeType does, either with their name or with the checksums
of their cvt, fpgm and prep tables, and restore a Macintosh family name that
OTS recognizes.

It fixes #22550.

Files Added:

  • src/core/tricky_fonts.js
  • test/pdfs/issue22550.pdf.link

Files Modified:

  • src/core/fonts.js
  • src/core/opentype_file_builder.js
  • test/test_manifest.json
  • test/unit/api_spec.js
  • test/unit/fonts_spec.js

476d8b48e4ad00b23efb55abc857fd7878d804ba by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/476d8b48e4ad00b23efb55abc857fd7878d804ba
Authored: 2026-11-18 09:48:40 +0100
Committed: 2026-11-18 13:57:09 +0100

Preserve page edges when rounding page dimensions (bug 2094402)

At fractional device pixel ratios, rounding page dimensions can clip the
right and bottom edges. Fit the full viewport into the rounded canvas
to keep it aligned with the text and annotation layers. Preserve the
canvas sizing scale across redraws.

Files Added:

Files Modified:

  • test/integration/viewer_spec.mjs
  • test/pdfs/.gitignore
  • web/pdf_page_view.js

5d658a546ac417cf846e59b297bafc5f34d0c0f8 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/5d658a546ac417cf846e59b297bafc5f34d0c0f8
Authored: 2026-11-17 16:43:41 +0100
Committed: 2026-11-17 17:27:07 +0100

Composite non-isolated blend groups with a group alpha against their backdrop

Such a group was rendered on a transparent canvas, so e.g. /ColorDodge
light rays kept their dark source color instead of brightening the
background. Copy the backdrop, as already done for soft masks, and
interpolate between it and the group result using the group alpha.

It fixes #22547.

Files Added:

  • test/pdfs/nonisolated_blend_group_alpha.pdf

Files Modified:

  • src/display/canvas.js
  • test/pdfs/.gitignore
  • test/test_manifest.json

1bce1fb494fadcb2d3b7b20b3e61ca1ae0505f65 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

https://github.com/mozilla/pdf.js/commit/1bce1fb494fadcb2d3b7b20b3e61ca1ae0505f65
Authored: 2026-11-17 12:13:07 +0000
Committed: 2026-11-17 12:13:07 +0000

Bump github/codeql-action/init from 4.39.2 to 4.39.3

Bumps github/codeql-action/init from 4.39.2 to 4.39.3.


updated-dependencies:

  • dependency-name: github/codeql-action/init
    dependency-version: 4.39.3
    dependency-type: direct:production
    update-type: version-update:semver-patch
    ...

Signed-off-by: dependabot[bot] <support@github.com>

Files Modified:

  • .github/workflows/codeql.yml

e1b7de5eb3f958df991a234591ea8318fac52c7f by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

https://github.com/mozilla/pdf.js/commit/e1b7de5eb3f958df991a234591ea8318fac52c7f
Authored: 2026-11-17 12:13:03 +0000
Committed: 2026-11-17 12:13:03 +0000

Bump github/codeql-action/analyze from 4.39.2 to 4.39.3

Bumps github/codeql-action/analyze from 4.39.2 to 4.39.3.


updated-dependencies:

  • dependency-name: github/codeql-action/analyze
    dependency-version: 4.39.3
    dependency-type: direct:production
    update-type: version-update:semver-patch
    ...

Signed-off-by: dependabot[bot] <support@github.com>

Files Modified:

  • .github/workflows/codeql.yml

12a248a55f84ddfedd06a82ad1850b7eb197d75d by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

https://github.com/mozilla/pdf.js/commit/12a248a55f84ddfedd06a82ad1850b7eb197d75d
Authored: 2026-11-17 12:12:51 +0000
Committed: 2026-11-17 12:12:51 +0000

Bump github/codeql-action/autobuild from 4.39.2 to 4.39.3

Bumps github/codeql-action/autobuild from 4.39.2 to 4.39.3.


updated-dependencies:

  • dependency-name: github/codeql-action/autobuild
    dependency-version: 4.39.3
    dependency-type: direct:production
    update-type: version-update:semver-patch
    ...

Signed-off-by: dependabot[bot] <support@github.com>

Files Modified:

  • .github/workflows/codeql.yml

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

https://github.com/mozilla/pdf.js/commit/cb1097d79777911d2229c9dbaa2a174087e6bf76
Authored: 2026-11-16 21:44:59 +0100
Committed: 2026-11-16 21:59:07 +0100

Avoid per-offset work when rebuilding the loca table (bug 2093310)

Choose the loca format from the last offset and the glyph lengths, and
write the offsets with plain byte stores. The output is unchanged, but
it removes ~0.8 ms of cold worker time per TrueType font that #22464
added, enough to flip some pdfpaint loads to the next frame.

Files Modified:

  • src/core/fonts.js

Duplicate of this bug: 2094741

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/d7e43f86ba71 https://hg.mozilla.org/integration/autoland/rev/6cf22c7fb5c4 Update PDF.js to fc0822a07ea0b2fde125dec4754ce4da4c52e956 r=pdfjs-reviewers,calixte
Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch

Perfherder has detected a talos performance change from push 6cf22c7fb5c429b50bfbac9d6c20cf9c2c2436bf.

No action is required from the author; this comment is provided for informational purposes only.

Improvement Test Platform Options Absolute values [old vs new]
18% pdfpaint_main_hwa perf_patterns_tiling_colored.pdf (doc) linux2404-64-shippable e10s fission stylo webrender 59.90 ms -> 49.09 ms
17% pdfpaint_main_sw perf_structure_content_array.pdf (doc) linux2404-64-shippable e10s fission stylo webrender 64.41 ms -> 53.56 ms
14% pdfpaint_main_hwa perf_structure_content_array.pdf (doc) linux2404-64-shippable e10s fission stylo webrender 59.26 ms -> 50.86 ms
14% pdfpaint_main_sw perf_patterns_tiling_colored.pdf (doc) linux2404-64-shippable e10s fission stylo webrender 75.14 ms -> 64.49 ms
14% pdfpaint_main_hwa perf_structure_content_array.pdf (doc) linux2404-64-shippable e10s fission stylo webrender 58.85 ms -> 50.58 ms
14% pdfpaint_main_hwa issue17981.pdf (doc) windows11-64-24h2-shippable e10s fission stylo webrender 466.19 ms -> 401.29 ms

Need Help or Information?

If you have any questions, please reach out to bacasandrei@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

Keywords: perf-alert
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: