Closed Bug 1817668 Opened 3 years ago Closed 3 years ago

Update PDF.js to new version 255e982542c5e2983c783de9cead4912c9b2d8b3 from 2023-02-19 11:22:10

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

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


toolkit/components/pdfjs/content/build/pdf.js | 21 +++-
toolkit/components/pdfjs/content/build/pdf.scripting.js | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.js | 6 +-
toolkit/components/pdfjs/content/web/viewer-geckoview.js | 59 +++++++++------
toolkit/components/pdfjs/content/web/viewer.js | 60 +++++++++------
toolkit/components/pdfjs/moz.yaml | 4 +-
6 files changed, 93 insertions(+), 61 deletions(-)


fc7d74385fb9903154942ebe49be23c344c831e4 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/fc7d74385fb9903154942ebe49be23c344c831e4
Authored: 2023-02-16 11:25:15 +0100
Committed: 2023-02-16 11:31:58 +0100

Don't replace an eol by a whitespace when the last char is a Katakana-Hiragana diacritic

Files Added:

  • test/pdfs/issue16063.pdf

Files Modified:

  • test/pdfs/.gitignore
  • test/unit/pdf_find_controller_spec.js
  • web/pdf_find_controller.js

3c66b031e33d9cc20c728179f826fdef344b6560 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/3c66b031e33d9cc20c728179f826fdef344b6560
Authored: 2023-02-14 12:52:03 +0100
Committed: 2023-02-14 12:54:44 +0100

Don't try to place the xfaLayer "on top" in regular PDF documents

Given that we only create an xfaLayer in "pure" XFA-documents, this code can be moved into the appropriate branch instead.

Files Modified:

  • web/pdf_page_view.js

b6ba8cc84a0cef762aa5349dcb18cc0799f5d946 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/b6ba8cc84a0cef762aa5349dcb18cc0799f5d946
Authored: 2023-02-14 11:30:40 +0100
Committed: 2023-02-14 11:30:40 +0100

[api-minor] Deprecate providing binary data as Buffer in Node.js environments

The Buffer-object is Node.js specific functionality[1], thus (obviously) not found in browsers. Please note that the PDF.js library has never officially supported/documented that binary data can be passed as a Buffer, and that internally in the src/core-code we only work with standard Uint8Arrays.
This means that if, in Node.js environments, a Buffer is passed to the API we need to wrap it into a Uint8Array, which essentially means creating a copy of the data and thus increasing memory usage.


[1] Refer to https://nodejs.org/api/buffer.html#buffer

Files Modified:

  • src/display/api.js

df3b3592806734accfcc37e33a99624e40078388 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/df3b3592806734accfcc37e33a99624e40078388
Authored: 2023-02-14 10:45:28 +0100
Committed: 2023-02-14 10:50:22 +0100

Remove "else after return" from the getUrlProp/getDataProp helper functions

This helps readability of this code a little bit, in my opinion, and it's actually ever so slightly less code in the built pdf.js file.

Files Modified:

  • src/display/api.js

0e840f1c399cde258e349fdf66420439e1fe2fdd by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/0e840f1c399cde258e349fdf66420439e1fe2fdd
Authored: 2023-02-13 14:38:22 +0100
Committed: 2023-02-13 14:49:33 +0100

A little clean-up of the getDocument call in test/driver.js

  • Pass the URL-object directly to getDocument, since that's been supported since PR 13166.
  • Remove support for the disableRange-option in the test-manifest, since it's completely unused. Please note that it's originally added in PR 2719, however there's never actually been any reference tests using it (not even from the start).
    Given that the option is false by default everywhere (e.g. in the Firefox PDF Viewer) and that we have unit-tests for disableRange = true, it doesn't seem necessary to add new reference tests for it now.

Files Modified:

  • test/driver.js

8026ed6b0ae180c88fbc94937ecb64bd45c7b654 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/8026ed6b0ae180c88fbc94937ecb64bd45c7b654
Authored: 2023-02-13 09:56:08 +0100
Committed: 2023-02-13 11:09:16 +0100

Reduce duplication for reference tests with an annotationStorage entry

Currently we duplicate the same code more than once in the test/driver.js file, which we can avoid by adding a new AnnotationStorage helper method instead.

Files Modified:

  • src/display/annotation_storage.js
  • test/driver.js

6985286300ccf1e7f9e8dfe95a251b49df54986a by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/6985286300ccf1e7f9e8dfe95a251b49df54986a
Authored: 2023-02-12 15:48:05 +0100
Committed: 2023-02-12 18:38:31 +0100

Remove the unused eventBus option in PDFThumbnailViewer (PR 15215 follow-up)

This became unused with PR 15215, but I unfortunately forgot to remove it.

Files Modified:

  • web/app.js
  • web/pdf_thumbnail_viewer.js

The try push is done, we found jobs with unclassified failures.

Known Issues (From Push Health):

  • toolkit/components/pdfjs/test/browser_pdfjs_download_button.js | application terminated with exit code 127
  • 1 of 4 failed on the same (retriggered) task
    - test-linux1804-64-qr/opt-mochitest-browser-chrome-swr-1 (QNyuJOipSGiclz7c0J2evA)

Needs Investigation (From Push Health):

  • No tests were found for flavor 'plain' and the following manifest filters:
    skip_if, run_if, fail_if, subsuite(name=None), tags(['condprof']), pathprefix(['toolkit/components/pdfjs/test'])

    Make sure the test paths (if any) are spelt correctly and the corresponding
    --flavor and --subsuite are being used. See mach mochitest --help for a
    list of valid flavors.

    • 2 of 2 failed on different tasks
      - test-windows10-64-2004-qr/opt-mochitest-plain-condprof-1 (ewxOyXWYR3GHT4XL-KS16g)
      - test-linux1804-64-qr/opt-mochitest-plain-condprof-1 (KafwHw7YTYyg_WNgnYfTsg)

Needs Investigation (Other Failed Jobs):

  • test-windows10-64-2004-qr/debug-mochitest-devtools-chrome-1
    • 4 of 4 failed on the same (retriggered) task (Bd2kNZATSn2TN7QVXifrQg, DmI5DvPvTiGPNTj3LmpBrw, KPxBmDNCSoyrQfiMYUd5Vw, bXNy110WT0ejb61Mk6D5sQ)
  • test-macosx1015-64-qr/debug-mochitest-devtools-chrome-1
    • 4 of 4 failed on the same (retriggered) task (b-yJiKrvR1K_FNnP0hpPtg, WRGcLg91TU25SDTzCUQH5Q, X5PWAfvXRRyRHPA1UqkLew, APw3EQfAQ4-GoFJBB88VKQ)
  • test-linux1804-64-qr/debug-mochitest-devtools-chrome-1
    • 4 of 4 failed on the same (retriggered) task (cJiAd4-iS-OAiSTft2gwrQ, cLLd79yESzam1DF4xnAG2g, PaGnVD2yTn6anEzDzxxZQQ, Q1qN2k57QCKhBSg9L-GXog)
  • test-linux1804-64-qr/debug-mochitest-devtools-chrome-spi-nw-1
    • 4 of 4 failed on the same (retriggered) task (FwN1sDeGSF2snNFSMkQO4w, UEpHAVTwQsO0GIhqyVNt-Q, WOb_-xwCQE2ZAEDCNRkNRA, Q_7O6qq6QoueDjgm4qI05A)
  • test-linux1804-64-qr/debug-mochitest-devtools-chrome-swr-1
    • 4 of 4 failed on the same (retriggered) task (MGc4XseKS-isERV17iAkEQ, VeCOlwOhQHC3glzEplizYQ, YvKDuIZLScCpAYgej35G1Q, PeIaa-VvRN2YGLSv_typrw)
  • test-windows10-64-2004-qr/debug-mochitest-devtools-chrome-spi-nw-1
    • 4 of 4 failed on the same (retriggered) task (JPjGwvouR0yhQ1IsZ-JyrA, U3QiP5HXTVu-B7yvlS_HtA, YReNBccCRyOosrqOG9NLnA, Gqhm2wAhRpOS-87430UAHg)
  • test-macosx1015-64-qr/debug-mochitest-devtools-chrome-spi-nw-1
    • 4 of 4 failed on the same (retriggered) task (X8bf5_OgSeexzYzABX9-fw, YZFnO_nkSq6WUdELJbWVGQ, ByjqSiKNR1-5BTlFl5yQVg, Am0tG11aS3OggoqGQYaALg)

These failures could mean that the library update changed something and caused
tests to fail. You'll need to review them yourself and decide where to go from here.

In either event, I have done all I can and you will need to take it from here. If you
don't want to land my patch, you can replicate it locally for editing with
./mach vendor toolkit/components/pdfjs/moz.yaml

When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.

Assignee: nobody → cdenizet
Flags: needinfo?(cdenizet)
Pushed by cdenizet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f6db314827b1 Update PDF.js to 255e982542c5e2983c783de9cead4912c9b2d8b3 r=calixte
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Flags: needinfo?(cdenizet)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: