Closed Bug 2005879 Opened 1 month ago Closed 29 days ago

Update PDF.js to new version ff4529d127662e1e3e63797b047324811340d1ba from 2025-12-12 16:29:33

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
148 Branch
Tracking Status
firefox148 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

This update covers 10 commits. Here are the overall diff statistics, and then the commit information.


toolkit/components/pdfjs/content/build/pdf.mjs | 65 ++-
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 65 +++-
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 257 +-------------
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 65 +--
toolkit/components/pdfjs/content/web/viewer.css | 234 +++++++-----
toolkit/components/pdfjs/content/web/viewer.mjs | 65 +--
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 297 insertions(+), 462 deletions(-)


7e0c9395fb5de976faa7d78422df395dad733c3b by Nicolò Ribaudo <nribaudo@igalia.com>

https://github.com/mozilla/pdf.js/commit/7e0c9395fb5de976faa7d78422df395dad733c3b
Authored: 2025-12-08 18:54:13 +0100
Committed: 2025-12-12 11:37:45 +0100

Simplify positioning of elements inside markedContent

By setting display: contents on .markedContent containers, they stop
affecting the layout of their children. This means that we can always
position text layer <span> elements using percentages relative to the
page dimensions, rather than having two separate code paths.

For some reason this breaks the workaround for text selection flickering
in Chrome/Safari, which can be fixed by setting user-select: text on
the .endOfContent div (only in Chrome/Safari, as it would break
selection in Firefox).

Files Modified:

  • src/display/text_layer.js
  • web/text_layer_builder.css
  • web/text_layer_builder.js

9bc4175bdeb4837b0c0965715cbd7b43f429cece by Arthur Silber <arthur.silber@sprylab.com>

https://github.com/mozilla/pdf.js/commit/9bc4175bdeb4837b0c0965715cbd7b43f429cece
Authored: 2025-12-11 17:59:17 +0100
Committed: 2025-12-12 07:07:31 +0100

Improves text rendering performance by skipping unnecessary pattern calculations

Files Modified:

  • src/display/canvas.js

eb2b7c2c8613c6f796b9b50977fb1d40e2067343 by Nicolò Ribaudo <nribaudo@igalia.com>

https://github.com/mozilla/pdf.js/commit/eb2b7c2c8613c6f796b9b50977fb1d40e2067343
Authored: 2025-12-08 15:57:07 +0100
Committed: 2025-12-09 13:12:20 +0100

Move text layer scaling logic to CSS

This commit moves all the logic to scale up&down <span>s in the text
layer, introduced in #18283, to CSS.

The motivation for this change is that #18283 is still not enough for
all cases. That PR fixed the problem in Chrome&Firefox desktop, which
allow users to set an actual minimum font size in the browser settings.
However, other browsers (e.g. the Chrome-based WebView on Android) have
more complex logic and they scale up small text rather than simply
applying a minimum.

A workaround for that behavior is probably out of scope for PDF.js
itself as it only affects not officially supported platforms. However,
having access to the actual expected font height (through
--font-height) allows embedders of PDF.js to implement a workaround by
themselves.

Files Modified:

  • src/display/text_layer.js
  • test/unit/text_layer_spec.js
  • web/text_layer_builder.css

83fa8e9df15452cc79b32f0afccfa9ae568ead7d by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/83fa8e9df15452cc79b32f0afccfa9ae568ead7d
Authored: 2025-12-08 20:33:51 +0100
Committed: 2025-12-08 20:34:00 +0100

Use only one resize observer in the the sidebar

If the max-width is 50vw, then resizing the viewport will change the sidebar width
and the callbacks need to be called in such a case.

Files Modified:

  • web/sidebar.js

3e59e7535d53e091ae54c541b88df07bb2f5a55b by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/3e59e7535d53e091ae54c541b88df07bb2f5a55b
Authored: 2025-12-08 20:05:43 +0100
Committed: 2025-12-08 20:05:43 +0100

Move the css for tree object in its own file

Files Added:

  • web/tree.css

Files Modified:

  • web/pdf_viewer.css
  • web/viewer.css

6de24bab92ddd6e3cf3c70bf1fcc4beb3028300b by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/6de24bab92ddd6e3cf3c70bf1fcc4beb3028300b
Authored: 2025-12-08 09:58:22 +0100
Committed: 2025-12-08 09:58:22 +0100

Add .vscode to .gitignore

Files Modified:

  • .gitignore

4bf759404c8be71f9867b35919d0e23d56868c59 by Calixte Denizet <calixte.denizet@gmail.com>

https://github.com/mozilla/pdf.js/commit/4bf759404c8be71f9867b35919d0e23d56868c59
Authored: 2025-12-05 18:06:00 +0100
Committed: 2025-12-08 09:44:33 +0100

Add a new linting task in order to detect unused/unknown css variables in the Firefox build

The goal is to be able to catch the errors before making a release.
And fix some css issues (especially the missing css code for the newly added menu.css)

Files Added:

  • external/stylelint/no-unused-custom-properties.mjs
  • stylelint-mozcentral.json

Files Modified:

  • .github/workflows/lint.yml
  • .stylelintrc
  • external/builder/builder.mjs
  • gulpfile.mjs
  • package-lock.json
  • package.json
  • web/menu.css
  • web/pdf_viewer.css
  • web/toggle_button.css
  • web/viewer-geckoview.css

ac8d80a8e4a66053c765bcf3cf9e0f750cc3e093 by Gaurang Bhatia <gaurang525@outlook.com>

https://github.com/mozilla/pdf.js/commit/ac8d80a8e4a66053c765bcf3cf9e0f750cc3e093
Authored: 2025-12-07 06:46:16 +0530
Committed: 2025-12-07 06:46:16 +0530

Fix infinite loop in JBIG2 decoder with >4 referred-to segments and add regression test

Files Added:

  • test/pdfs/issue20439.pdf

Files Modified:

  • src/core/jbig2.js
  • test/pdfs/.gitignore
  • test/test_manifest.json

3a85770af1bc1c62770de899cbcfa9aab6126cb7 by Ujjwal Sharma <ryzokuken@igalia.com>

https://github.com/mozilla/pdf.js/commit/3a85770af1bc1c62770de899cbcfa9aab6126cb7
Authored: 2025-09-30 13:37:39 +0530
Committed: 2025-12-06 03:00:48 +0530

Encode FontPath data into an ArrayBuffer

Serialize FontPath commands into a binary format
and store it in an ArrayBuffer so that it can
eventually be stored in a SharedArrayBuffer.

Files Modified:

  • src/core/evaluator.js
  • src/display/api.js
  • src/display/font_loader.js
  • src/shared/obj-bin-transform.js
  • test/unit/obj_bin_transform_spec.js

365cc69caecd59cf9c29c18f6f8c41b7e0b1fc8e by Weismann <1563511027@qq.com>

https://github.com/mozilla/pdf.js/commit/365cc69caecd59cf9c29c18f6f8c41b7e0b1fc8e
Authored: 2025-12-01 10:21:27 +0800
Committed: 2025-12-01 10:21:27 +0800

Extend getGlyphMapForStandardFonts with some Russian entries (issue 20453)

Files Added:

  • test/pdfs/issue20453.pdf

Files Modified:

  • src/core/standard_fonts.js
  • test/pdfs/.gitignore
  • test/test_manifest.json

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/3ff7b558d46a https://hg.mozilla.org/integration/autoland/rev/c341824d7c2d Update PDF.js to ff4529d127662e1e3e63797b047324811340d1ba r=pdfjs-reviewers,calixte
Status: ASSIGNED → RESOLVED
Closed: 29 days ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch

(In reply to Pulsebot from comment #4)

Pushed by cdenizet@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/3ff7b558d46a
https://hg.mozilla.org/integration/autoland/rev/c341824d7c2d
Update PDF.js to ff4529d127662e1e3e63797b047324811340d1ba
r=pdfjs-reviewers,calixte

Perfherder has detected a talos performance change from push c341824d7c2d1667816d5c6c9c5c1d4c864ef047.

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

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
84% pdfpaint issue1877.pdf macosx1470-64-shippable e10s fission stylo webrender-sw 2,462.56 -> 387.72
83% pdfpaint issue1877.pdf macosx1470-64-shippable e10s fission stylo webrender 2,389.70 -> 404.62
72% pdfpaint issue1877.pdf windows11-64-24h2-shippable e10s fission stylo webrender-sw 878.34 -> 246.35
72% pdfpaint issue1877.pdf linux1804-64-shippable-qr e10s fission stylo webrender 1,908.79 -> 538.22
71% pdfpaint issue1877.pdf linux1804-64-shippable-qr e10s fission stylo webrender-sw 1,826.33 -> 526.41
... ... ... ... ...
9% pdfpaint issue14562.pdf linux1804-64-shippable-qr e10s fission stylo webrender-sw 1,190.45 -> 1,083.77

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-c149/b148]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: