Tim van der Meij
df23679bc6
Merge pull request #18079 from mozilla/revert-18019-safari-zoom-fix
...
Revert "Fix rendering problem when zooming on Safari" for causing bug 1895909
2024-05-13 16:45:03 +02:00
Jonas Jenwald
75a1955fd0
Revert "Fix rendering problem when zooming on Safari"
2024-05-13 16:14:38 +02:00
Tim van der Meij
d9cff1af04
Merge pull request #18069 from Snuffleupagus/rm-spaceWidth
...
Remove the unused `Font.prototype.spaceWidth` getter (PR 13424 follow-up)
2024-05-13 15:18:44 +02:00
Tim van der Meij
1c25e951a4
Merge pull request #18055 from Snuffleupagus/PDFViewer-signal
...
Remove event listeners with `signal` in web/pdf_viewer.js
2024-05-13 15:16:01 +02:00
Jonas Jenwald
4aee67227e
Remove the unused Font.prototype.spaceWidth
getter (PR 13424 follow-up)
...
This getter became unused in PR 13424, well over two years ago, and apparently none of us noticed that.
2024-05-11 11:50:51 +02:00
Jonas Jenwald
469738c1ce
Remove event listeners with signal
in web/pdf_viewer.js
2024-05-08 16:07:43 +02:00
Jonas Jenwald
b6765403a1
Merge pull request #18026 from Snuffleupagus/validate-more-getArray
...
Validate even more dictionary properties
2024-05-06 22:09:42 +02:00
Tim van der Meij
14e87469db
Merge pull request #18041 from timvandermeij/integration-tests-timeout-freetext
...
Remove most `waitForTimeout` usage from the freetext editor integration tests
2024-05-06 20:00:03 +02:00
calixteman
30d0e3a0ba
Merge pull request #18044 from calixteman/bug1894849
...
Avoid to aria-hide the structure tree (bug 1894849)
2024-05-06 19:56:59 +02:00
Tim van der Meij
bb743389aa
Use waitForSelector
instead of waitForFunction
for focus checks
...
This commit replaces `waitForFunction` calls that use
`document.activeElement` to wait for an element to get focus by simpler
`waitForSelector` expressions that use the `:focus` selector. Note that
we already use this in other tests, so this improves consistency too.
2024-05-06 19:35:37 +02:00
Tim van der Meij
5c5c107ec5
Remove most waitForTimeout
usage from the freetext editor integration tests
...
This commit replaces a `waitForTimeout` occurrence with an equivalent
`waitForSelector` expression, and removes two other `waitForTimeout`
occurrences that are obsolete because we already wait for an observable
event to trigger or class change to happen.
Note that the other `waitForTimeout` occurrences in this file are either
part of #17931 or remain until we find a good way to ensure that nothing
happened (because currently there is nothing we can await there).
2024-05-06 19:35:37 +02:00
Tim van der Meij
d79aaee62a
Merge pull request #18009 from nicolo-ribaudo/pin-node-21
...
Pin GitHub actions to Node.js 21
2024-05-06 14:47:56 +02:00
Jonas Jenwald
9b41bfc374
Introduce helper functions for parsing /Matrix and /BBox arrays
2024-05-03 22:37:50 +02:00
Jonas Jenwald
52f7ff155d
Validate even more dictionary properties
...
This checks primarily Arrays, but also some other properties, that we'll end up sending (sometimes indirectly) to the main-thread.
2024-05-03 22:37:14 +02:00
Calixte Denizet
7742c3eb63
Avoid to aria-hide the structure tree (bug 1894849)
...
If one ancestor of the structure tree has the attribute aria-hidden
then it's invisible for screen readers.
2024-05-03 14:39:43 +02:00
Jonas Jenwald
1b811ac113
Merge pull request #18034 from Snuffleupagus/FileSpec-filename-stripPath
...
[api-minor] Improve the `FileSpec` implementation
2024-05-03 09:03:17 +02:00
Jonas Jenwald
a790f2df5d
[api-minor] Remove the unused onlyStripPath
option from the getFilenameFromUrl
helper function
2024-05-03 08:29:41 +02:00
Jonas Jenwald
c419c8333b
Merge pull request #18037 from Snuffleupagus/validate-more-widths
...
Add even more validation of width-data (PR 18017 follow-up)
2024-05-02 14:41:02 +02:00
Tim van der Meij
2f7a4d555a
Merge pull request #18033 from Snuffleupagus/version-4.3
...
Bump library version to `4.3`
2024-05-02 14:38:54 +02:00
Jonas Jenwald
6c05f8b381
Add even more validation of width-data (PR 18017 follow-up)
...
I missed this case in PR 18017, sorry about that.
2024-05-02 11:24:15 +02:00
calixteman
33732ff2cb
Merge pull request #18035 from calixteman/rm_max_group_size
...
Remove the limit used to decided if a group canvas must be upscaled or not
2024-05-01 20:14:28 +02:00
Jonas Jenwald
2b69fb76ac
[api-minor] Improve the FileSpec
implementation
...
- Check that the `filename` is actually a string, before parsing it further.
- Use proper "shadowing" in the `filename` getter.
- Add a bit more validation of the data in `pickPlatformItem`.
- Last, but not least, return both the original `filename` and the (path stripped) variant needed in the display-layer and viewer.
2024-05-01 18:02:05 +02:00
Calixte Denizet
5c771628de
Remove the limit used to decided if a group canvas must be upscaled or not
...
It fixes issues #14982 and #14724 .
The main problem of upscaling a canvas is that it can induces some pixelation
(see issue #14724 ). So this patch is just removing the limit and as a side
effect it fixes issue #14982 .
As far as I can tell, in looking different profiles (especially some memory profile)
in using the Firefox profiler, I don't see any noticeable difference in term of
memory use.
2024-05-01 18:01:54 +02:00
Jonas Jenwald
16dbf5dcfd
Merge pull request #18031 from Snuffleupagus/issue-18030
...
[api-minor] Expose the /Desc-attribute of file attachments in the viewer (issue 18030)
2024-05-01 17:53:22 +02:00
Jonas Jenwald
3ff93ede07
Bump library version to 4.3
2024-05-01 17:00:14 +02:00
calixteman
96ce111e0c
Merge pull request #18029 from calixteman/simplify_smask
...
[api-minor] Remove the use of (get/put)ImageData when drawing SMasks (bug 1874013)
2024-05-01 16:12:43 +02:00
Calixte Denizet
82989e6790
[api-minor] Remove the use of (get/put)ImageData when drawing SMasks (bug 1874013)
...
and implement then in using some SVG filters and composition.
Composing in using destination-in in order to multiply RGB components by
the alpha from the mask isn't perfect: it'd be a way better to natively have
alpha masks support, it induces some small rounding errors and consequently
computed RGB are approximatively correct.
In term of performance, it's a real improvement, for example, the pdf in
issue #17779 is now rendered in few seconds.
There are still some room for improvement, but overall it should be a way
better.
2024-05-01 15:40:44 +02:00
Jonas Jenwald
bf4e36d1b5
[api-minor] Expose the /Desc-attribute of file attachments in the viewer (issue 18030)
...
In the viewer this will be displayed in the `title` of the hyperlink, which is probably the best we can do here given how the viewer is implemented.
2024-05-01 09:02:11 +02:00
Tim van der Meij
77e2182b8e
Merge pull request #18019 from Aditi-1400/safari-zoom-fix
...
Fix rendering problem when zooming on Safari
2024-04-30 14:50:46 +02:00
Tim van der Meij
716ac7eae8
Merge pull request #18024 from timvandermeij/updates
...
Update dependencies and translations to the most recent versions
2024-04-30 13:58:36 +02:00
Tim van der Meij
9dcb2b3844
Update translations to the most recent versions
2024-04-29 19:57:19 +02:00
Tim van der Meij
9872de1415
Upgrade postcss-discard-comments
to version 7.0.0
...
This is a major version bump, but the changelog at
https://github.com/cssnano/cssnano/releases/tag/cssnano%407.0.0
doesn't indicate any breaking changes that should impact us.
2024-04-29 19:55:38 +02:00
Tim van der Meij
89f41e527d
Update dependencies to the most recent versions
2024-04-29 19:52:37 +02:00
Tim van der Meij
1241758605
Merge pull request #18023 from timvandermeij/bump
...
Bump the stable version in `pdfjs.config`
2024-04-29 19:33:55 +02:00
Tim van der Meij
a6271e47b2
Bump the stable version in pdfjs.config
2024-04-29 19:30:03 +02:00
Tim van der Meij
49b388101a
Merge pull request #18001 from Snuffleupagus/api-pageRefCache
...
[api-minor] Move the page reference/number caching into the API
2024-04-29 19:10:06 +02:00
Jonas Jenwald
150964dd6d
Remove unnecessary check from PDFLinkService.goToDestination
(PR 17984 follow-up)
...
After the changes in PR 17984 this code can no longer be reached, since the destination is now validated on the worker-thread.
2024-04-29 18:54:09 +02:00
Jonas Jenwald
f6cd03955b
[api-minor] Move the page reference/number caching into the API
...
Rather than having to handle this *manually* throughout the viewer, this functionality can instead be moved into the API which simplifies the code slightly.
2024-04-29 18:54:06 +02:00
Jonas Jenwald
fa69d9a3bc
Inline the helper method in PDFLinkService.goToDestination
...
We no longer need the helper method to *potentially* call itself once data is available, and can instead take full advantage of async/await by inlining the code.
2024-04-29 18:52:12 +02:00
Tim van der Meij
3052e99f65
Merge pull request #18013 from Snuffleupagus/SimpleLinkService-extends-PDFLinkService
...
Re-factor `SimpleLinkService` to extend `PDFLinkService`
2024-04-29 18:41:53 +02:00
Jonas Jenwald
2b2ade7883
Merge pull request #18018 from Snuffleupagus/CompiledFont-tweak-caching
...
Reduce code-duplication when caching data in `CompiledFont.getPathJs`
2024-04-29 17:39:35 +02:00
Jonas Jenwald
627fe2d826
Merge pull request #18017 from Snuffleupagus/validate-widths
...
Add more validation of width-data
2024-04-29 14:17:23 +02:00
Aditi
04580168a2
Fix rendering problem when zooming on Safari
2024-04-29 17:32:06 +05:30
Jonas Jenwald
85ff8f34e2
Reduce code-duplication when caching data in CompiledFont.getPathJs
2024-04-29 13:18:31 +02:00
Jonas Jenwald
d411a072a4
Add more validation of width-data
...
The current `PartialEvaluator.extractWidths` implementation only contains *partial* validation of the width-data.
2024-04-29 10:51:16 +02:00
Jonas Jenwald
234067e745
Merge pull request #18014 from Snuffleupagus/validate-font-properties
...
Validate additional font-dictionary properties
2024-04-29 10:01:48 +02:00
Jonas Jenwald
08eb0566f7
Validate additional font-dictionary properties
2024-04-29 08:21:28 +02:00
calixteman
85e64b5c16
Merge pull request #18015 from calixteman/rm_eval_font_loader
...
Simplify the way to pass the glyph drawing instructions from the worker to the main thread
2024-04-28 23:27:47 +02:00
Jonas Jenwald
8c3d571939
Re-factor SimpleLinkService
to extend PDFLinkService
...
Rather than having to maintain a dummy `IPDFLinkService` implementation, we can simply let it extend the primary `PDFLinkService` class instead.
Note how *some* methods already checked for an active PDF document, and those checks only needed to be used consistently throughout `PDFLinkService` in order for this to work.
2024-04-28 10:18:41 +02:00
Calixte Denizet
551e63901c
Simplify the way to pass the glyph drawing instructions from the worker to the main thread
...
and remove the use of eval in the font loader.
2024-04-27 21:28:31 +02:00