21743 Commits

Author SHA1 Message Date
Jonas Jenwald
c7bdf5b508 Use Map.prototype.getOrInsertComputed() in the ensureDebugMetadata helper
Also, shorten the function by using optional chaining.
2026-02-21 12:02:45 +01:00
calixteman
f548a159d6
Merge pull request #20698 from calixteman/image_utils_test
Add some unit tests for functions in image_utils.js
2026-02-20 22:58:22 +01:00
Calixte Denizet
0bb59f15cb
Add some unit tests for functions in image_utils.js 2026-02-20 22:43:42 +01:00
Tim van der Meij
aaf3ad5a4e
Merge pull request #20688 from calixteman/coverage_font_test
Add code coverage for font tests
2026-02-20 22:13:57 +01:00
Tim van der Meij
e07e8ed172
Merge pull request #20690 from Snuffleupagus/getPdfFilenameFromUrl-searchParams-findLast
Reduce duplication when parsing `searchParams` in the `getPdfFilenameFromUrl` function
2026-02-20 21:42:48 +01:00
Tim van der Meij
6f0d8d561f
Merge pull request #20695 from calixteman/bug2018125
Update the page count in the UI when some changes are done (bug 2018125)
2026-02-20 21:40:16 +01:00
Tim van der Meij
82de22428a
Merge pull request #20660 from Snuffleupagus/ChunkedStream-async-sendRequest
Convert `ChunkedStreamManager.prototype.sendRequest` to an asynchronous method
2026-02-20 21:39:26 +01:00
Tim van der Meij
b2cf54353c
Merge pull request #20693 from calixteman/bug2016321
Fix the style of the thumbnails in HCM (bug 2016491, bug 2016321, bug 2016323, bug 2016827)
2026-02-20 20:44:53 +01:00
Tim van der Meij
12ec25c9a7
Merge pull request #20694 from calixteman/bug2018134
Fix the menu dimensions when on of the item is too long (bug 2018134)
2026-02-20 20:41:43 +01:00
Tim van der Meij
f395042b8d
Merge pull request #20692 from Snuffleupagus/debugger-findIndex
Replace the `getStatIndex` helper, in `web/debugger.mjs`, with native functionality
2026-02-20 20:33:00 +01:00
Tim van der Meij
e87019ec04
Merge pull request #20686 from calixteman/bug2016311
Fix the color of the arrow on buttons when hovering in HCM (bug 2016311)
2026-02-20 20:31:25 +01:00
Calixte Denizet
bd3f14f62d
Update the page count in the UI when some changes are done (bug 2018125) 2026-02-20 18:06:48 +01:00
calixteman
a5c62b7489
Merge pull request #20691 from Snuffleupagus/rm-unnecessary-Map-entries
Remove unnecessary `Map.prototype.entries()` usage
2026-02-20 17:44:19 +01:00
calixteman
970717a732
Merge pull request #20684 from Snuffleupagus/src-rm-constructors
Remove unnecessary class constructors in the `src` folder
2026-02-20 17:43:18 +01:00
calixteman
34ba2064e6
Merge pull request #20661 from timvandermeij/updates
Update dependencies and translations to the most recent versions, and upgrade most packages to new major versions
2026-02-20 17:41:58 +01:00
Calixte Denizet
bff6f4cc01
Fix the style of the thumbnails in HCM (bug 2016491, bug 2016321, bug 2016323, bug 2016827) 2026-02-20 17:30:40 +01:00
Calixte Denizet
55448fd01c
Fix the menu dimensions when on of the item is too long (bug 2018134) 2026-02-20 17:19:31 +01:00
Jonas Jenwald
06e7f308fd Replace the getStatIndex helper, in web/debugger.mjs, with native functionality
This code is old enough that it predates the existence of `Array.prototype.findIndex()`, hence why a helper function was originally needed.
2026-02-20 14:09:20 +01:00
Jonas Jenwald
374f524c29 Remove unnecessary Map.prototype.entries() usage
A `Map` instance can be iterated directly with a `for...of` loop, hence using its `entries` method is not actually necessary.
2026-02-20 13:44:00 +01:00
Jonas Jenwald
34f27187f8 Reduce duplication when parsing searchParams in the getPdfFilenameFromUrl function
Currently we essentially "duplicate" the same code for parsing the `values` and `keys` of the `searchParams`, which seems a little unnecessary.

To be able to parse the `searchParams` from the end, we currently create an Array (from the Iterator) and then reverse it before finally looping through it. Here the latter two steps can be replaced with the `Array.prototype.findLast()` method instead.

*Please note:* I completely understand if this patch is rejected, on account of being less readable than the current code.
2026-02-19 17:37:12 +01:00
Jonas Jenwald
7fd939763e Remove unnecessary class constructors in the src folder
There's a number of classes where the constructors can be removed completely by instead using class fields, which help to slightly shorten the code.

It seems that `unicorn/prefer-class-fields` ESLint plugin, see PR 20657, unfortunately isn't able to detect all of these cases.
2026-02-19 00:08:57 +01:00
Jonas Jenwald
74ab1a98a6
Merge pull request #20685 from Snuffleupagus/Annotation-set-annotationType
Set the `annotationType` automatically in the `Annotation` constructor
2026-02-19 00:03:37 +01:00
calixteman
e2af2b83c3
Add code coverage for font tests 2026-02-18 22:00:45 +01:00
Calixte Denizet
0dcc96a09d
Fix the color of the arrow on buttons when hovering in HCM (bug 2016311) 2026-02-18 20:04:44 +01:00
calixteman
30ed527a80
Merge pull request #20677 from calixteman/bug2016007
Add the possibility to navigate with the keyboard to go from a checkbox to an other in the thumbnail view (bug 2016007)
2026-02-18 19:56:09 +01:00
Calixte Denizet
0149527a4b
Add the possibility to navigate with the keyboard to go from a checkbox to an other in the thumbnail view (bug 2016007) 2026-02-18 18:35:54 +01:00
calixteman
f609ee8a0c
Merge pull request #20670 from calixteman/reorg_delete
Add support for deleting, cutting, copying and pasting pages (bug 2010830, 2010831)
2026-02-18 17:52:35 +01:00
Calixte Denizet
d755fba96a
Add support for deleting, cutting, copying and pasting pages (bug 2010830, 2010831) 2026-02-18 16:43:00 +01:00
calixteman
e331d458cb
Merge pull request #20679 from calixteman/bug2016142
Add an aria-label to the sidebar resizer (bug 2016142)
2026-02-18 16:33:53 +01:00
calixteman
6b1b94e7d4
Merge pull request #20681 from calixteman/bug2016212
Correctly handle tab/page down when on a menu (bug 2016212)
2026-02-18 15:39:53 +01:00
Jonas Jenwald
e1cc24c595 Set the annotationType automatically in the Annotation constructor
Rather than assigning it manually in every extending class, we can utilize the fact that the `AnnotationType`-entries are simply the upper-case version of the `/Subtype` (when it exists) in the Annotation dictionary.
2026-02-18 14:47:42 +01:00
Calixte Denizet
5290534c53
Correctly handle tab/page down when on a menu (bug 2016212) 2026-02-18 10:17:39 +01:00
calixteman
61de56440a
Merge pull request #20678 from calixteman/bug2016136
Add an aria-label to the checkboxes in the thumbnails view (bug 2016136)
2026-02-18 10:14:36 +01:00
Jonas Jenwald
3a32ca7e69
Merge pull request #20682 from Snuffleupagus/CanvasGraphics-rm-unused-props
Remove unused `CanvasGraphics` properties (PR 700 follow-up)
2026-02-17 22:38:33 +01:00
Jonas Jenwald
336cda0c64 Remove unused CanvasGraphics properties (PR 700 follow-up)
These are probably a copy-and-paste mistake, since they appear to have been unused already in PR 700 all the way back in 2011.
2026-02-17 21:36:08 +01:00
Calixte Denizet
65f1b9b95b
Add an aria-label to the checkboxes in the thumbnails view (bug 2016136) 2026-02-17 20:58:10 +01:00
Tim van der Meij
cfc93e2606
Merge pull request #20665 from calixteman/fix_coverage
Fix code coverage line mapping
2026-02-17 20:16:41 +01:00
Tim van der Meij
178261a813
Merge pull request #20463 from matt-atticus/fix-text-selection-under-search-highlight
fix: support text selection under search highlights
2026-02-17 20:03:42 +01:00
Tim van der Meij
5084e3d0ec
Merge pull request #20675 from calixteman/bug2015916
Fix the keyboard accessibility of the manage button in the thumbnails view (bug 2015916)
2026-02-17 20:03:19 +01:00
Calixte Denizet
f4a2fd60db
Fix the keyboard accessibility of the manage button in the thumbnails view (bug 2015916) 2026-02-17 19:00:20 +01:00
Jonas Jenwald
fe44bac6ef
Merge pull request #20673 from Snuffleupagus/PDFObjects-Map
Convert the `PDFObjects` class to use a `Map` internally
2026-02-17 13:54:48 +01:00
Calixte Denizet
167dc5a415
Add an aria-label to the sidebar resizer (bug 2016142) 2026-02-17 13:38:56 +01:00
Jonas Jenwald
6323afab46 Convert the PDFObjects class to use a Map internally
This patch also adds unconditional `Map.prototype.getOrInsertComputed()` usage, which should be fine since it's [supported in the latest browsers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/getOrInsertComputed#browser_compatibility) and it'll be polyfilled (via core-js) in the `legacy` builds.
2026-02-17 09:42:27 +01:00
Matthew Lawrence
f01e4d477e fix: prevent search highlights from interfering with drag-selection 2026-02-17 13:46:02 +11:00
Jonas Jenwald
62ac1b844a
Merge pull request #20669 from Snuffleupagus/decode-truncate
Truncate too long /Decode map entries (issue 20668)
2026-02-16 20:39:12 +01:00
Jonas Jenwald
8319fff9b6
Merge pull request #20663 from Snuffleupagus/xref-rm-Object-hasOwn
Remove `Object.hasOwn` usage from the `src/core/xref.js` file
2026-02-16 20:38:18 +01:00
Jonas Jenwald
31b4612ac0 Truncate too long /Decode map entries (issue 20668) 2026-02-16 16:22:00 +01:00
calixteman
2b57ef4b56
Fix code coverage line mapping
When checking the code coverage report, it was noticed that the line numbers were off.
It was due to the fact that the files used for coverage were the transpiled ones,
when the ones used by Codecov were the original ones.
So this patches adds the source maps to the transpiled files, and also updates
the license header in the original files in using a babel plugin in order
to make sure the line numbers are correct.
As a side effect of this work, it's now possible to have the correct line
numbers in the stack traces when running tests with the transpiled files.
2026-02-15 23:03:07 +01:00
Jonas Jenwald
0a9176422e Remove Object.hasOwn usage from the src/core/xref.js file
This should not be necessary, given the following checks done early during the worker initialization: c5746949ac/src/core/worker.js (L124-L141)
2026-02-15 16:39:39 +01:00
Tim van der Meij
b27caa0f7b
Upgrade @csstools/postcss-light-dark-function to version 3.0.0
This is a major version bump, but the changelog at
https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-light-dark-function/CHANGELOG.md
doesn't indicate any breaking changes that should impact us.

We only have to list `@csstools/postcss-light-dark-function` in
`eslint.config.js` similar to e.g. commit a2909f9b.
2026-02-14 20:15:30 +01:00