1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00
Commit graph

20278 commits

Author SHA1 Message Date
Calixte Denizet
6b95095e14 Add the possibility to compress/decompress the signature data in order to store them in the logins storage in Firefox (bug 1946171) 2025-02-10 19:09:51 +01:00
Jonas Jenwald
b4a6b1ba0b
Merge pull request #19456 from Snuffleupagus/more-TypedArray-fill
Replace a couple of loops with `TypedArray.prototype.fill()`
2025-02-09 17:45:17 +01:00
calixteman
6862e84daa
Merge pull request #19437 from calixteman/signature_save_print1
[Editor] Add the ability to print and save some newly added signatures (bug 1946795)
2025-02-09 17:13:01 +01:00
Jonas Jenwald
294fa3e4e6 Replace a couple of loops with TypedArray.prototype.fill()
When you want to initialize a TypedArray with a non-zero value for all elements the `fill`-method is simpler than manually looping through it.
2025-02-09 16:24:45 +01:00
Tim van der Meij
c1035e4356
Merge pull request #19454 from Snuffleupagus/Chrome-110
[api-minor] Update the minimum supported Google Chrome version to 110
2025-02-09 15:59:50 +01:00
Jonas Jenwald
ad1c79e6af [api-minor] Update the minimum supported Google Chrome version to 110
This patch updates the minimum supported browsers as follows:
 - Google Chrome 110, which was released on 2023-02-07; see https://chromereleases.googleblog.com/2023/02/stable-channel-update-for-desktop.html

Note that nowadays we usually try, where feasible and possible, to support browsers that are about two years old. By limiting support to only "recent" browsers we reduce the risk of holding back improvements of the *built-in* Firefox PDF Viewer, and also (significantly) reduce the maintenance/support burden for the PDF.js contributors.

*Please note:* As always, the minimum supported browser version assumes that a `legacy`-build of the PDF.js library is being used; see https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support
2025-02-09 13:33:55 +01:00
Tim van der Meij
8ba8e75d6c
Merge pull request #19446 from Snuffleupagus/shorten-MeshStreamReader-readBits
Shorten the `MeshStreamReader.prototype.readBits` method a little bit
2025-02-09 12:57:53 +01:00
Tim van der Meij
739324d77e
Merge pull request #19447 from Snuffleupagus/fix-integrationtest-inferred_link_
Check for the correct link-id prefix in "must not add links when unnecessary" integration-test (PR 19110 follow-up)
2025-02-09 12:55:10 +01:00
Tim van der Meij
1921aefccf
Merge pull request #19450 from Snuffleupagus/crypto-CipherTransform-iv-getRandomValues
Use `crypto.getRandomValues` unconditionally in the `src/core/crypto.js` file
2025-02-09 12:53:27 +01:00
Jonas Jenwald
7919f4e84f Use crypto.getRandomValues unconditionally in the src/core/crypto.js file
This functionality is now available in all browsers/environments that we support, please see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#browser_compatibility
2025-02-09 11:42:17 +01:00
Jonas Jenwald
6eec20afc0 Check for the correct link-id prefix in "must not add links when unnecessary" integration-test (PR 19110 follow-up)
Currently this test-case would never fail, even if the actual implementation was broken, since it checks for a link-id prefix that we're not using.
2025-02-08 15:42:31 +01:00
Jonas Jenwald
36522d85cc Shorten the MeshStreamReader.prototype.readBits method a little bit
- Use a `BaseStream`-instance method to directly get the int32 value.

 - Use local variables more.
2025-02-08 11:17:35 +01:00
Jonas Jenwald
72339dc561
Merge pull request #19399 from Snuffleupagus/TextLayer-#getAscent-simplify
[api-minor] Simplify the `TextLayer.#getAscent` fallback (PR 12896 follow-up)
2025-02-08 00:01:40 +01:00
Calixte Denizet
24417a1a0b [Editor] Add the ability to print and save some newly added signatures (bug 1946795) 2025-02-07 23:07:27 +01:00
Tim van der Meij
b43efdd545
Merge pull request #19436 from Snuffleupagus/api-FetchBinaryData
Combine the main-thread message handlers for CMap-, StandardFontData-, and Wasm-files
2025-02-07 21:13:58 +01:00
Tim van der Meij
01148d35bc
Merge pull request #19423 from Snuffleupagus/annotation-more-getPdfColorArray
Use the `getPdfColorArray` helper more in the `src/core/annotation.js` file
2025-02-07 21:05:52 +01:00
Tim van der Meij
5b7bc27c46
Merge pull request #19419 from Snuffleupagus/blank_issues_enabled-false
Disable the "Blank issue" alternative when using the GitHub "New issue"-button
2025-02-07 20:52:26 +01:00
Jonas Jenwald
88e5da1e37 Combine the main-thread message handlers for CMap-, StandardFontData-, and Wasm-files
Currently we have three separate and virtually identical message handlers for this data, which can easily be combined into a single message handler instead.
2025-02-07 14:33:15 +01:00
calixteman
651d712109
Merge pull request #19433 from calixteman/signature_icon
[Editor] Add an icon for the signature tool and move it before the highlight one
2025-02-06 21:59:27 +01:00
Jonas Jenwald
7d9cfbf597
Merge pull request #19432 from Snuffleupagus/isSyncFontLoadingSupported-FeatureTest
Use the `FeatureTest` helper in the `src/display/font_loader.js` file
2025-02-06 21:36:28 +01:00
Calixte Denizet
5ee7307bf5 [Editor] Add an icon for the signature tool and move it before the highlight one 2025-02-06 20:58:59 +01:00
Jonas Jenwald
33f3506842 Use the FeatureTest helper in the src/display/font_loader.js file 2025-02-06 20:45:18 +01:00
Jonas Jenwald
41a918b0fe
Merge pull request #19430 from Snuffleupagus/Fluent-PLATFORM
[GENERIC viewer] Add Fluent `PLATFORM` function (PR 19414 follow-up)
2025-02-06 20:07:07 +01:00
calixteman
16155fd801
Merge pull request #19431 from Snuffleupagus/var--save-warning-color
Fix `--save-warning-color` CSS variable typo (PR 19414 follow-up)
2025-02-06 19:09:20 +01:00
Jonas Jenwald
314928ffd7 Fix --save-warning-color CSS variable typo (PR 19414 follow-up) 2025-02-06 19:06:04 +01:00
Jonas Jenwald
d5d3d8b3f7 [GENERIC viewer] Add Fluent PLATFORM function (PR 19414 follow-up)
This patch extends the `FeatureTest.platform` getter to provide the necessary information, and uses that one to implement a Fluent `PLATFORM` function based on: https://searchfox.org/mozilla-central/rev/d1fbe983fb7720f0a4aca0e748817af11c1a374e/intl/l10n/rust/fluent-ffi/src/bundle.rs#81-98
2025-02-06 18:59:35 +01:00
calixteman
f1152f5caf
Merge pull request #19429 from calixteman/autolinking_firefox
Enable autolinking in Firefox (bug 1019475)
2025-02-06 17:47:55 +01:00
Calixte Denizet
76c06c5996 Enable autolinking in Firefox (bug 1019475) 2025-02-06 17:02:54 +01:00
calixteman
2d773cb773
Merge pull request #19110 from ryzokuken/autolink-demo
Enable automatic URL linking (bug 1019475)
2025-02-06 16:53:48 +01:00
calixteman
08663f715b
Merge pull request #19414 from calixteman/signature_dialog2
[Editor] Add a new dialog for the signature editor (bug 1945574)
2025-02-06 16:20:01 +01:00
Calixte Denizet
fa25ab9c13 [Editor] Add a new dialog for the signature editor (bug 1945574) 2025-02-05 23:00:38 +01:00
Ujjwal Sharma
61ba1ea48c Enable automatic URL linking
Automatically detect links in the text content of a file and automatically
generate link annotations at the appropriate locations to achieve
automatic link detection and hyperlinking.
2025-02-05 16:56:54 +01:00
Jonas Jenwald
925071ab46 Use the getPdfColorArray helper more in the src/core/annotation.js file
While the file-size reduction is obviously tiny, it should never hurt to remove code duplication.
2025-02-05 11:37:32 +01:00
Jonas Jenwald
0b118efc26 Disable the "Blank issue" alternative when using the GitHub "New issue"-button
With recent changed made to the GitHub issues-UI the "Blank issue" alternative is now showing up quite prominently, which can easily negate the point of our bug/feature templates and lead to incomplete issues being filed.
2025-02-04 15:19:04 +01:00
Jonas Jenwald
90a5c37cb0
Merge pull request #19416 from Snuffleupagus/getFactoryUrlProp
[api-minor] Add more validation for the `cMapUrl`, `standardFontDataUrl`, and `wasmUrl` parameters
2025-02-04 12:48:21 +01:00
Jonas Jenwald
212388a980
Merge pull request #19415 from Snuffleupagus/dist-wasm
Bundle wasm-files in `pdfjs-dist` (PR 19329 follow-up)
2025-02-04 11:41:00 +01:00
Jonas Jenwald
696c6c626b Include the OpenJPEG license files
This is consistent with the handling of CMaps and StandardFontData.
2025-02-04 10:39:38 +01:00
Jonas Jenwald
fa3358baf9 [api-minor] Add more validation for the cMapUrl, standardFontDataUrl, and wasmUrl parameters
Given that we now have a few different factory-url parameters, we introduce a helper function for parsing them.

*Please note:* These parameters have always been documented as requiring a trailing slash[1], which we can now easily enforce during the `getDocument`-call.

---
[1] I recall that we've occasionally seen issues because users miss that detail, and the new Error should hopefully be more easily actionable than one thrown during rendering/parsing.
2025-02-04 10:27:31 +01:00
Jonas Jenwald
de79996574 Bundle wasm-files in pdfjs-dist (PR 19329 follow-up) 2025-02-04 10:22:26 +01:00
Tim van der Meij
d1f62509e5
Merge pull request #19410 from timvandermeij/integration-tests-freetext
Centralize the editor selector definitions in the freetext editor integration tests
2025-02-02 19:41:13 +01:00
Tim van der Meij
9a6511127a
Put waitForSelector options on a single line in the editor integration tests
This pattern was already followed quite consistently outside of the
freetext editor integration tests, so this commit aligns the remaining
places for consistency. This also helps to make the tests more compact
and to reduce the number of changes in follow-up changes.
2025-02-02 17:20:14 +01:00
Tim van der Meij
e95a26dc1d
Centralize the editor selector definitions in the freetext editor integration tests
In most integration tests we already use the pattern of defining the
editor selector once and reusing it in the rest of the test, but it's
not fully consistent everywhere yet. This commit fixes that for the
freetext editor integration tests, which has multiple advantages:

- it improves consistency between the various editor integration tests;
- it removes duplicate function calls and aligns variable definitions;
- it reduces the number of `getEditorSelector` calls that contained
  hardcoded IDs, which helps to isolate the tests and to simplify
  follow-up patches.
2025-02-02 17:18:14 +01:00
Tim van der Meij
bdbd9a317f
Merge pull request #19408 from Snuffleupagus/rm-popup-color-mix-fallback
Remove the `color-mix` fallback used with PopupAnnotations
2025-02-02 14:22:08 +01:00
Tim van der Meij
944602a7d5
Merge pull request #19405 from timvandermeij/integration-tests-highlight
Centralize the editor selector definitions in the highlight editor integration tests
2025-02-02 14:19:23 +01:00
Tim van der Meij
f9d3f699a7
Merge pull request #19404 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2025-02-02 14:19:06 +01:00
Jonas Jenwald
9752d88241
Merge pull request #19407 from hamirmahal/master
Replace uninformative README badge (issue 19406)
2025-02-02 11:31:49 +01:00
Jonas Jenwald
9f62a88c38 Remove the color-mix fallback used with PopupAnnotations
This CSS feature is now available in *most* browsers that we support, with old Chromium-based browsers being the only exception; please see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix#browser_compatibility

From this data we see that the feature in question has been supported since Chrome 111, which was released on 2023-03-01 (i.e. almost two years ago).

Please note that we've never guaranteed that all features and functionality will be available in the oldest supported browsers.
Furthermore, even with the `color-mix` fallback removed PopupAnnotations will still function just as before but may render with the default color (defined in the CSS-file) rather than the one specified in the PDF document.
2025-02-02 10:41:35 +01:00
Hamir Mahal
d8b6f1138f
Replace uninformative README badge (issue 19406) 2025-02-01 15:32:09 -08:00
Tim van der Meij
8babcded5d
Centralize the editor selector definitions in the highlight editor integration tests
In most integration tests we already use the pattern of defining the
editor selector once and reusing it in the rest of the test, but it's
not fully consistent everywhere yet. This commit fixes that for the
highlight editor integration tests, which has multiple advantages:

- it improves consistency between the various editor integration tests;
- it removes duplicate function calls and aligns variable definitions;
- it reduces the number of `getEditorSelector` calls that contained
  hardcoded IDs, which helps to isolate the tests and to simplify
  follow-up patches.
2025-02-01 19:23:42 +01:00
Tim van der Meij
0326814a1e
Update translations to the most recent versions 2025-02-01 18:37:01 +01:00