Calixte Denizet
d5a0e557c2
[Editor] Fix undoing an editor deletion (bug 1886959)
...
The original bug was because the parent was null when trying to show
an highlight annotation which led to an exception.
That led me to think about having some null/non-null parent when removing
an editor: it's a mess especially if a destroyed parent is still attached
to an editor. Consequently, this patch always sets the parent to null when
deleting the editor.
2024-03-25 14:17:40 +01:00
Calixte Denizet
a520ad4633
Add alternative text to annotation if any
2024-03-25 13:35:54 +01:00
calixteman
b0f54b2235
Merge pull request #17831 from calixteman/puppeteer_22_6_0
...
Update puppeteer to 22.6.0
2024-03-24 12:46:37 +01:00
Jonas Jenwald
dc0df0a3c2
Update the Path2D
polyfill for Node.js environments
...
The polyfill that we use was recently split into two packages, and it now consists of a "core" package and a browser-specific package that build upon the former.
Hence we need to update to use the "core" package, and slightly tweak the code that loads/initializes the polyfill; see also https://www.npmjs.com/package/path2d
This patch was tested successfully with the [pdf2png example](https://github.com/mozilla/pdf.js/tree/master/examples/node/pdf2png ), after running `gulp dist-install` locally, using [this PDF document](https://bug810214.bmoattachments.org/attachment.cgi?id=9254990 ) which contains Type3-fonts that render using `Path2D`.
2024-03-24 12:09:21 +01:00
calixteman
14307c04dd
Merge pull request #17825 from calixteman/bug1886964
...
[Editor] Add a label to the highight floating button readable with NVDA (bug 1886964)
2024-03-23 18:30:42 +01:00
Calixte Denizet
b7f3c78d01
Update puppeteer to 22.6.0
2024-03-23 16:22:51 +01:00
Calixte Denizet
63c1c787b4
[Editor] Add a label to the highight floating button readable with NVDA (bug 1886964)
2024-03-23 16:12:03 +01:00
Tim van der Meij
e7203f558f
Merge pull request #17813 from Snuffleupagus/initPassiveLoading-simplify
...
Remove `PDFViewerApplication.initPassiveLoading` and directly invoke the `open`-method from the extension-specific code
2024-03-22 10:02:51 +01:00
Jonas Jenwald
067c49dc49
Merge pull request #17818 from Snuffleupagus/updatePrefs
...
Allow listening for preference changes in the Firefox PDF viewer (bug 1886586)
2024-03-21 19:02:25 +01:00
Jonas Jenwald
44427fa7b2
Allow listening for preference changes in the Firefox PDF viewer (bug 1886586)
2024-03-21 17:07:49 +01:00
calixteman
1083087eee
Merge pull request #17817 from calixteman/zoom_reset
...
Avoid wrong scrolling when calling zoomReset
2024-03-21 16:28:19 +01:00
Calixte Denizet
918b500ca5
Avoid wrong scrolling when calling zoomReset
...
The goal of this patch is to fix the test:
https://searchfox.org/mozilla-central/source/toolkit/components/pdfjs/test/browser_pdfjs_zoom.js
It's a regression due to #17790 .
2024-03-21 16:04:36 +01:00
calixteman
ae60221b0e
Merge pull request #17814 from calixteman/bug1886427
...
[Editor] Make sure the text in the mark has null dimensions to avoid to see a meaningless rectangle in voiceover (bug 1886427)
2024-03-20 16:23:10 +01:00
Calixte Denizet
3ac52ac359
[Editor] Make sure the text in the mark has null dimensions to avoid to see a meaningless rectangle in voiceover (bug 1886427)
2024-03-20 15:25:13 +01:00
Jonas Jenwald
ea1c910a66
Remove PDFViewerApplication.initPassiveLoading
and directly invoke the open
-method from the extension-specific code
...
This old method is essentially just adding, a small amount of, unnecessary indirection and we can easily invoke `PDFViewerApplication.open` directly from the extension-specific code instead.
2024-03-20 14:52:23 +01:00
Jonas Jenwald
b5e00e1fae
Move the error message localization into PDFViewerApplication._otherError
...
When reporting errors in the viewer we currently localize the error messages "manually" at every call-site, which seems like unnecessary repetition.
2024-03-20 14:52:16 +01:00
Tim van der Meij
e8da59c6b1
Merge pull request #17691 from Snuffleupagus/createWebpackAlias
...
Move the `alias`-building out of the `createWebpackConfig` function
2024-03-20 14:17:42 +01:00
Tim van der Meij
9673a6d344
Merge pull request #17811 from calixteman/simplify_copy_paste_test
...
Simplify the copy & paste integration test
2024-03-20 14:09:25 +01:00
Calixte Denizet
f6b215144d
Simplify the copy & paste integration test
2024-03-19 22:29:59 +01:00
calixteman
3718d0a9b4
Merge pull request #17809 from calixteman/rotate_editor_layer
...
Don't hide the editor layer when rotating (follow-up of #17802 )
2024-03-19 20:56:09 +01:00
Calixte Denizet
a3873e4c68
Don't hide the editor layer when rotating (follow-up of #17802 )
...
Before the patch in #17802 , the layer was made visible when calling updateMode
after the rotation angle was set.
2024-03-19 18:36:55 +01:00
calixteman
e892f3b18f
Merge pull request #17790 from calixteman/bug1881746
...
[Editor] Make the text layer focusable before the editors (bug 1881746)
2024-03-19 17:09:44 +01:00
Calixte Denizet
1b00511301
[Editor] Make the text layer focusable before the editors (bug 1881746)
...
Keep the different layers in a constant order to avoid the use of a z-index
and a tab-index.
2024-03-19 16:14:55 +01:00
Jonas Jenwald
0022310b9c
Merge pull request #17706 from Snuffleupagus/Node-Fetch-API
...
[api-minor] Use the Fetch API, when supported, to load PDF documents in Node.js environments
2024-03-19 11:04:28 +01:00
calixteman
a142c8c945
Merge pull request #17802 from calixteman/fix_tests
...
[Editor] Fix the rect used to click in some freetext integration tests
2024-03-19 10:50:34 +01:00
Jonas Jenwald
f881e56510
Merge pull request #17800 from Snuffleupagus/update-packages
...
Update packages and translations
2024-03-18 11:20:32 +01:00
Calixte Denizet
5437199c95
[Editor] Fix the rect used to click in some freetext integration tests
...
And avoid to uselessly set the pointer listeners in the annotation editor layer.
2024-03-18 10:29:32 +01:00
calixteman
10305bf181
Merge pull request #17795 from calixteman/issue17794
...
Don't render corrupted inlined images
2024-03-18 10:18:44 +01:00
Jonas Jenwald
601bf580f9
Update l10n files
2024-03-17 13:52:15 +01:00
Jonas Jenwald
93c09b0502
Update npm packages
2024-03-17 13:50:21 +01:00
Jonas Jenwald
8ac57a63f7
Merge pull request #17799 from mozilla/dependabot/npm_and_yarn/follow-redirects-1.15.6
...
Bump follow-redirects from 1.15.4 to 1.15.6
2024-03-17 09:23:25 +01:00
dependabot[bot]
a26fe9a902
Bump follow-redirects from 1.15.4 to 1.15.6
...
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects ) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases )
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6 )
---
updated-dependencies:
- dependency-name: follow-redirects
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 23:00:41 +00:00
calixteman
2a68724b53
Merge pull request #17793 from calixteman/zoom_wheel_ctrl
...
When zooming the scrollbar can disappear and then no scrollend is triggered
2024-03-15 16:30:39 +01:00
Calixte Denizet
65d618635c
When zooming the scrollbar can disappear and then no scrollend is triggered
2024-03-15 15:37:06 +01:00
Calixte Denizet
9c3471dd01
Don't render corrupted inlined images
...
Fixes #17794 .
2024-03-15 15:33:18 +01:00
Jonas Jenwald
30e69956db
Merge pull request #17694 from Snuffleupagus/validate-defaultOptions
...
Add better validation for the "PREFERENCE" kind `AppOptions`
2024-03-12 18:24:37 +01:00
Jonas Jenwald
e650b95253
Merge pull request #17714 from Snuffleupagus/Node-fs-promise
...
Use `fs/promises` in the Node.js-specific code in the `src/`-folder
2024-03-12 18:09:33 +01:00
calixteman
a7d47af474
Merge pull request #17732 from calixteman/editor_highlight_floating_button
...
[Editor] Add a floating button close to the selected text to highlight it (bug 1867742)
2024-03-12 15:43:19 +01:00
Jonas Jenwald
b54887cfab
Merge pull request #17717 from Snuffleupagus/pr-17681-follow-up
...
Combine a few lines in the `dist-pre` target (PR 17681 follow-up)
2024-03-12 15:15:19 +01:00
Calixte Denizet
b4267cd294
[Editor] Add a floating button close to the selected text to highlight it (bug 1867742)
...
For now keep this feature behind a pref in order to make some experiments before
deciding to enable it.
2024-03-12 15:06:46 +01:00
Jonas Jenwald
eb160726ee
Merge pull request #17726 from Snuffleupagus/OptionalContent-Usage
...
[api-minor] Implement basic support for OptionalContent `Usage` dicts (issue 5764, bug 1826783)
2024-03-12 14:09:57 +01:00
Jonas Jenwald
70b6ddc5d9
Move the /SetOCGState handling into the OptionalContentConfig
class (PR 15377 follow-up)
...
This helps ensure that /SetOCGState actions always take the `Usage` dictionary into account as expected.
2024-03-12 13:18:15 +01:00
Jonas Jenwald
3c78ff5fb0
[api-minor] Implement basic support for OptionalContent Usage
dicts (issue 5764, bug 1826783)
...
The following are some highlights of this patch:
- In the Worker we only extract a *subset* of the potential contents of the `Usage` dictionary, to avoid having to implement/test a bunch of code that'd be completely unused in the viewer.
- In order to still allow the user to *manually* override the default visible layers in the viewer, the viewable/printable state is purposely *not* enforced during initialization in the `OptionalContentConfig` constructor.
- Printing will now always use the *default* visible layers, rather than using the same state as the viewer (as was the case previously).
This ensures that the printing-output will correctly take the `Usage` dictionary into account, and in practice toggling of visible layers rarely seem to be necessary except in the viewer itself (if at all).[1]
---
[1] In the unlikely case that it'd ever be deemed necessary to support fine-grained control of optional content visibility during printing, some new (additional) UI would likely be needed to support that case.
2024-03-12 13:18:15 +01:00
calixteman
e647311a89
Merge pull request #17788 from calixteman/bug1881743
...
[Editor] Improve the accessibility of the highlight editor (bug 1881743)
2024-03-11 21:57:11 +01:00
Calixte Denizet
f676c2c0c8
[Editor] Improve the accessibility of the highlight editor (bug 1881743)
2024-03-11 14:21:43 +01:00
Jonas Jenwald
b14f696071
Merge pull request #17711 from Snuffleupagus/importl10n-Fetch-API
...
Use the Fetch API to download the l10n files
2024-03-08 11:51:34 +01:00
Jonas Jenwald
ea4b55a0e6
Update l10n files
2024-03-08 10:09:51 +01:00
Jonas Jenwald
2b407990e2
Use the Fetch API to download the l10n files
...
Given that the Fetch API is supported since Node.js 18 we should be able to use it when downloading l10n files, which allows us to simplify the code and to make it fully `async`.
2024-03-08 10:08:15 +01:00
calixteman
fb9e438442
Merge pull request #17781 from calixteman/stamp_altext_button_cp
...
[Editor] Make sure the alt-text button is there when pasting an image from an other tab
2024-03-07 21:44:53 +01:00
calixteman
406018934a
Merge pull request #17778 from calixteman/highlight_show_all
...
[Editor] Add a toggle button to show/hide all the highlights (bug 1867740)
2024-03-07 18:49:09 +01:00