Closed Bug 1830280 Opened 10 months ago Closed 10 months ago

Update PDF.js to new version 0ee0fcc6b3e6f602f5df97d29d09294d359ba525 from 2023-04-27 12:01:55

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

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


toolkit/components/pdfjs/content/build/pdf.js | 10 +-
toolkit/components/pdfjs/content/build/pdf.scripting.js | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.js | 24 ++-
toolkit/components/pdfjs/content/web/images/gv-toolbarButton-download.svg | 0
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 5 -
toolkit/components/pdfjs/content/web/viewer-geckoview.js | 65 +++++----
toolkit/components/pdfjs/content/web/viewer.css | 5 -
toolkit/components/pdfjs/content/web/viewer.js | 65 +++++----
toolkit/components/pdfjs/moz.yaml | 4 +-
9 files changed, 92 insertions(+), 90 deletions(-)


924a8901d151596617ea4cdb8ac98be553795109 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/924a8901d151596617ea4cdb8ac98be553795109
Authored: 2023-04-27 11:32:32 +0200
Committed: 2023-04-27 11:32:32 +0200

Remove the unused getXhr-option in the NetworkManager constructor

Originally this file was shared, using pre-processor statements, between the generic PDF.js library and the built-in Firefox PDF Viewer. In the latter case the getXhr-option is being used, see https://searchfox.org/mozilla-central/rev/f32d5f3949a3f4f185122142b29f2e3ab776836e/toolkit/components/pdfjs/content/PdfStreamConverter.sys.mjs#612-621

Files Modified:

  • src/display/network.js

e12535457fe01f93c66fec3c3a9f90460badad52 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/e12535457fe01f93c66fec3c3a9f90460badad52
Authored: 2023-04-26 17:52:46 +0200
Committed: 2023-04-26 17:52:46 +0200

Avoid some repeated stringToBytes-calls in the src/core/crypto.js file

Currently we repeatedly lookup, and convert to bytes, the "O" and "U" encryption-dictionary entries.

Files Modified:

  • src/core/crypto.js

62a9435190463cc3c78f63aec810c330db92a715 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/62a9435190463cc3c78f63aec810c330db92a715
Authored: 2023-04-26 11:46:54 +0200
Committed: 2023-04-26 12:11:13 +0200

[api-minor] Stop including the "lib"-build in the pdfjs-dist repository

The pdfjs-dist/lib/ directory contains a README file that explicitly advises against using those files, however based on a fairly large number of issues filed over the years users seem to be (mostly) overlooking that warning.
In particular it unfortunately seems to be somewhat common for users to attempt to "combine" proper builds from pdfjs-dist/build/ together with individual components from the pdfjs-dist/lib/web/ directory, which more often than not leads to subtle bugs and general problems.

When we receive bug reports about this it's often not immediately obvious what the problem is, given that many issues lack enough details (such as runnable test-cases), but after some back-and-forth it usually turns out that usage of pdfjs-dist/lib/ is the culprit.
Considering that keeping the general PDF.js library working is challenging and time-consuming enough nowadays, this patch thus proposes that we stop including the "lib"-build in the pdfjs-dist repository to both reduce user confusion and the support burden.

Files Deleted:

  • external/dist/lib/README.md

Files Modified:

  • gulpfile.js

2de6fd8e70b271ab85cc4e0af5b5aeee5b128691 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/2de6fd8e70b271ab85cc4e0af5b5aeee5b128691
Authored: 2023-04-25 21:28:20 +0200
Committed: 2023-04-25 21:39:16 +0200

Prevent incomplete copy-all behaviour while text-extraction is running (PR 16286 follow-up)

Currently we only prevent triggering the actual text-extraction multiple times in "parallel", when using the "copy all text" feature, however the "copy"-event itself is not prevented.
The result is that if the user selects all text in a long PDF document and then uses the copy-shortcut multiple times in quick succession, we'll actually populate the clipboard with "incomplete" contents (via a TextLayerBuilder copy-listener) until all text-extraction finishes.

Files Modified:

  • web/pdf_viewer.js

8a9d7a18cc3d8065d3401eca143ed74b1f3efef8 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/8a9d7a18cc3d8065d3401eca143ed74b1f3efef8
Authored: 2023-04-22 13:07:07 +0200
Committed: 2023-04-25 11:07:05 +0200

Allow text-selection, but not copying, when enablePermissions is set (PR 16320 follow-up)

Files Modified:

  • web/pdf_page_view.js
  • web/pdf_viewer.css
  • web/pdf_viewer.js
  • web/text_layer_builder.js
  • web/ui_utils.js

All jobs completed, we found the following issues.

Lint Jobs Failed:

  • source-test-mozlint-file-perm (cCAlsEoMRWOzhygu8hMglw)

Needs Investigation (Other Failed Jobs):

  • source-test-mozlint-file-perm
    • 1 of 1 failed on the same (retriggered) task (cCAlsEoMRWOzhygu8hMglw)

These failures may mean that the library update succeeded; you'll need to review
them yourself and decide. If there are lint failures, you will need to fix them in
a follow-up patch. (Or ignore the patch I made, and recreate it yourself with
./mach vendor toolkit/components/pdfjs/moz.yaml.)

In either event, I have done all I can, so you will need to take it from here.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.

Assignee: nobody → cdenizet
Attachment #9330607 - Attachment description: Bug 1830280 - Update PDF.js to 0ee0fcc6b3e6f602f5df97d29d09294d359ba525 → Bug 1830280 - Update PDF.js to 0ee0fcc6b3e6f602f5df97d29d09294d359ba525 r=#pdfjs-reviewers
Pushed by cdenizet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/91c75b4a6dba
Update PDF.js to 0ee0fcc6b3e6f602f5df97d29d09294d359ba525 r=pdfjs-reviewers,Snuffleupagus
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.