Closed Bug 1772598 Opened 2 years ago Closed 2 years ago

Update PDF.js to new version 19539676813b5df6ca4726a1bfa6765193b1067c from 2022-06-02 14:52:48

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: update-bot, Assigned: calixte)

References

(Blocks 2 open bugs)

Details

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

Attachments

(1 file)

This update covers 36 commits:


397f2e63d0b7507d94b27fbe411b54b31d283240 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/397f2e63d0b7507d94b27fbe411b54b31d283240
Authored: 2022-06-02 15:41:22 +0200
Committed: 2022-06-02 16:06:47 +0200

Handle CSS-comments better in the preprocess-function (PR 14963 follow-up)

This fixes another oversight, please see the updated tests.

Files Added:

  • external/builder/builder.js
  • external/builder/fixtures/css-comment-expected.css
  • external/builder/fixtures/css-comment.css
  • external/builder/builder.js
  • external/builder/fixtures/css-comment-expected.css
  • external/builder/fixtures/css-comment.css

7e852851fd2e99a8ceccfb7a5a9394bc6d591c25 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/7e852851fd2e99a8ceccfb7a5a9394bc6d591c25
Authored: 2022-05-29 16:37:18 +0200
Committed: 2022-05-29 16:37:18 +0200

A small memory-usage improvement for PDF documents opened from TypedArray-data

This patch contains a small optimization specifically for the case when getDocument is called with TypedArray-data. In that case we'll still hold onto that data, which could obviously be large, even after the "GetDocRequest"-message has been sent to the worker-thread.

In practice this will most likely not affect memory usage in any noticeable way, since the application calling getDocument will probably also be keeping a reference to the TypedArray-data. However, it seems like a good idea to ensure that the PDF.js API itself won't unnecessarily keep this data alive.

Files Added:

  • src/display/api.js
  • src/display/api.js

db029e17b3b06a211847e650294bd20c66e4d77e by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/db029e17b3b06a211847e650294bd20c66e4d77e
Authored: 2022-05-29 09:48:14 +0200
Committed: 2022-05-29 09:48:14 +0200

Update l10n files

Files Added:

  • l10n/it/viewer.properties
  • l10n/ka/viewer.properties
  • l10n/it/viewer.properties
  • l10n/ka/viewer.properties

a7d2d8d929061e932ab5f2306962ee9c920f54b0 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/a7d2d8d929061e932ab5f2306962ee9c920f54b0
Authored: 2022-05-29 09:28:39 +0200
Committed: 2022-05-29 09:37:24 +0200

Update npm packages

Files Added:

  • package-lock.json
  • package.json
  • package-lock.json
  • package.json

10932e3f9d38d5c41cc2bd872779fcff79416b5b by Takashi Tamura

https://github.com/mozilla/pdf.js-/commit/10932e3f9d38d5c41cc2bd872779fcff79416b5b
Authored: 2022-05-14 17:02:06 +0900
Committed: 2022-05-29 11:28:17 +0900

Use globalThis for webpack's output.globalObject instead of this. Close #14915. That allows us to import pdfjs-dist/build/pdf.js dynamically from modules.

Files Added:

  • gulpfile.js
  • gulpfile.js

66b513fc007f1bdee9fe3d50dfc639be0c6c6801 by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/66b513fc007f1bdee9fe3d50dfc639be0c6c6801
Authored: 2022-02-19 16:47:49 +0100
Committed: 2022-05-28 23:50:50 +0200

[Annotations] Show buttons even if they've no actions - it's a regression from PR #14247: - before the PR, the button was rendered on the canvas whatever its status was; - after the PR, the button image has been moved in an other canvas so when the button is not renderable (because it has no actions) then the image is not added the HTML element. - the buttons in the pdf in bug 1737260 or in the pdf in #14308 were not visible - make the button always renderable but don't add the link element if it's useless.

Files Added:

Files Added:

  • src/display/annotation_layer.js
  • test/test_manifest.json
  • src/display/annotation_layer.js
  • test/test_manifest.json

9d82106d20f039c9d41e4a09080f3768e2ea5957 by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/9d82106d20f039c9d41e4a09080f3768e2ea5957
Authored: 2022-05-19 15:12:28 +0200
Committed: 2022-05-28 18:00:39 +0200

Set the text fields font size based on their height - right now we're using the font size from the pdf itself but we use an other font in the annotation layer. So this size doesn't really make sense and leads to bad rendering (see pdf in #14928); - use a sans-serif font for the fields containing text (fix issue #14736); - remove useless padding in text-based fields (fix issue #14301); - text fields allow/disallow scrolling bars (see bit 24 in Ff entry), so use this value to hide/show scrollbars in annotation layer.

Files Added:

  • test/pdfs/issue14301.pdf.link
  • test/pdfs/issue14301.pdf.link

Files Added:

  • src/core/annotation.js
  • src/display/annotation_layer.js
  • src/shared/util.js
  • test/driver.js
  • test/test_manifest.json
  • web/annotation_layer_builder.css
  • src/core/annotation.js
  • src/display/annotation_layer.js
  • src/shared/util.js
  • test/driver.js
  • test/test_manifest.json
  • web/annotation_layer_builder.css

c7afce421015f16afb9b3f265f49dc8e290dc8dd by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/c7afce421015f16afb9b3f265f49dc8e290dc8dd
Authored: 2022-05-28 14:08:43 +0200
Committed: 2022-05-28 16:50:03 +0200

Support Hangul syllables when searching some text (bug 1771477) - it aims to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1771477; - hangul contains some syllables which are decomposed when using NFD, hence the text must be correctly shifted in case it contains some of them.

Files Added:

Files Added:

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

0599ce77ffe6bd68c50b4310046d1355a9adcb53 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/0599ce77ffe6bd68c50b4310046d1355a9adcb53
Authored: 2022-05-28 11:05:40 +0200
Committed: 2022-05-28 12:39:49 +0200

Ensure that the contentDispositionFilename is always respected, when setting the document title (PR 13014 follow-up)

Currently, when range-requests and/or streaming are not supported or for documents opened from data-URLs, we'll manually set the contentDispositionFilename (assuming it exists and is valid) from the onOpenWithData-callback in PDFViewerApplication.initPassiveLoading.
However, because of a small oversight in PDFViewerApplication._initializeMetadata, this cached contentDispositionFilename would be ignored and we'd only attempt to use the one returned by PDFDocumentProxy.getMetadata in the API (which in the cases outlined above will always be empty).

Also, to ensure that the document properties dialog always displays the correct fileName we'll now lookup it using the same exact method as in the viewer itself (via a new callback-function).

Files Added:

  • web/app.js
  • web/pdf_document_properties.js
  • web/app.js
  • web/pdf_document_properties.js

65fe0130f432945636cf3c3939987f8cb63bb4b4 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/65fe0130f432945636cf3c3939987f8cb63bb4b4
Authored: 2022-05-28 08:41:25 +0200
Committed: 2022-05-28 08:41:25 +0200

Handle CSS-comments correctly in the preprocess-function (PR 14886 follow-up)

I overlooked this in PR 14886, sorry about that!

Files Added:

  • external/builder/fixtures/css-comment-expected.css
  • external/builder/fixtures/css-comment.css
  • external/builder/fixtures/css-comment-expected.css
  • external/builder/fixtures/css-comment.css

Files Added:

  • external/builder/builder.js
  • external/builder/builder.js

c0e7a454a1bcc8290721229e6a8b7c9988d60b7c by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/c0e7a454a1bcc8290721229e6a8b7c9988d60b7c
Authored: 2022-05-26 12:30:36 +0200
Committed: 2022-05-27 11:36:01 +0200

Convert the PDFSidebar class to use private methods

Files Added:

  • web/pdf_sidebar.js
  • web/pdf_sidebar.js

d289da76a78e4ef1c4ad11e4fbf7485db23498f6 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/d289da76a78e4ef1c4ad11e4fbf7485db23498f6
Authored: 2022-05-26 12:16:56 +0200
Committed: 2022-05-27 11:33:01 +0200

Re-factor the PDFSidebar.{setInitialView, switchView} methods (PR 10502 follow-up)

This removes the internal _switchView-method, since looking at all of this again it feels simpler to instead track the initial event dispatching.

Files Added:

  • web/pdf_sidebar.js
  • web/pdf_sidebar.js

13fda7caeb4904f3e3162529073a2896db1dd0cc by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/13fda7caeb4904f3e3162529073a2896db1dd0cc
Authored: 2022-05-26 11:58:36 +0200
Committed: 2022-05-26 14:27:51 +0200

Remove the view-specific getters in the PDFSidebar class

With the exception of isThumbnailViewVisible, these getters are completely unused. Generally speaking, using the visibleView-getter directly works just as well and seems (at least to me) to be overall preferable considering how our classes are usually implemented.

Files Added:

  • web/app.js
  • web/pdf_sidebar.js
  • web/app.js
  • web/pdf_sidebar.js

987176194902c08dfdd1d103b31001fb595bf84e by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/987176194902c08dfdd1d103b31001fb595bf84e
Authored: 2022-05-26 09:45:05 +0200
Committed: 2022-05-26 10:07:27 +0200

Support custom pageColors in the thumbnails (PR 14874)

Currently, when non-standard pageColors are specified, the thumbnails will look inconsistent depending on how they're created.
The thumbnails that are created by downsizing the page canvases will obviously use the pageColors as intended, however the thumbnails which are rendered directly will always use the default colors.

Files Added:

  • web/app.js
  • web/base_viewer.js
  • web/pdf_thumbnail_view.js
  • web/pdf_thumbnail_viewer.js
  • web/app.js
  • web/base_viewer.js
  • web/pdf_thumbnail_view.js
  • web/pdf_thumbnail_viewer.js

ca244d9bca2cc61dd3dd8284722b9206053ff55b by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/ca244d9bca2cc61dd3dd8284722b9206053ff55b
Authored: 2022-05-22 18:00:57 +0200
Committed: 2022-05-25 09:55:54 +0200

Introduce a viewer constant for document.documentElement.style

Over time, as we've been introducing JavaScript code to modify CSS variables, we've been adding shorthand properties to various classes to reduce unnecessary repetition when accessing the document-styles.
Rather than repeating this in multiple places, it seems overall simpler to just introduce a constant and re-use that throughout the viewer instead.

Files Added:

  • web/base_viewer.js
  • web/pdf_page_view.js
  • web/pdf_sidebar_resizer.js
  • web/toolbar.js
  • web/ui_utils.js
  • web/base_viewer.js
  • web/pdf_page_view.js
  • web/pdf_sidebar_resizer.js
  • web/toolbar.js
  • web/ui_utils.js

5a2899c57ecca83454b9aa1c7a4a7ba375a990bb by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/5a2899c57ecca83454b9aa1c7a4a7ba375a990bb
Authored: 2022-05-24 12:12:53 +0200
Committed: 2022-05-24 12:20:31 +0200

Skip bogus d1 operators in Type3-glyphs (issue 14953)

In the src/display/canvas.js code the d1 operator will be used to set the clipping region, and it obviously cannot be empty since that prevents the Type3-glyph from rendering.

Also, the patch removes an outdated comment; refer to PR 12718.

Files Added:

  • test/pdfs/issue14953.pdf
  • test/pdfs/issue14953.pdf

Files Added:

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

9407adc41667a79cd9f463d2493b8db8f44d2eb6 by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/9407adc41667a79cd9f463d2493b8db8f44d2eb6
Authored: 2022-05-22 14:37:17 +0200
Committed: 2022-05-22 15:50:42 +0200

[JS] Format all the fields if any when the document is open (bug 1766987) - it aims to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1766987.

Files Added:

Files Added:

  • src/scripting_api/event.js
  • test/integration/scripting_spec.js
  • test/test_manifest.json
  • src/scripting_api/event.js
  • test/integration/scripting_spec.js
  • test/test_manifest.json

55da67e9aa4d8a66f5a68e4b60d2e253b01cc244 by Dmitry_Platonov

https://github.com/mozilla/pdf.js-/commit/55da67e9aa4d8a66f5a68e4b60d2e253b01cc244
Authored: 2022-05-21 07:48:44 +0200
Committed: 2022-05-22 14:57:55 +0200

Set 'dropEffect' based on 'effectAllowed' for drag-and-drop in the viewer (issue 14942). See https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed

Files Added:

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

e003e82c98334f4f2df94e4a2518e1d6a667a0bd by IsaacLK

https://github.com/mozilla/pdf.js-/commit/e003e82c98334f4f2df94e4a2518e1d6a667a0bd
Authored: 2022-05-20 09:36:10 -0400
Committed: 2022-05-20 09:36:10 -0400

Twitter should be capitalized.

Files Added:

  • README.md
  • README.md

0a66e1f5ea27eb8ba9d3c098f74ab1f971ccc731 by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/0a66e1f5ea27eb8ba9d3c098f74ab1f971ccc731
Authored: 2022-05-20 12:57:22 +0200
Committed: 2022-05-20 13:02:22 +0200

Allow to have float numbers when getting image information in reftest-analyzer - outputScale can be e.g. 1.5 in real life.

Files Added:

  • test/resources/reftest-analyzer.js
  • test/resources/reftest-analyzer.js

60498c67e4e218cb74b1b6f66b07bd8f34eab26b by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/60498c67e4e218cb74b1b6f66b07bd8f34eab26b
Authored: 2022-05-17 23:10:02 +0200
Committed: 2022-05-19 16:41:54 +0200

Display background when printing or saving a text widget (issue #14928)

Files Added:

  • test/pdfs/issue14928.pdf.link
  • test/pdfs/issue14928.pdf.link

Files Added:

  • src/core/annotation.js
  • src/core/core_utils.js
  • src/core/default_appearance.js
  • src/core/writer.js
  • test/test_manifest.json
  • test/unit/annotation_spec.js
  • test/unit/default_appearance_spec.js
  • src/core/annotation.js
  • src/core/core_utils.js
  • src/core/default_appearance.js
  • src/core/writer.js
  • test/test_manifest.json
  • test/unit/annotation_spec.js
  • test/unit/default_appearance_spec.js

8a349801dcc2f69d1a16499070f10802e046c06e by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/8a349801dcc2f69d1a16499070f10802e046c06e
Authored: 2022-05-10 14:15:57 +0200
Committed: 2022-05-15 18:18:37 +0200

[Firefox viewer] Stop using FirefoxCom.requestAsync in the DownloadManager

After the changes in https://bugzilla.mozilla.org/show_bug.cgi?id=1757771, that simplified the MOZCENTRAL downloading code, the ChromeActions.download-method will no longer invoke the sendResponse-callback.
Hence it should no longer be necessary for the DownloadManager, in the MOZCENTRAL viewer, to use FirefoxCom.requestAsync since no response is ever provided.[1] For the allocated BlobURLs, they should (hopefully) be released when navigating away from the viewer.


[1] Note that that was already the case, for one of the previous code-paths in the ChromeActions.download-method.

Files Added:

  • web/firefoxcom.js
  • web/firefoxcom.js

4f1cd6a9c2ed44f5bc753ba76d83d880714b195d by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/4f1cd6a9c2ed44f5bc753ba76d83d880714b195d
Authored: 2022-02-19 11:47:24 +0100
Committed: 2022-05-15 18:18:37 +0200

Remove the sourceEventType from the viewer (bug 1757771 follow-up)

After the changes in https://bugzilla.mozilla.org/show_bug.cgi?id=1757771, that simplified the MOZCENTRAL downloading code, the sourceEventType is now completely unused and should thus be removed (in my opinion).

Furthermore, with these changes, we also no longer need a separate internal "save"-event and can instead just use the older "download"-event everywhere.

Files Added:

  • web/app.js
  • web/download_manager.js
  • web/firefoxcom.js
  • web/interfaces.js
  • web/pdf_scripting_manager.js
  • web/app.js
  • web/download_manager.js
  • web/firefoxcom.js
  • web/interfaces.js
  • web/pdf_scripting_manager.js

e94b9d1d7fb96f743749531958147677945e1aad by Calixte Denizet

https://github.com/mozilla/pdf.js-/commit/e94b9d1d7fb96f743749531958147677945e1aad
Authored: 2022-05-10 17:51:07 +0200
Committed: 2022-05-15 17:30:37 +0200

Use a CSS transform to update the progress bar instead of changing the width (bug 1768481) - it isn't a fix for bug 1768481 but just a tiny improvement to refresh the progress bar on the compositor thread.

Files Added:

  • examples/mobile-viewer/viewer.css
  • web/viewer.css
  • examples/mobile-viewer/viewer.css
  • web/viewer.css

5a774b7ed3addad20bd044890213fe33e469102b by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/5a774b7ed3addad20bd044890213fe33e469102b
Authored: 2022-05-15 11:12:00 +0200
Committed: 2022-05-15 11:24:39 +0200

Adjust the heuristics for handling of incomplete path operators (issue 14917)

This limits the heuristics for handling of incomplete path operators, see PR 9838, to only apply to sequences of such operators. In practice a couple of invalid path operators are (hopefully) unlikely to completely break rendering, whereas a sequence of them will easily lead to fairly chaotic rendering artifacts.

Files Added:

  • test/pdfs/issue14917.pdf.link
  • test/pdfs/issue14917.pdf.link

Files Added:

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

54080b68845f7c1668817ebbed65f5c9327f43cd by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/54080b68845f7c1668817ebbed65f5c9327f43cd
Authored: 2022-05-15 09:12:37 +0200
Committed: 2022-05-15 09:12:37 +0200

Update l10n files

Files Added:

  • l10n/fi/viewer.properties
  • l10n/sc/viewer.properties
  • l10n/fi/viewer.properties
  • l10n/sc/viewer.properties

5320316f73eb0f9f6b5bb76193a88a1da9318760 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/5320316f73eb0f9f6b5bb76193a88a1da9318760
Authored: 2022-05-15 09:02:57 +0200
Committed: 2022-05-15 09:07:35 +0200

Update npm packages

Files Added:

  • .eslintrc
  • gulpfile.js
  • package-lock.json
  • package.json
  • .eslintrc
  • gulpfile.js
  • package-lock.json
  • package.json

bfb088052362d3594253542ce860f51c5c7c71a4 by Tim van der Meij

https://github.com/mozilla/pdf.js-/commit/bfb088052362d3594253542ce860f51c5c7c71a4
Authored: 2022-05-14 14:45:59 +0200
Committed: 2022-05-14 14:45:59 +0200

Bump versions in pdfjs.config

Files Added:

  • pdfjs.config
  • pdfjs.config

1f3da032b4e61dc766676f1cff6feb2a57148905 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/1f3da032b4e61dc766676f1cff6feb2a57148905
Authored: 2022-05-14 13:10:13 +0200
Committed: 2022-05-14 13:49:10 +0200

[api-minor] Modernize and simplify the ProgressBar class

The original ProgressBar-functionality is very old, and could thus do with some general clean-up.
In particular, while it currently accepts various options those have never really been used in either the default viewer or in any examples. The sort of "styling" that these options provided are much better, not to mention simpler, done directly with CSS rules.

As part of these changes, the "progress" is now updated using CSS variables rather than by directly modifying the style of DOM elements. This should hopefully simplify future changes to this code, see e.g. PR 14898.

Finally, this also fixes a couple of other small things in the "mobile viewer" example.

Files Added:

  • examples/mobile-viewer/viewer.css
  • examples/mobile-viewer/viewer.js
  • web/ui_utils.js
  • web/viewer.css
  • examples/mobile-viewer/viewer.css
  • examples/mobile-viewer/viewer.js
  • web/ui_utils.js
  • web/viewer.css

efe3cb2982855116952628758a6424328c2dd826 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/efe3cb2982855116952628758a6424328c2dd826
Authored: 2022-05-13 17:12:03 +0200
Committed: 2022-05-13 17:20:35 +0200

Remove unnecessary clean-up in Toolbar.#adjustScaleWidth

While zeroing the temporary canvas makes sense, manually clearing the canvas and its context doesn't really accomplish anything since those are tied to the scope of the method.

Files Added:

  • web/toolbar.js
  • web/toolbar.js

3dd8b9cccfc59f597e24c827f861b746dd5ef727 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/3dd8b9cccfc59f597e24c827f861b746dd5ef727
Authored: 2022-05-13 12:07:05 +0200
Committed: 2022-05-13 17:10:42 +0200

Ensure that setting the width of the zoom dropdown works correctly (PR 14028 follow-up)

We need to wait for UI rendering to start before getting the CSS variable values, since otherwise the values will be NaN.
This is only an issue if the viewer is completely hidden during loading, e.g. in a display: none iframe-element.

Files Added:

  • web/toolbar.js
  • web/toolbar.js

d540df0582a5003b18bfbe18edabaf841cec942e by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/d540df0582a5003b18bfbe18edabaf841cec942e
Authored: 2022-05-13 12:42:51 +0200
Committed: 2022-05-13 12:42:51 +0200

Use TypedArray.prototype.fill() a bit more in the code-base

Please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill, which is implemented in all browsers that we currently support.

Files Added:

  • src/core/jbig2.js
  • src/core/jbig2.js

6bcc5b615d225a3cf3159007bc0ff4db4d8cb443 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/6bcc5b615d225a3cf3159007bc0ff4db4d8cb443
Authored: 2022-05-10 17:36:29 +0200
Committed: 2022-05-12 11:08:30 +0200

[api-minor] Include line endings in Line/Polyline Annotation-data (issue 14896)

Please refer to:

Note that we still won't attempt to use the /LE-data when creating fallback appearance streams, as mentioned in PR 13448, since custom line endings aren't common enough to warrant the added complexity.
Finally, note that according to the PDF specification we should potentially also take the line endings into account for FreeText Annotations. However, in that case their use is conditional on other parameters that we currently don't support.

Files Added:

  • src/core/annotation.js
  • test/unit/annotation_spec.js
  • src/core/annotation.js
  • test/unit/annotation_spec.js

ec6575db000f4034ca4a556a87e9d496cf963425 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/ec6575db000f4034ca4a556a87e9d496cf963425
Authored: 2022-05-11 14:21:16 +0200
Committed: 2022-05-11 14:21:16 +0200

Avoid the preprocess-function adding consecutive blank lines

When pre-processor blocks are being removed, since they don't apply to the current build target, we may currently end up with consecutive blank lines.
While this is obviously not a big issue, it's nonetheless undesirable and we can adjust the writeLine function to prevent that.

Files Added:

  • external/builder/builder.js
  • external/builder/builder.js

527251d62b1ac99cef12e9eb249a6938ff3ea6f2 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/527251d62b1ac99cef12e9eb249a6938ff3ea6f2
Authored: 2022-05-11 12:32:41 +0200
Committed: 2022-05-11 12:36:00 +0200

Update the preprocess-function to avoid adding trailing new-lines (issue 14902)

This is a follow-up to PR 14886, which "broke" this.

In addition to fixing the issue, using an Array and join-ing it at the end may also be a tiny bit more efficient than using a growing string.

Files Added:

  • external/builder/builder.js
  • external/builder/builder.js

af5789125fb6e6024a9c439b36ac5a464aa49de5 by Jonas Jenwald

https://github.com/mozilla/pdf.js-/commit/af5789125fb6e6024a9c439b36ac5a464aa49de5
Authored: 2022-05-09 12:25:51 +0200
Committed: 2022-05-09 13:03:08 +0200

Try to remove the mozOpaque canvas-property (PR 6551 follow-up)

According to MDN, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozOpaque, the mozOpaque canvas-property is not only non-standard (obviously) but it's also been deprecated.
Instead it's recommended to use alpha = false when getting the canvas-context, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext#contextattributes, which all of our affected code is already doing.

Files Added:

  • src/display/text_layer.js
  • test/driver.js
  • web/pdf_page_view.js
  • web/pdf_thumbnail_view.js
  • web/toolbar.js
  • src/display/text_layer.js
  • test/driver.js
  • web/pdf_page_view.js
  • web/pdf_thumbnail_view.js
  • web/toolbar.js

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.

Assignee: nobody → cdenizet

Updatebot encountered an error while trying to set you as a reviewer in phabricator.
Updatebot will be unable to do anything more for this library version.

Flags: needinfo?(cdenizet)

:tjr, a test is consistently failing (dt1) and according to comment 4, the bot doesn't detect it.
:julienw, from the dt1 logs, I don't understand why the tests are failing and I don't manage to reproduce this issue locally with a local build on windows 11, do you have any idea on what could be wrong ?

Flags: needinfo?(tom)
Flags: needinfo?(felash)

I have no idea. What's surprising to me is that the 2 tests that are run are both skipped and are not part of devtools actually. And the failure happens after that.
My guess would be a bug in the test harness due to the fact that both tests are skipped. Not sure what's happening.

I'm passing along the request to Julian who might know better than me here.

Flags: needinfo?(felash) → needinfo?(jdescottes)

The only reason the jobs fail is because the try push only schedules 2 tests:

  • browser/base/content/test/static/browser_all_files_referenced.js
  • browser/base/content/test/static/browser_parsable_css.js

which are included for devtools because of the following workaround: https://searchfox.org/mozilla-central/source/devtools/client/framework/test/browser.ini#182-186
But as you can see they are also skipped on many platforms.
And it seems that when a job only schedules skipped tests, it gets marked as failed.

For the purpose of this Bug you can fully ignore that and we should file another bug to investigate why the harness log parsing fails and marks the job as failed.

Flags: needinfo?(jdescottes)

I filed a bug about the "failing" test:
https://bugzilla.mozilla.org/show_bug.cgi?id=1772754

Flags: needinfo?(cdenizet)
Pushed by cdenizet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/66eb7c61e75a
Update PDF.js to 19539676813b5df6ca4726a1bfa6765193b1067c r=pdfjs-reviewers,Snuffleupagus
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
See Also: → 1772875

Updatebot relies on Push Health, which is reporting wrong data, probably for a very similar reason. I filed Bug 1772875 for it.

Flags: needinfo?(tom)
You need to log in before you can comment on or make changes to this bug.