Calixte Denizet
18a05354fb
Fix the label and tooltip on the paste buttons
2026-03-09 14:21:15 +01:00
calixteman
9d81fafa8c
Add a new internal viewer to explore the structure of PDF files.
...
The one from pdf.js.utils is a bit too old: a lot of bugs have been fixed
in the code that parses PDF files since then.
It's just an internal development tool, so it doesn't need to be perfect,
but it should be good enough to be useful.
2026-03-09 14:16:12 +01:00
calixteman
d5653a1f7c
Merge pull request #20646 from nicolo-ribaudo/allow-any-host
...
Add option allow external connections to `npx gulp server`
2026-03-09 11:37:22 +01:00
calixteman
4ef5ea9681
Merge pull request #20810 from calixteman/bug2010832
...
Add a UI to undo cut/delete and cancel a copy (bug 2021352, bug 2010832)
2026-03-09 11:36:37 +01:00
Nicolò Ribaudo
384f1af067
Add --host option npx gulp server
...
Using `0.0.0.0` instead of `localhost` allows connecting from other
devices, significantly simplifying testing on mobile devices.
This is controlled by the `--host` CLI flag and not enabled by
default, since allowing external connections comes with security
implications (e.g. when on a public network without a properly
configured firewall).
There might be reasons to want to listen on custom hostnames, but as
the most common usage will probably be `--host 0.0.0.0`, there is a
shorter alias `--host 0` for it.
2026-03-09 11:03:20 +01:00
Calixte Denizet
0e48c16c3c
Add a UI to undo cut/delete and cancel a copy (bug 2021352, bug 2010832)
...
This happens in a bar on top of the thumbnails sidebar.
The label depending on the selected thumbnails is fixed.
2026-03-09 10:44:11 +01:00
Jonas Jenwald
a1b769caea
Improve the validateRangeRequestCapabilities unit-tests
...
A number of these unit-tests didn't actually cover the intended code-paths, since many of them *accidentally* matched the "file size is smaller than two range requests"-check.
The patch also updates `validateRangeRequestCapabilities` to use return-value names that are consistent with the class fields used in the various stream implementations.
2026-03-08 18:28:50 +01:00
Jonas Jenwald
2598b0dcdd
Start using Blob.prototype.bytes() in the code-base
...
Note that this isn't motivated by the miniscule reduction in code-size, but rather by wanting to unblock using this newer feature; see https://developer.mozilla.org/en-US/docs/Web/API/Blob/bytes
2026-03-08 14:06:03 +01:00
Tim van der Meij
46f4bc805e
Merge pull request #20826 from calixteman/outline_se
...
Handle outline with Structure Element (SE) destination
2026-03-08 13:16:11 +01:00
calixteman
253ce6e323
Handle outline with Structure Element (SE) destination
2026-03-08 12:28:24 +01:00
Tim van der Meij
2ffd2e65dd
Merge pull request #20827 from Snuffleupagus/worker-DocProgress-contentLength
...
Ensure that `percent === NaN` is consistently reported by the `onProgress` callback
2026-03-08 10:58:29 +01:00
Tim van der Meij
43fd680f6a
Merge pull request #20825 from timvandermeij/updates
...
Update dependencies to the most recent versions
2026-03-08 10:56:33 +01:00
Jonas Jenwald
ddd69ce4e0
Remove the "DocProgress" loaded fallback from the getPdfManager function
...
Falling back to use the `loaded` byteLength if the server `contentLength` is unknown doesn't make a lot of sense, since it'd lead to the `onProgress` callback reporting `percent === 100` repeatedly while the document is loading despite that being obviously wrong.
Instead we'll now report `percent === NaN` in that case, thus showing the indeterminate progressBar, which seems more correct if the `contentLength` is unknown.
Please note that this code-path is normally not even reached, since streaming is enabled by default (applies e.g. to the Firefox PDF Viewer).
2026-03-08 10:22:01 +01:00
Jonas Jenwald
1f69cf964c
Ensure that percent === NaN is consistently reported by the onProgress callback
...
With these changes `0`, `NaN`, `null`, and `undefined` in the `total`-property all result in `percent === NaN` being reported by the callback, since previously e.g. `0` would result in `percent === 100` being reported unconditionally which doesn't make a lot of sense.
Also, remove the "indeterminate" loadingBar (in the viewer) if the `PDFDocumentLoadingTask` fails since there won't be any more data arriving and displaying the animation thus seems wrong.
2026-03-08 10:21:55 +01:00
Tim van der Meij
98dc351cfa
Merge pull request #20824 from calixteman/bug2015853
...
Add the possibility to merge/update acroforms when merging/extracting (bug 2015853)
2026-03-07 20:12:02 +01:00
calixteman
baf8647b1f
Add the possibility to merge/update acroforms when merging/extracting (bug 2015853)
2026-03-07 19:03:02 +01:00
Tim van der Meij
c7d345db76
Fix vulnerability in the underscore dependency
...
This patch is generated with `npm audit fix` and fixes CVE-2026-27601.
2026-03-07 19:02:23 +01:00
Tim van der Meij
57a8028ee2
Update dependencies to the most recent versions
2026-03-07 19:00:26 +01:00
Tim van der Meij
897e53838d
Merge pull request #20823 from Snuffleupagus/Response-bytes-more
...
Use `Response.prototype.bytes()` more in the code-base (PR 20651 follow-up)
2026-03-07 18:40:00 +01:00
Jonas Jenwald
0c514b008b
Use Response.prototype.bytes() more in the code-base (PR 20651 follow-up)
2026-03-07 15:50:36 +01:00
Jonas Jenwald
aaf9b3bad0
Merge pull request #20821 from Snuffleupagus/scripting-sumPrecise-upsert
...
Use `Math.sumPrecise` and `Map.prototype.getOrInsertComputed` in the scripting implementation
2026-03-07 14:09:23 +01:00
github-actions[bot]
1b8878d2d8
l10n: Update locale files
2026-03-07 12:46:58 +00:00
Jonas Jenwald
49e8240c19
Use Map.prototype.getOrInsertComputed in the scripting implementation
...
This adds a basic non-MOZCENTRAL polyfill for now, which we should be able to remove once the next QuickJS version is released; note the pending changelog at f1139494d1/Changelog (L7)
2026-03-07 13:19:40 +01:00
Jonas Jenwald
ca428aadae
Use Math.sumPrecise in the scripting implementation
...
This adds a *very basic* non-MOZCENTRAL polyfill for now, which we should be able to remove once the next QuickJS version is released; note the pending changelog at f1139494d1/Changelog (L8)
2026-03-07 13:19:40 +01:00
Tim van der Meij
d34a15e03f
Merge pull request #20662 from Snuffleupagus/getPdfManager-async-read
...
Convert the data reading in `getPdfManager` to be asynchronous
2026-03-07 13:16:22 +01:00
Tim van der Meij
d08e90b051
Merge pull request #20819 from calixteman/avoid_stuck_actions
...
Avoid to have stuck actions when running update_locales task
2026-03-07 13:11:08 +01:00
Tim van der Meij
a3a13f6041
Merge pull request #20820 from Snuffleupagus/createActionsMap-shorten
...
Shorten the `createActionsMap` helper in the `src/scripting_api/common.js` file
2026-03-07 13:09:16 +01:00
Jonas Jenwald
d236b517fe
Shorten the createActionsMap helper in the src/scripting_api/common.js file
2026-03-07 11:22:21 +01:00
Jonas Jenwald
d9b81b5199
Merge pull request #20818 from Snuffleupagus/JBig2-fixes
...
A couple of small JBig2 fixes
2026-03-06 16:04:03 +01:00
calixteman
99f1109d67
Merge pull request #20815 from mozilla/update-locales
...
l10n: Update locale files
2026-03-06 15:04:43 +01:00
calixteman
d618a2bc7e
Avoid to have stuck actions when running update_locales task
...
The task update_locales is using the GITHUB_TOKEN to push the changes to
the update-locales branch, but this token doesn't trigger other workflows (see [1]),
so we need to explicitly dispatch the required ones.
[1] https://github.com/orgs/community/discussions/26970#discussioncomment-3254152
2026-03-06 14:51:45 +01:00
Jonas Jenwald
efa13c5e2a
Don't duplicate the Jbig2Error exception
...
Let `src/core/jbig2_ccittFax_wasm.js` import the existing exception, rather than duplicate its code.
2026-03-06 12:04:08 +01:00
Jonas Jenwald
29362e6afb
Remove the JBig2CCITTFaxWasmImage instance when running clean-up
...
This follows the same pattern as the existing handling for the `JpxImage` instance.
2026-03-06 12:04:03 +01:00
Jonas Jenwald
7f4e29ed22
Change the "Terminate" worker-thread handler to an asynchronous function
...
This is a tiny bit shorter, which cannot hurt.
2026-03-06 11:24:12 +01:00
github-actions[bot]
182a2c7bad
l10n: Update locale files
2026-03-06 00:35:13 +00:00
Jonas Jenwald
e8ab3cb335
Convert the data reading in getPdfManager to be asynchronous
...
This is not only shorter, but (in my opinion) it also simplifies the code.
*Note:* In order to keep the *five* different `BasePDFStreamReader` implementations consistent, we purposely don't re-factor the `PDFWorkerStreamReader` class to support `for await...of` iteration.
2026-03-05 22:50:26 +01:00
calixteman
a4fcd830cc
Merge pull request #20774 from calixteman/rm_gulp_sourcemaps
...
Remove gulp-sourcemaps dependency which is unmaintained
2026-03-05 22:49:16 +01:00
calixteman
3a80ae47f9
Merge pull request #20800 from calixteman/bug2020731
...
Once a page has been deleted or pasted, make sure the focus stays in the sidebar (bug 2020731)
2026-03-05 22:47:27 +01:00
Calixte Denizet
064e6a8b1c
Remove gulp-sourcemaps dependency which is unmaintained
2026-03-05 22:28:44 +01:00
Tim van der Meij
688ae9b3e5
Merge pull request #20811 from calixteman/fix_xref
...
Add fetch** functions in the XRefWrapper
2026-03-05 22:02:08 +01:00
Calixte Denizet
d489ad0b5b
Once a page has been deleted or pasted, make sure the focus stays in the sidebar (bug 2020731)
2026-03-05 21:52:12 +01:00
Tim van der Meij
55fe04657b
Merge pull request #20812 from calixteman/context_menu_follow_up
...
Fix the event name in some integration tests (follow-up of #20788 )
2026-03-05 21:20:15 +01:00
Tim van der Meij
d3e04d29ac
Merge pull request #20798 from calixteman/bug2016437
...
Fix the position of the thumbnails on the last line (bug 2016437)
2026-03-05 21:19:39 +01:00
Tim van der Meij
01bc76e681
Merge pull request #20806 from Snuffleupagus/BinaryCMapStream-extends-Stream
...
Let `BinaryCMapStream` extend the `Stream` class
2026-03-05 20:43:37 +01:00
Tim van der Meij
7e48938009
Merge pull request #20799 from Snuffleupagus/readPostScriptTable-getString
...
Use `BaseStream.prototype.getString` in the `readPostScriptTable` function
2026-03-05 20:40:59 +01:00
Tim van der Meij
874ba23afc
Merge pull request #20802 from calixteman/rm_sidebar_resize_observer
...
Remove the sidebar resize observer when killing the UI
2026-03-05 20:39:28 +01:00
Tim van der Meij
f18f1ca119
Merge pull request #20778 from mozilla/dependabot/github_actions/actions/upload-artifact-7
...
Bump actions/upload-artifact from 6 to 7
2026-03-05 20:34:52 +01:00
Tim van der Meij
60a0e24605
Merge pull request #20792 from calixteman/bug2020758
...
Add some aria-labels to the paste button in order to know where the buttons are (bug 2020758)
2026-03-05 20:32:20 +01:00
Tim van der Meij
a8d1aa9db8
Merge pull request #20797 from calixteman/bug2020774
...
Fix few colors in the Manage menu in HCM (bug 2020774)
2026-03-05 20:29:44 +01:00
Tim van der Meij
2463f4dc73
Merge pull request #20794 from calixteman/bug2020737
...
Move the heading role on the sidebar label (bug 2020737)
2026-03-05 20:29:07 +01:00