Closed Bug 1827474 Opened 2 years ago Closed 2 years ago

Update PDF.js to new version 3a36a9d33707d16c8e7b2378ec44693132cb0ccd from 2023-04-11 10:06:29

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1827374
Tracking Status
firefox114 --- affected

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 1 open bug)

Details

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

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.js | 10 +-
toolkit/components/pdfjs/content/build/pdf.scripting.js | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.js | 124 +++++++++---
toolkit/components/pdfjs/content/web/viewer-geckoview.css | 76 +++++++
toolkit/components/pdfjs/content/web/viewer-geckoview.html | 6 +
toolkit/components/pdfjs/content/web/viewer-geckoview.js | 104 +++++++++-
toolkit/components/pdfjs/content/web/viewer.css | 30 +-
toolkit/components/pdfjs/content/web/viewer.js | 42 +++-
toolkit/components/pdfjs/moz.yaml | 4 +-
9 files changed, 310 insertions(+), 90 deletions(-)


d3d16b15ac1720a7df61222f416cb657b57a9d28 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/d3d16b15ac1720a7df61222f416cb657b57a9d28
Authored: 2023-04-09 12:38:49 +0200
Committed: 2023-04-10 16:26:19 +0200

[Firefox] Use float: inline-start/inline-end directly in MOZCENTRAL builds (PR 15968 follow-up)

Currently float: inline-start/inline-end is only supported in Firefox, see https://developer.mozilla.org/en-US/docs/Web/CSS/float#browser_compatibility, and in order to support other browsers we're thus forced to jump through some hoops.
This leads to slightly less nice code in the built-in Firefox PDF Viewer, and this patch attempts to improve the current situation:

  • Use Stylelint to forbid direct use of float: inline-start/inline-end in the CSS files, to prevent future bugs in the general PDF.js viewer.
  • Do a build-time replacement, only in MOZCENTRAL builds, to replace the CSS-variables with raw float: inline-start/inline-end instances.

Files Modified:

  • .stylelintrc
  • gulpfile.js
  • web/viewer.css

9881dbf92712dbae18ec6f9874eba7789a2cfb80 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/9881dbf92712dbae18ec6f9874eba7789a2cfb80
Authored: 2023-04-10 11:00:35 +0200
Committed: 2023-04-10 11:34:41 +0200

Attempt to also cache images at the "page"-level (issue 16263)

Currently we have two separate image-caches on the worker-thread:

  • A local one, which is unique to each PartialEvaluator.getOperatorList invocation. This one caches both names and references, since image-resources may be accessed in either way.
  • A global one, which applies to the entire PDF documents and all its pages. This one only caches references, since nothing else would work.

This patch introduces a third image-cache, which essentially sits "between" the two existing ones. The new RegionalImageCache[1] will be usable throughout a PartialEvaluator instance, and consequently it only caches references, which thus allows us to keep track of repeated image-resources found in e.g. different /Form and /SMask objects.


[1] For lack of a better word, since naming things is hard...

Files Added:

  • test/pdfs/issue16263.pdf

Files Modified:

  • src/core/evaluator.js
  • src/core/image_utils.js
  • test/pdfs/.gitignore
  • test/test_manifest.json

61860ff56f888286704bca1629ffdae2a812cbdb by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/61860ff56f888286704bca1629ffdae2a812cbdb
Authored: 2023-04-08 13:54:46 +0200
Committed: 2023-04-08 13:57:17 +0200

Tweak the pageNumber CSS to better support RTL locales

This effectively implements some of the changes from https://phabricator.services.mozilla.com/D170496, but in such a way that the loading-icon won't overlay the page-number in RTL locales.

Files Modified:

  • web/viewer.css

6419e5903607fade0049e36dc63e666eed12a04a by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/6419e5903607fade0049e36dc63e666eed12a04a
Authored: 2023-04-07 13:36:06 +0200
Committed: 2023-04-07 13:36:06 +0200

Tweak the loadingBar CSS to better support RTL locales

This effectively implements some of the changes from https://phabricator.services.mozilla.com/D170496, but using our existing "direction aware" CSS-variable to limit the amount of code changes needed.

Files Modified:

  • web/viewer.css

3b147205baaf77fe7c6163a63e4a0d42cc3ac2b0 by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/3b147205baaf77fe7c6163a63e4a0d42cc3ac2b0
Authored: 2023-04-07 10:28:53 +0200
Committed: 2023-04-07 11:54:16 +0200

[GeckoView] Add a basic toolbar with a download button for GV (bug 1823164)

Files Added:

  • web/toolbar-geckoview.js

Files Modified:

  • gulpfile.js
  • web/app.js
  • web/viewer-geckoview.css
  • web/viewer-geckoview.html
  • web/viewer-geckoview.js

4bf8e5c13d1fe98729dc760bd2a4a37a02636377 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/4bf8e5c13d1fe98729dc760bd2a4a37a02636377
Authored: 2023-04-06 13:11:12 +0200
Committed: 2023-04-06 13:11:12 +0200

Tweak the --scale-factor CSS-variable warning threshold (issue 16254)

This is apparently needed to account for the rounding used in Chromium-browsers, such that the warning message isn't displayed unnecessarily.

Files Modified:

  • src/display/text_layer.js

3c326974a0d4c821a6bddba4e4a30dd37bacdd2b by Fred Chasen

https://github.com/mozilla/pdf.js/commit/3c326974a0d4c821a6bddba4e4a30dd37bacdd2b
Authored: 2023-03-31 15:20:38 -0700
Committed: 2023-04-05 10:33:56 -0700

[Firefox] Add CSS at-page size when printing from FirefoxPrintService (bug 1820651) - Duplicates at-page size method from PDFPrintService - Updates getPagesOverview to rotate pages to fit the initial orientation

Files Modified:

  • web/firefox_print_service.js
  • web/pdf_print_service.js
  • web/pdf_viewer.js

ce3ea587785b45b7819facebbadf360fe78b154b by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/ce3ea587785b45b7819facebbadf360fe78b154b
Authored: 2023-04-03 13:23:26 +0200
Committed: 2023-04-03 13:23:26 +0200

[api-minor] Update the minimum supported Google Chrome version

The patch changes the minimum supported version of Google Chrome as follows:

This is done to allow use of modern CSS features, such as e.g. :is() and :where() in the code-base.

Files Modified:

  • gulpfile.js

bf57a8f660013c519ef678dc6cd994e10f0fcd81 by Jonas Jenwald

https://github.com/mozilla/pdf.js/commit/bf57a8f660013c519ef678dc6cd994e10f0fcd81
Authored: 2023-04-02 15:57:32 +0200
Committed: 2023-04-02 16:06:36 +0200

Force-install when using gulp dist-install (issue 15435)

When installing the PDF.js project itself it's currently necessary to use --force in order for all packages to install correctly, see issue 15429, hence the same is also necessary when using the gulp dist-install command for local development/testing.

Files Modified:

  • gulpfile.js

4b7eb1436d6577f664796b51d29b3b82b535e15c by Calixte Denizet

https://github.com/mozilla/pdf.js/commit/4b7eb1436d6577f664796b51d29b3b82b535e15c
Authored: 2023-03-28 17:48:09 +0200
Committed: 2023-03-29 11:23:58 +0200

Thin whitespaces must have their own span

Files Added:

  • test/pdfs/issue16224.pdf

Files Modified:

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

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

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-windows11-64-2009-qr/opt-mochitest-plain-condprof-1 (L1pGBZIEQj2IdnvWVbTKUQ)
      - test-linux1804-64-qr/opt-mochitest-plain-condprof-1 (MsGir8HwSKWFgfteEVrTwA)

Needs Investigation (Other Failed Jobs):

  • test-linux1804-64-qr/debug-mochitest-devtools-chrome-spi-nw-1
    • 4 of 4 failed on the same (retriggered) task (a1Jg-cpnQSi_E2npMA2pcQ, HXsWr26fTgaISDXYRjehEg, R-MOAPh3RE6TJgZv0Ctt4A, BM1kF0_RT2yb_NdgFqZnuw)
  • test-linux1804-64-qr/debug-mochitest-devtools-chrome-swr-1
    • 4 of 4 failed on the same (retriggered) task (asAX9lo3REuLxKg6d37h0A, ear3OcGKSL2ebxYu9fTPUQ, GGWly--OTm27uAUIu-GtCA, KSOYGkGuTvOFZXS5DAp20w)
  • test-macosx1015-64-qr/debug-mochitest-devtools-chrome-1
    • 4 of 4 failed on the same (retriggered) task (VkBt-j44SaqzORIDsZ_-dg, cupqNvbVSBSn0VkHXWHesA, D0CAnH_2SqmRq--2ANI9Ew, LX9SIPf4TV65BeieCSU-lA)
  • test-macosx1015-64-qr/debug-mochitest-devtools-chrome-spi-nw-1
    • 4 of 4 failed on the same (retriggered) task (CEMrM4M0SWi2X0MRBfRQTQ, bzOWVbtBTGSYQD70Ti2abw, fb7YAXB8QTq05eoo2c42MQ, V81BHI_UTnemmN1Pqho7TQ)
  • test-windows11-64-2009-qr/debug-mochitest-devtools-chrome-1
    • 4 of 4 failed on the same (retriggered) task (cXXHF9JzRqGiHPTzV-XANA, diR2TA-5SYio13k0NNd2Og, fKYJqB5JRYexb6w4D-g6Pg, TZgv_sBmRsi5iX-W5diukA)
  • test-linux1804-64-qr/debug-mochitest-devtools-chrome-1
    • 4 of 4 failed on the same (retriggered) task (DZeK5seOQzOVAXKJTlXlpA, OE5iyX2aQNOdf3GTmG-KiQ, Z--VPwsIS3CQE_j-xPUgzw, WKksOcc4R_upWh7hJ_GdCA)
  • test-windows11-64-2009-qr/debug-mochitest-devtools-chrome-spi-nw-1
    • 4 of 4 failed on the same (retriggered) task (HfbTPzeDRCaR-vSenTJd4w, JI962PvNRsubFKeGr4u-Hw, R91YZJWNTHSOXtvcnm5w4Q, JAdX4xgsR0elJBHVNSlPpA)

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)
No longer blocks: 1820651, 1823164
Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1827374
Flags: needinfo?(cdenizet)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: