22644 Commits

Author SHA1 Message Date
Jonas Jenwald
0ec70b0953
Merge pull request #21168 from Snuffleupagus/unittestcli-coverage-web
Include the `web/` folder in the coverage report for `gulp unittestcli`
2026-04-26 22:02:08 +02:00
Jonas Jenwald
40ea3e3acb Include the web/ folder in the coverage report for gulp unittestcli
Given that there's a few unit-tests for `web/` code that runs in Node.js, it seems reasonable to include that folder in the coverage report.
2026-04-26 21:55:09 +02:00
Calixte Denizet
65792863b9
Add a gh workflow for triggering an event when some pdfs are added in test/pdfs 2026-04-26 21:29:10 +02:00
Tim van der Meij
ce998f1d16
Introduce a GitHub Actions workflow for running the integration tests 2026-04-26 20:40:57 +02:00
Tim van der Meij
b178305a8b
Merge pull request #21167 from timvandermeij/fix-coverage-workflow
Fix the Codecov token not being usable in the unit tests GitHub Actions workflow
2026-04-26 20:40:20 +02:00
Tim van der Meij
142c581362
Fix the Codecov token not being usable in the unit tests GitHub Actions workflow
The job's environment must be `code-coverage` before it has access to
the `CODECOV_TOKEN` secret that's required for pushing coverage data to
Codecov. Without it we get an HTTP 400 response with a `Token required
because branch is protected` message if it's run from `master`.

Fixes f932a58d.
2026-04-26 20:25:57 +02:00
calixteman
f45d507302
Merge pull request #21165 from timvandermeij/github-actions-unit-tests-coverage
Include unit test coverage reporting in the GitHub Actions workflow
2026-04-26 19:55:53 +02:00
calixteman
88609becf8
Merge pull request #21166 from Snuffleupagus/internal-viewer-fixes
A couple of `internal-viewer` fixes
2026-04-26 19:54:36 +02:00
calixteman
c4afee385a
Merge pull request #21164 from timvandermeij/github-actions-font-tests-twice
Remove duplicated font tests execution in the GitHub Actions workflow
2026-04-26 19:53:47 +02:00
Jonas Jenwald
fae980a72d A couple of internal-viewer fixes
- Bundle the `web/text_layer_builder.css` file correctly, to ensure that textLayer debugging works when the code is *built*.
   Note how loading https://mozilla.github.io/pdf.js/internal-viewer/web/debugger.html currently logs the following error: `GET https://mozilla.github.io/pdf.js/internal-viewer/text_layer_builder.css [HTTP/2 404  7ms]`.

 - Import the `MathClamp` helper function from the *built* library, rather than "manually", since that's more correct.
2026-04-26 19:10:05 +02:00
Tim van der Meij
348942418c
Merge pull request #21163 from timvandermeij/updates
Update dependencies to the most recent versions
2026-04-26 17:01:06 +02:00
Tim van der Meij
f932a58d9c
Include unit test coverage reporting in the GitHub Actions workflow 2026-04-26 15:53:30 +02:00
Tim van der Meij
2d95e9964c
Remove duplicated font tests execution in the GitHub Actions workflow
The font tests have run with coverage reporting enabled for quite some
time now and the coverage information has proven to work and be stable,
so we don't have to also run the font tests without coverage reporting
anymore, thereby reducing the total runtime of the workflow.
2026-04-26 15:49:52 +02:00
Jonas Jenwald
60dcc64419
Merge pull request #21162 from Snuffleupagus/renderCommentButton-zIndex-parseInt
Get the `zIndex` correctly in `PopupElement.prototype.renderCommentButton`
2026-04-26 15:21:55 +02:00
Tim van der Meij
9afc31751a
Update dependencies to the most recent versions 2026-04-26 15:02:02 +02:00
Jonas Jenwald
72011c5088 Get the zIndex correctly in PopupElement.prototype.renderCommentButton
In practice this probably hasn't caused any bugs, however given that `DOMElement.style.zIndex` returns a string the existing code is subtly wrong.
This is also consistent with pre-existing `zIndex` code in the `PopupElement` class, see the `#show` and `#hide` methods.
2026-04-26 14:46:39 +02:00
Tim van der Meij
4aed8fd01b
Merge pull request #21161 from Snuffleupagus/getPageIndex-more-tests
Improve unit-testing for the `PDFDocumentProxy.prototype.getPageIndex` method
2026-04-26 14:46:24 +02:00
Jonas Jenwald
fc9d9e49de Improve unit-testing for the PDFDocumentProxy.prototype.getPageIndex method
Given the existing worker-thread caching it doesn't seem, based on the coverage report, that all of the `getPageIndex` code is being tested.
2026-04-26 13:38:08 +02:00
Jonas Jenwald
5c11bf15b0
Merge pull request #21160 from Snuffleupagus/more-hexNumbers
Move the `hexNumbers` Array into `Util`, to enable using it in the viewer
2026-04-26 13:08:42 +02:00
Tim van der Meij
0d7439e856
Merge pull request #21158 from Snuffleupagus/modifiedIds-proper-hash
Compute a "proper" hash in the `AnnotationStorage.prototype.modifiedIds` getter
2026-04-26 12:10:24 +02:00
Jonas Jenwald
9b238b9719 Move the hexNumbers Array into Util, to enable using it in the viewer
This reduces some code duplication, and the new `Util.hexNums` property is now computed lazily.
2026-04-26 12:05:12 +02:00
Tim van der Meij
2674a9f3e4
Merge pull request #21137 from calixteman/bug2022700
Don't decode name of the checkboxes exported values (bug 2022700)
2026-04-26 12:00:58 +02:00
Jonas Jenwald
1591ddfa8d
Merge pull request #21157 from Snuffleupagus/eslint-radix
Enable the `radix` ESLint rule
2026-04-25 22:27:21 +02:00
Jonas Jenwald
b72a229ee8 Compute a "proper" hash in the AnnotationStorage.prototype.modifiedIds getter
Currently the hash-property is just a stringified Array, which means that the hash-property can become arbitrarily long. That's not a good idea since it's used to compute a cache-key, in the API, which is then sent to the worker-thread. Hence the hash-property should be reasonably short, and its length should *not* depend on the number of modified editors, which can be achieved by using `MurmurHash3_64` here as well.
2026-04-25 12:52:29 +02:00
Jonas Jenwald
e6dba6ee34 Enable the radix ESLint rule
Many `parseInt` call-sites already provide the `radix` argument, and this rule helps improve consistency in the code-base; see https://eslint.org/docs/latest/rules/radix

*Please note:* The rule is disabled in `src/scripting_api/util.js` for now, since it's not obvious at a glance (at least to me) what the correct `radix` argument should be there.
2026-04-25 12:13:12 +02:00
calixteman
30d060c77a
Merge pull request #21151 from calixteman/bug2034568
Fix clicking on a thumbnail image not navigating to the correct page when using a screen reader (bug 2034568)
2026-04-25 08:20:25 +02:00
Tim van der Meij
f41c60ab7e
Merge pull request #21147 from Snuffleupagus/unittestcli-download-PDFs
Download linked PDFs when running `gulp unittestcli`
2026-04-24 20:29:14 +02:00
Tim van der Meij
7dc4812643
Merge pull request #21138 from calixteman/bug2034111
Fix status label mismatch after merging with a pre-existing selection (bug 2034111)
2026-04-24 20:07:50 +02:00
calixteman
2d896faa1e
Merge pull request #21142 from calixteman/input_color_alpha
[Ink] Replace the opacity slider with an alpha-enabled color input
2026-04-24 15:46:46 +02:00
Jonas Jenwald
476626eb49
Merge pull request #21153 from Snuffleupagus/rm-MIN_INT_32
Remove the unused `MIN_INT_32` constant (PR 21139 follow-up)
2026-04-24 15:01:16 +02:00
Calixte Denizet
39eb691252
Fix status label mismatch after merging with a pre-existing selection (bug 2034111) 2026-04-24 14:13:53 +02:00
calixteman
a6382ac97d
Merge pull request #21145 from calixteman/bug2034461
Prompt the user for saving a merged pdf (bug 2034461)
2026-04-24 14:11:36 +02:00
calixteman
c05d87a63f
Merge pull request #21149 from calixteman/switch_quickjs_wasm
Switch to a wasm file for the quickjs sandbox
2026-04-24 14:10:47 +02:00
Jonas Jenwald
aa7289d28b Remove the unused MIN_INT_32 constant (PR 21139 follow-up) 2026-04-24 13:29:22 +02:00
calixteman
4489c4106a
Merge pull request #21150 from mozilla/update-locales
l10n: Update locale files
2026-04-24 10:13:55 +02:00
Calixte Denizet
b669fdfc70
Fix clicking on a thumbnail image not navigating to the correct page when using a screen reader (bug 2034568)
Screen readers like NVDA fire synthetic click events on the <img> child of the button rather than on the
thumbnailImageContainer element itself, so the strict classList.contains check silently failed.
2026-04-24 10:10:59 +02:00
github-actions[bot]
e75259eff1 l10n: Update locale files 2026-04-24 00:42:13 +00:00
Calixte Denizet
987edbb646
Switch to a wasm file for the quickjs sandbox 2026-04-23 22:34:48 +02:00
calixteman
25204d359a
Merge pull request #21136 from calixteman/bug2033908
Avoid to add outlines having a deleted page which leads to clone a useless page (bug 2033908)
2026-04-23 22:24:58 +02:00
Jonas Jenwald
4e08d00466 Download linked PDFs when running gulp unittestcli
Currently a fair number of unit-tests are disabled in Node.js not because of missing functionality, but only because they use linked PDFs.
2026-04-23 21:52:08 +02:00
Calixte Denizet
f266c4d8b8
[Ink] Replace the opacity slider with an alpha-enabled color input
The alpha feature is available in Firefox nightly (with the pref `dom.forms.html_color_picker.enabled` set to `true`).
It's available in Safari but not in Chrome.
2026-04-23 21:37:37 +02:00
Tim van der Meij
865a59691b
Merge pull request #21121 from timvandermeij/github-actions-unit-tests
Introduce a GitHub Actions workflow for running the unit tests
2026-04-23 21:25:36 +02:00
Tim van der Meij
14743eef45
Introduce a GitHub Actions workflow for running the unit tests
Note that we no longer create an empty file if the download fails because
we don't want to leave traces of incorrect file contents on disk. This
has never been particularly useful because it'd require a manual user
action to remove the empty file to be able to retry in case of e.g. a
timed out connection, but especially in the context of GitHub Actions
where we cache the PDFs directory we don't want to cache invalid files
to make sure that a next run will automatically retry to fetch any
previously missed PDF files and update the cache.
2026-04-23 21:12:01 +02:00
Tim van der Meij
9f42555cfb
Merge pull request #21143 from calixteman/update_openjpeg_build
Update the openjpeg decoder compiled with the last version of emscripten
2026-04-23 20:38:09 +02:00
Tim van der Meij
654cc5df36
Merge pull request #21148 from calixteman/update_quickjs_build
Update quickjs bindings
2026-04-23 20:36:17 +02:00
Tim van der Meij
76420e5d91
Merge pull request #21140 from mozilla/dependabot/npm_and_yarn/fast-xml-parser-5.7.1
Bump fast-xml-parser from 5.5.7 to 5.7.1
2026-04-23 20:33:42 +02:00
calixteman
dae7695deb
Merge pull request #21144 from calixteman/update_qcms_build
Update qcms bindings
2026-04-23 19:25:43 +02:00
Calixte Denizet
35ef6fe67a
Update quickjs bindings 2026-04-23 19:22:38 +02:00
Calixte Denizet
302bc5f4d9
Prompt the user for saving a merged pdf (bug 2034461) 2026-04-23 18:37:56 +02:00
Calixte Denizet
56a78aca06
Update qcms bindings 2026-04-23 16:43:17 +02:00