22128 Commits

Author SHA1 Message Date
Tim van der Meij
68663bba7f
Merge pull request #20942 from calixteman/fix_update_local
Make persist-credentials: true in the update_locale action
2026-03-22 12:00:50 +01:00
calixteman
60de323514
Make persist-credentials: true in the update_locale action 2026-03-21 22:08:02 +01:00
calixteman
918a319de6
Merge pull request #20885 from calixteman/gouraud_gpu
Implement Gouraud-based shading using WebGPU.
2026-03-21 15:18:56 +01:00
calixteman
86441e9eb8
Implement Gouraud-based shading using WebGPU.
The WebGPU feature hasn't been released yet but it's interesting to see how
we can use it in order to speed up the rendering of some objects.
This patch allows to render mesh patterns using WebGPU.

I didn't see any significant performance improvement on my machine (mac M2)
but it may be different on other platforms.
2026-03-21 14:34:32 +01:00
Tim van der Meij
5cb8f222d8
Merge pull request #20882 from timvandermeij/remove-xfatest
Remove the `xfatest` command
2026-03-21 14:07:32 +01:00
Tim van der Meij
a90215da48
Merge pull request #20933 from calixteman/issue20930
Fix charSpacing in vertical mode
2026-03-21 13:56:05 +01:00
Tim van der Meij
d66629376e
Merge pull request #20934 from Snuffleupagus/fix-TextLayerBuilder-abortSignal
Ensure that `TextLayerBuilder` works correctly without the `abortSignal` parameter (PR 20928 follow-up)
2026-03-21 13:48:02 +01:00
calixteman
b6c9b12de0
Merge pull request #20936 from Snuffleupagus/debugger-getPageIndex
[Debugger] Allow debugging page-rendering from the /Ref, in addition to the page number
2026-03-21 13:45:39 +01:00
Jonas Jenwald
4c0504460f [Debugger] Allow debugging page-rendering from the /Ref, in addition to the pageNumber
Currently it's only possible to trigger page-render debugging through the page number, but when looking at the /Pages tree it's often not immediately obvious what the page number actually is.
However, the /Ref of the page is directly available and it's thus handy to be able to use that one instead to enable page-render debugging.
2026-03-21 12:06:30 +01:00
Jonas Jenwald
ba796a3441 Ensure that TextLayerBuilder works correctly without the abortSignal parameter (PR 20928 follow-up)
After the changes in PR 20928 the code no longer works correctly unless the `abortSignal` parameter is provided, which completely breaks text-selection in e.g. the standalone viewer-components with errors such as:
```
 #renderTextLayer: TypeError: EventTarget.addEventListener: 'signal' member of AddEventListenerOptions is not an object.
    #bindMouse http://localhost:8888/web/text_layer_builder.js:173
    render http://localhost:8888/web/text_layer_builder.js:128
    #renderTextLayer http://localhost:8888/web/pdf_page_view.js:532
    resultPromise http://localhost:8888/web/pdf_page_view.js:1184
    promise callback*draw http://localhost:8888/web/pdf_page_view.js:1174
    renderView http://localhost:8888/web/pdf_rendering_queue.js:219
    forceRendering http://localhost:8888/web/pdf_viewer.js:2081
    promise callback*forceRendering http://localhost:8888/web/pdf_viewer.js:2080
    renderHighestPriority http://localhost:8888/web/pdf_rendering_queue.js:84
    update http://localhost:8888/web/pdf_viewer.js:1895
    onScaleChanging http://localhost:8888/web/app.js:2755
    dispatch http://localhost:8888/web/event_utils.js:115
    #setScaleUpdatePages http://localhost:8888/web/pdf_viewer.js:1555
    #setScale http://localhost:8888/web/pdf_viewer.js:1640
    set currentScaleValue http://localhost:8888/web/pdf_viewer.js:592
    setInitialView http://localhost:8888/web/app.js:1969
    load http://localhost:8888/web/app.js:1570
    promise callback*load/< http://localhost:8888/web/app.js:1518
    promise callback*load http://localhost:8888/web/app.js:1507
    open http://localhost:8888/web/app.js:1255
    promise callback*open http://localhost:8888/web/app.js:1253
    run http://localhost:8888/web/app.js:895
    webViewerLoad http://localhost:8888/web/viewer.js:366
    <anonymous> http://localhost:8888/web/viewer.js:377
pdf_page_view.js:547:15
```
2026-03-20 23:22:11 +01:00
Calixte Denizet
eaa5eca73d Fix charSpacing in vertical mode
It fixes #20930.
And use the defaultVMetrics (coming from DW2 property) in the font.
2026-03-20 23:09:03 +01:00
calixteman
e577141154
Merge pull request #20906 from calixteman/debugger_text
Add the possibility to debug only text rendering by filtering the op list.
2026-03-20 22:39:18 +01:00
calixteman
cf3b3fa900 Add the possibility to debug only text rendering by filtering the op list.
And a specific view for inspecting font information and the text layer on top of the canvas.
2026-03-20 22:28:34 +01:00
Tim van der Meij
f51419854f
Remove the xfatest command
The XFA development work has been completed, with mostly regular
maintance/bugfixing remaining, so while this special-casing for the
tests made sense at the time we should now be able to remove it (see also
https://github.com/mozilla/pdf.js/issues/11851#issuecomment-2419790237).
2026-03-20 20:17:13 +01:00
Tim van der Meij
ab228da9ce
Merge pull request #20931 from Snuffleupagus/rm-factory-name-validation
Remove explicit `name`/`filename` validation in the `BaseCMapReaderFactory`, `BaseStandardFontDataFactory`, and `BaseWasmFactory` classes
2026-03-20 20:15:23 +01:00
Tim van der Meij
0dd1556f47
Merge pull request #20880 from timvandermeij/disable-reorder-test
Skip the "should reorder thumbnails after dropping two adjacent pages" integration test
2026-03-20 20:13:36 +01:00
calixteman
977e4f2c4a
Merge pull request #20928 from calixteman/pass_global_signal_text_layer
Pass the global signal the text layer builder in order to remove all the listeners defined here
2026-03-20 18:36:25 +01:00
calixteman
5a240f7802
Merge pull request #20932 from calixteman/bug2023150
Trigger the current find after a page has been moved (bug 2023150)
2026-03-20 18:07:24 +01:00
Calixte Denizet
e1f02be670
Pass the global signal the text layer builder in order to remove all the listeners defined here
The goal of this patch is to remove the noice we've in the logs:
```
 0:09.36 INFO Console message: [JavaScript Warning: "Script terminated by timeout at:
reset@resource://pdf.js/web/viewer.mjs:11773:7
EventListener.handleEvent*#enableGlobalSelectionListener@resource://pdf.js/web/viewer.mjs:11787:12
render@resource://pdf.js/web/viewer.mjs:11716:20
async*#renderTextLayer@resource://pdf.js/web/viewer.mjs:12108:28
draw/resultPromise<@resource://pdf.js/web/viewer.mjs:12575:53
promise callback*draw@resource://pdf.js/web/viewer.mjs:12570:8
renderView@resource://pdf.js/web/viewer.mjs:7872:14
forceRendering/<@resource://pdf.js/web/viewer.mjs:13963:29
" {file: "resource://pdf.js/web/viewer.mjs" line: 11773}]
```
2026-03-20 18:06:39 +01:00
calixteman
5bdeb79b09
Merge pull request #20926 from calixteman/bug2022516
Correctly focus the pasted page (bug 2022516)
2026-03-20 17:47:02 +01:00
calixteman
dabb2b960d
Merge pull request #20927 from Snuffleupagus/Firefox-enforce-worker-binary-fetch
[Firefox] Ensure that worker-thread fetching is used for built-in CMap, standard font, and wasm data
2026-03-20 17:45:43 +01:00
calixteman
2c5812006a
Merge pull request #20929 from calixteman/bug2022481
Add the basic telemetry for Organize feature (bug 2022481)
2026-03-20 17:44:19 +01:00
Jonas Jenwald
652822bef0 [Firefox] Ensure that worker-thread fetching is used for built-in CMap, standard font, and wasm data
Given that we "forcibly" set `useWorkerFetch = true` for the MOZCENTRAL build-target there's a small amount of dead code as a result, which we can thus remove during building.
2026-03-20 16:58:57 +01:00
calixteman
16aee06aac
Merge pull request #20925 from calixteman/reorganize_save_annotations
Add the possibility to save added annotations when reorganizing a pdf (bug 2023086)
2026-03-20 16:32:10 +01:00
calixteman
504505b8c3
Merge pull request #20924 from calixteman/fix_null_ref
Avoid getting null value in RefSet when cloning
2026-03-20 16:31:01 +01:00
calixteman
0617e3e95f
Merge pull request #20923 from calixteman/bug2023138
Make sure the menuitems are readable when hovering them (bug 2023138)
2026-03-20 16:30:34 +01:00
Calixte Denizet
118228480b Trigger the current find after a page has been moved (bug 2023150) 2026-03-20 16:22:53 +01:00
Jonas Jenwald
5299eb2b83 Remove explicit name/filename validation in the BaseCMapReaderFactory, BaseStandardFontDataFactory, and BaseWasmFactory classes
Given that these classes are only used from the "FetchBinaryData" message handler, the `name`/`filename` parameters should never actually be missing and if they are that's a bug elsewhere in the code-base.
Furthermore a missing `name`/`filename` parameter would result in a "nonsense" URL and the actual data fetching would then fail instead, hence keeping this old validation code just doesn't seem necessary.
2026-03-20 15:50:26 +01:00
Calixte Denizet
008181a43e
Add the basic telemetry for Organize feature (bug 2022481) 2026-03-20 14:33:55 +01:00
Calixte Denizet
4aee2e8f2c Correctly focus the pasted page (bug 2022516) 2026-03-20 11:39:57 +01:00
Calixte Denizet
04272de41d
Add the possibility to save added annotations when reorganizing a pdf (bug 2023086) 2026-03-20 10:55:47 +01:00
Calixte Denizet
c17801b77e Avoid getting null value in RefSet when cloning 2026-03-20 10:41:58 +01:00
Calixte Denizet
1db3774540 Make sure the menuitems are readable when hovering them (bug 2023138)
Simplify a bit the html for the menu: remove the li elements.
Make sure the the menuitems are exposed when disabled.
2026-03-20 10:01:45 +01:00
Tim van der Meij
da1f42c03c
Skip the "should reorder thumbnails after dropping two adjacent pages" integration test
This is a temporary measure to reduce noise until #20814 is fixed.
2026-03-19 21:48:33 +01:00
Tim van der Meij
ff1af5a058
Merge pull request #20916 from calixteman/fix_co
When merging pdfs, fix the CO after the fields have been cloned
2026-03-19 21:22:43 +01:00
Tim van der Meij
6245bb201c
Merge pull request #20915 from calixteman/fix_pageindice
Avoid to use a used slot when looking for a new page position
2026-03-19 21:22:32 +01:00
Tim van der Meij
8cae5d17f2
Merge pull request #20917 from calixteman/fix_dup_name_dest
Fix the destination names when they're duplicated
2026-03-19 21:22:19 +01:00
Tim van der Meij
746e6b419d
Merge pull request #20901 from Snuffleupagus/Dict-private-map
Convert the internal `Map` to a properly private field in the `Dict` class
2026-03-19 20:57:13 +01:00
Tim van der Meij
083735b40f
Merge pull request #20920 from Snuffleupagus/Jasmine-toBeInstanceOf
Use `toBeInstanceOf` consistently in the unit-tests
2026-03-19 20:54:36 +01:00
Tim van der Meij
9151b69665
Merge pull request #20922 from mozilla/dependabot/npm_and_yarn/fast-xml-parser-5.5.7
Bump fast-xml-parser from 5.5.6 to 5.5.7
2026-03-19 20:53:30 +01:00
Tim van der Meij
ed02b7313c
Merge pull request #20921 from mozilla/dependabot/npm_and_yarn/flatted-3.4.2
Bump flatted from 3.4.1 to 3.4.2
2026-03-19 20:52:57 +01:00
dependabot[bot]
281761d07d
Bump fast-xml-parser from 5.5.6 to 5.5.7
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) from 5.5.6 to 5.5.7.
- [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.6...v5.5.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 19:47:38 +00:00
dependabot[bot]
9cf2718a69
Bump flatted from 3.4.1 to 3.4.2
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.4.1 to 3.4.2.
- [Commits](https://github.com/WebReflection/flatted/compare/v3.4.1...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-19 19:44:37 +00:00
Tim van der Meij
cdb476b3ab
Merge pull request #20908 from mozilla/dependabot/npm_and_yarn/fast-xml-parser-5.5.6
Bump fast-xml-parser from 5.5.5 to 5.5.6
2026-03-19 20:43:23 +01:00
Jonas Jenwald
7609a42209 Use toBeInstanceOf consistently in the unit-tests
There's currently a lot of unit-tests that manually check `instanceof`, let's replace that with the built-in Jasmine matcher function; see https://jasmine.github.io/api/edge/matchers.html#toBeInstanceOf
2026-03-19 17:18:25 +01:00
Calixte Denizet
cf67c1ef1e
Fix the destination names when they're duplicated 2026-03-19 10:52:39 +01:00
Calixte Denizet
b7da4b80a9
When merging pdfs, fix the CO after the fields have been cloned 2026-03-19 10:09:40 +01:00
Calixte Denizet
0bee641fed
Avoid to use a used slot when looking for a new page position 2026-03-19 09:40:16 +01:00
Jonas Jenwald
e52f2d1d67 Convert the internal Map to a properly private field in the Dict class 2026-03-19 09:36:29 +01:00
Jonas Jenwald
6c6bb19324 Use proper access methods in Dict.merge, rather than modifying the _map field manually 2026-03-19 09:36:29 +01:00