22450 Commits

Author SHA1 Message Date
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
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
56a78aca06
Update qcms bindings 2026-04-23 16:43:17 +02:00
Calixte Denizet
16ad718923
Update the openjpeg decoder compiled with the last version of emscripten 2026-04-23 15:49:43 +02:00
Jonas Jenwald
bede5e5bfa
Merge pull request #21139 from Snuffleupagus/jbig2_nowasm_fallback
[api-minor] Replace the CCITT and JBig2 fallback decoders with a JS version of the PDFium decoder
2026-04-23 15:08:17 +02:00
dependabot[bot]
ae1b4796bd
Bump fast-xml-parser from 5.5.7 to 5.7.1
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.5.7 to 5.7.1.
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v5.5.7...v5.7.1)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-version: 5.7.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-23 06:04:13 +00:00
Jonas Jenwald
a6988582d2 [api-minor] Replace the CCITT and JBig2 fallback decoders with a JS version of the PDFium decoder
*Note:* This is similar to PR 19525, which did the same thing for the OpenJPEG decoder.

The advantages of doing this are:
 - The same JBig2 decoder is used regardless of WASM being supported or not, which means consistent rendering.
 - The old `Jbig2Image` implementation has various bugs and missing features.
 - Less code that needs to be maintained in the PDF.js project, since both the CCITT and the JBig2 decoder is replaced.

The disadvantage of doing this is:
 - Slightly larger bundle size, however the effect is limited since a fair amount of PDF.js code can be removed. For the `gulp mozcentral` target the size increase is approximately 54 kilo-bytes (which is small compared to the 452 kilo-bytes for the JS version of the OpenJPEG decoder).
2026-04-22 23:24:26 +02:00
Tim van der Meij
fe48736846
Merge pull request #21135 from calixteman/bug2033603
[HCM] Set the correct color for the icon in the merge button when focused with the keyboard (bug 2033603)
2026-04-21 20:21:12 +02:00
Tim van der Meij
e070944ff0
Merge pull request #21131 from Snuffleupagus/fix-CopyLocalImage-unittests
Improve the "CopyLocalImage" unit-tests
2026-04-21 20:18:40 +02:00
Calixte Denizet
9bfad05173 [HCM] Set the correct color for the icon in the merge button when focused with the keyboard (bug 2033603) 2026-04-21 19:24:21 +02:00
calixteman
56d730e975
Merge pull request #21125 from calixteman/reftest_coverage
Add code coverage support for browser/ref tests
2026-04-21 15:00:48 +02:00
calixteman
bb0a50a744
Merge pull request #21134 from mozilla/update-locales
l10n: Update locale files
2026-04-21 14:59:38 +02:00
github-actions[bot]
9f4b7f8241 l10n: Update locale files 2026-04-21 12:47:21 +00:00
calixteman
f065a91aa1
Merge pull request #21133 from calixteman/sync_l10n_app
Use a gh app for making the PR to update l10n data
2026-04-21 14:46:17 +02:00
Calixte Denizet
9eb40abbae
Use a gh app for making the PR to update l10n data
It should help to avoid having the subsequent workflows being stuck.
2026-04-21 14:40:10 +02:00
Jonas Jenwald
676f7fe6b3
Merge pull request #21130 from nicolo-ribaudo/clenaup-test
Fix unit test for dependency tracking
2026-04-21 12:36:27 +02:00
Nicolò Ribaudo
f7725254f3
Fix unit test for dependency tracking
Follow up to PR #21102
2026-04-21 11:48:18 +02:00
Jonas Jenwald
b01eeaf8e1 Improve the "CopyLocalImage" unit-tests
Rather than relying on the time it takes to parse/render the pages, which leads to intermittent failures, add a test-only property and use it to check if the "CopyLocalImage" code-path was exercised.
2026-04-21 11:43:08 +02:00
calixteman
3aab546524 Add code coverage support for browser/ref tests
Instrument JS files on-the-fly via babel-plugin-istanbul when --coverage
or --coverage-per-test is passed, producing an aggregate lcov/HTML report
at the end of the run. A persistent PDFWorker accumulates worker-thread
coverage alongside the main-thread coverage, collected via a new
GetWorkerCoverage message handler.

With --coverage-per-test, an inverted index
(build/coverage/per-test-index.json) is also built as tests run, mapping
each hit source line and function name to the numeric IDs of the tests
that exercised it, keeping the output compact. The new
`gulp test_search --code=file::line_or_function` tool queries the index,
and passing --code to browsertest pre-filters the test run to only those
tests.

Coverage output formats are selectable via --coverage-formats (default:
info; also accepts html, json, text, cobertura, clover).
2026-04-20 21:46:18 +02:00
Tim van der Meij
ab85b7f0ff
Merge pull request #21128 from calixteman/bug2025109
Remove user and password from URLs (bug 2025109)
2026-04-20 21:21:29 +02:00
Calixte Denizet
8ddbeda4a0
Remove user and password from URLs (bug 2025109) 2026-04-20 20:53:24 +02:00
Tim van der Meij
badebcca00
Merge pull request #21127 from calixteman/issue21126
Correctly compute the bbox when simplifying the path construction
2026-04-20 20:48:24 +02:00
Calixte Denizet
db89d3a0e6 Correctly compute the bbox when simplifying the path construction
It fixes #21126.
2026-04-20 18:42:09 +02:00
Tim van der Meij
3ccb263857
Merge pull request #21123 from timvandermeij/fix-unit-test-commonobjs
Fix the `gets text content, with correct properties (issue 8276)` unit test
2026-04-19 20:19:05 +02:00
Tim van der Meij
801236f8c4
Fix the gets text content, with correct properties (issue 8276) unit test
This unit test failed consistently in Firefox both locally and on GitHub
Actions (but not in Chrome or on the bots), which suggests a timing issue.

Since all other unit tests that rely on `commonObjs` actually render the
page, most likely to make sure that `commonObjs` is fully populated at
the time of the check, this commit mirrors that approach to this test,
which indeed fixes the issue.
2026-04-19 19:09:43 +02:00
calixteman
92f862bae9
Merge pull request #21115 from calixteman/improve_reftest_perfs2
Improve reftest runner memory usage and load balancing
2026-04-18 23:07:57 +02:00
Calixte Denizet
7810cee005
Improve reftest runner memory usage and load balancing
Replace manifest slicing with a dynamic task queue: drivers request tasks
on demand via WebSocket so parallel sessions self-balance naturally.

Start reading reference PNGs from disk as soon as a task is dispatched
(prefetchRefPngs) to overlap I/O with rendering. Release snapshot
buffers and task entries immediately after comparison, and copy WS
frame slices via Buffer.from() so the original frame buffer can be
GC'd.

Bump --max-old-space-size to 8192 MB as a workaround for a
Puppeteer/BiDi memory leak where data: URL strings accumulate in
BrowsingContext.#requests indefinitely:
  https://github.com/puppeteer/puppeteer/issues/14876
2026-04-18 22:33:31 +02:00
Tim van der Meij
78ba424dcf
Merge pull request #21118 from timvandermeij/actions-versions
Update GitHub workflow actions to the most recent versions
2026-04-18 19:38:27 +02:00
Tim van der Meij
657eba4139
Update GitHub workflow actions to the most recent versions
Moreover, we indicate the exact version that belongs to each commit
hash. This not only makes it easier to compare the hash against the
release tags in the actions repositories, but hopefully also makes it
easier for e.g. Dependabot to keep the comments up-to-date since not all
of them were correct and varying comment styles were in use. This commit
aligns all of them to a single `v{major}.{minor}.{patch}` style.
2026-04-18 19:01:51 +02:00
Tim van der Meij
7c2ef03202
Merge pull request #21117 from timvandermeij/updates
Update dependencies to the most recent versions
2026-04-18 18:15:54 +02:00
Tim van der Meij
a058acb34d
Fix vulnerability in the basic-ftp dependency
This patch is generated with `npm audit fix` and fixes
GHSA-rp42-5vxx-qpwr.
2026-04-18 16:09:56 +02:00
Tim van der Meij
ba2cc9c1e2
Update dependencies to the most recent versions 2026-04-18 16:07:10 +02:00
Tim van der Meij
c2a050432d
Merge pull request #21116 from Snuffleupagus/extractFontProgram-privateData-Map
Store the Type1 program `privateData` in a Map, rather than an Object
2026-04-18 13:53:47 +02:00
Jonas Jenwald
c155a86733 Store the Type1 program privateData in a Map, rather than an Object
This is nicer when checking if fields exist in `Type1Font.prototype.wrap`, and a couple of loops in that method are also "modernized" slightly.
2026-04-18 12:32:22 +02:00
calixteman
df863ae9c4
Merge pull request #21111 from calixteman/improve_reftest_perfs
Improve reftest runner performance
2026-04-17 08:54:07 +02:00
calixteman
1108c6088b
Merge pull request #21114 from mozilla/update-locales
l10n: Update locale files
2026-04-17 08:52:18 +02:00
github-actions[bot]
eb50166333 l10n: Update locale files 2026-04-17 00:39:40 +00:00
Calixte Denizet
b6fac76429 Improve reftest runner performance
- Replace base64/JSON POST image submission with binary WebSocket frames,
  avoiding base64 overhead and per-request HTTP costs; quit is also sent
  over the same WS channel to guarantee ordering
- Prefetch the next task's PDF in the worker while the current task is
  still rendering
- Use `getImageData` instead of `toBlob` for partial-test baseline
  comparison (synchronous, no encoding); only encode to PNG in master mode
- Disable bounce tracking protection in Firefox to prevent EBUSY errors
  from Puppeteer's profile cleanup on Windows
2026-04-16 22:58:50 +02:00
Jonas Jenwald
302b4cb008
Merge pull request #21112 from Snuffleupagus/createNameTable-TypedArray
Use TypedArrays in the `createNameTable` function
2026-04-16 22:48:52 +02:00
calixteman
7c5f7876e9
Merge pull request #21108 from calixteman/parallelize_browser_tests
Add an option -j XX for browser tests in order to set the number of jobs
2026-04-16 21:30:45 +02:00
Tim van der Meij
5ec6ab1ab8
Merge pull request #21104 from calixteman/fix_focus
Fix integration tests failing because the focus isn't on the right element
2026-04-16 20:02:50 +02:00
Jonas Jenwald
92a0a91046 Pre-compute the length of more intermediate tables in createCmapTable (PR 21103 follow-up)
With the exception of `glyphsIds` the length of the other segments can be trivially determined upfront, which is obvious in hindsight. This way unnecessary allocations can be avoided when building the "cmap" table.
2026-04-16 11:46:59 +02:00
Jonas Jenwald
0a4e8d024d Use TypedArrays in the createNameTable function 2026-04-16 11:46:57 +02:00
Jonas Jenwald
445cb9abf9
Merge pull request #21103 from Snuffleupagus/TrueTypeTableBuilder-2
Use TypedArrays in the `createCmapTable` function
2026-04-16 11:44:14 +02:00