4795 Commits

Author SHA1 Message Date
Tim van der Meij
9f645fb9a6
Merge pull request #20095 from calixteman/issue20091
[Editor] Make sure that doorhangers are large enough to fit localized strings
2025-07-15 19:50:48 +02:00
Calixte Denizet
ca4e219b7b [Editor] Make sure that doorhangers are large enough to fit localized strings
It fixes #20091.
2025-07-15 17:14:44 +02:00
Calixte Denizet
b2aba463a5 [Editor] Use a round color swatch for the basic color picker 2025-07-15 15:06:07 +02:00
calixteman
5600c0ac02
Merge pull request #20092 from calixteman/mv_a11y_alert
Avoid Firefox test failure
2025-07-15 10:53:32 +02:00
Calixte Denizet
6b5aee2923 Avoid Firefox test failure
It fixes test: accessible/tests/mochitest/elm/test_HTMLSpec.html
2025-07-15 10:50:38 +02:00
calixteman
4f2390a607
Merge pull request #20070 from calixteman/editor_toolbar_color
[Editor] Add a color picker in the toolbar of Ink and Freetext annotations
2025-07-14 23:55:51 +02:00
Calixte Denizet
dbd6f8cdd4 [Editor] Add a color picker in the toolbar of Ink and Freetext annotations 2025-07-14 23:00:01 +02:00
calixteman
ac2a0c5080
Merge pull request #20085 from calixteman/bug1975719
Handle the case where all the image data are in the alpha channel (bug 1975719)
2025-07-14 22:44:19 +02:00
Calixte Denizet
6f8796d2c8 Handle the case where all the image data are in the alpha channel (bug 1975719)
and add an error message in case where there is no data in the image.
2025-07-11 22:34:37 +02:00
Tim van der Meij
c296fb8f95
Merge pull request #20084 from calixteman/hcm_popup_trigger_area
In HCM, invert colors when hovering an annotation with a popup
2025-07-11 20:22:31 +02:00
Calixte Denizet
7091647039 In HCM, invert colors when hovering an annotation with a popup 2025-07-11 15:35:35 +02:00
Calixte Denizet
1c15ba7789 Use the canvas context from mozPrintCallback when printing a pdf from the Firefox viewer
The context is specific to the callback and cannot be created from the canvas itself.
2025-07-11 12:55:39 +02:00
Calixte Denizet
e36f58ee4d Revert "Make horizontal padding relative to device width"
This reverts commit c138887c1f7613bce44b99d22b63e2d744b0fb40.
2025-07-09 17:38:49 +02:00
calixteman
1b427a3af5
Merge pull request #20016 from ryzokuken/move-getcontext
[api-minor] Move getContext call to InternalRenderTask
2025-07-08 22:20:19 +02:00
Tim van der Meij
b999d5ce58
Merge pull request #20060 from noritaka1166/fix-typos
Fix typos across the codebase
2025-07-08 18:28:52 +02:00
Calixte Denizet
bb52a440ce Use the creation date in the popup when there is no modification date
Remove the h1 element in popup title because it caused a warning in Firefox and use a span instead.
2025-07-07 10:51:35 +02:00
Noritaka Kobayashi
fa568e826d
Fix typos across the codebase 2025-07-07 09:59:36 +09:00
Ujjwal Sharma
b1b728d47f [api-minor] Move getContext call to InternalRenderTask
This is a precursor to moving the call into a
worker thread to let us use `OffscreenCanvas`. The
current position wouldn't work since we make
transformations to the canvas object after the
getContext call, which isn't allowed for
OffscreenCanvas. Also it isn't allowed to clone or
`transferControlToOffscreen` the canvas after the
`getContext` call.
2025-07-04 00:53:51 +02:00
Calixte Denizet
6d2c6cfc9f [Editor] Allow to change the editor mode when selecting the corresponding editor (bug 1975538)
For example, selecting an ink editor just after having created a freetext will switch to ink mode.
2025-07-03 23:27:34 +02:00
calixteman
ad31385792
Merge pull request #20055 from calixteman/bug1975264
[Editor] When an annotation is added, announce it if the user is using a screen reader (bug 1975264)
2025-07-03 17:23:56 +02:00
calixteman
54c0d56ccf
Merge pull request #20054 from calixteman/bug1974863
Don't focus the viewer at startup (bug 1974863)
2025-07-03 17:01:19 +02:00
Calixte Denizet
c22a425b04 [Editor] When an annotation is added, announce it if the user is using a screen reader (bug 1975264) 2025-07-03 16:53:01 +02:00
calixteman
fd87e668e0
Merge pull request #20047 from Aditi-1400/fix-horizontal-scroll
Make horizontal padding relative to device width
2025-07-03 16:52:15 +02:00
Calixte Denizet
aaae516894 Don't focus the viewer at startup (bug 1974863)
It's useless and it causes screen readers to not always read the document title.
2025-07-02 17:34:23 +02:00
calixteman
426ee03488
Merge pull request #20041 from calixteman/bug1974436
Remove the shadow from the links (bug 1974436)
2025-07-01 12:59:17 +02:00
Tim van der Meij
8f2a4561b2
Merge pull request #20039 from calixteman/bug1974257
[Editor] In the signature modal, disable the save checkbox when the storage is full (bug 1974257)
2025-06-30 21:46:38 +02:00
Calixte Denizet
9acd16a0c7 [Editor] In the signature modal, disable the save checkbox when the storage is full (bug 1974257) 2025-06-30 21:42:28 +02:00
Calixte Denizet
fc9ba0cda3 Remove the shadow from the links (bug 1974436)
The shadow was taken into account when computing the bounding box of the section
containing the link and it was making the clip path wrong.
Since the shadow is almost invisible because of the opacity, the yellow color and the clip
we can remove it without causing any visual regressions (and as a side effect it'll avoid
to use resources to compute it when displayed).
2025-06-30 21:39:22 +02:00
Aditi
c138887c1f Make horizontal padding relative to device width
The fixed -400px horizontal offset used by
scrollIntoView led to horizontal scroll only moving
part-way right on narrow screens. The highlights near
the right-edge remained party or completely off
screen.

This centres the highlighted match on any viewport width while
clamping the left margin to 20-400px. On very narrow screens
the scrollbar now moves all the way to the right instead of
stopping midway.
2025-06-30 19:08:02 +05:30
Calixte Denizet
bb6b42177c Don't remove a dash at the end of a line when guessing urls (bug 1974112) 2025-06-26 18:55:59 +02:00
Calixte Denizet
194e2ede4d Add some telemetry in order to know what are the certificates used in pdfs (bug 1973573) 2025-06-24 22:23:29 +02:00
Calixte Denizet
3bdc5d54fe Get the text under highlight/squiggly/underline/strikethrough annotations (bug 1885505)
and add an invisible element containing the text in the annotation layer to make
it readable by a screen reader.
2025-06-22 21:47:29 +02:00
Tim van der Meij
ac399e77e8
Merge pull request #20023 from calixteman/edit_added_annotation
[Editor] When editing mode is disabled, allow to double click on a added annotation to edit it
2025-06-21 16:23:56 +02:00
Calixte Denizet
eafc040734 Allow to have an URL as file parameter when loading the viewer 2025-06-21 14:57:24 +02:00
calixteman
c7796c7f8d
Merge pull request #19993 from calixteman/editor_toolbar_simplification
Slightly simplify the way to create the editor toolbar
2025-06-20 21:59:01 +02:00
Calixte Denizet
b97cee2ab5 Correctly handle files with a hash sign in their names (bug 1894166)
It fixes #19990.
2025-06-20 09:21:41 +02:00
Calixte Denizet
2548405401 Slightly simplify the way to create the editor toolbar 2025-06-19 23:03:06 +02:00
Calixte Denizet
d0b0064643 [Editor] When editing mode is disabled, allow to double click on a added annotation to edit it
It's already possible but only when double clicking outside the the text layer.
This patach adds the possibility to click on the text layer.
2025-06-19 21:15:08 +02:00
calixteman
3baea2feff
Merge pull request #20003 from calixteman/bug1971299
Remove the possibility to go to the next page in using the ENTER key (bug 1971299)
2025-06-17 22:43:18 +02:00
Calixte Denizet
8d7246af98 [Editor] Fix the text alignment in freetext annotations (bug 1971134) 2025-06-16 15:11:32 +02:00
Calixte Denizet
07f94825c3 Remove the possibility to go to the next page in using the ENTER key (bug 1971299) 2025-06-10 14:58:18 +02:00
calixteman
d63aabd662
Merge pull request #19969 from calixteman/editor_inconsistencies
[Editor] Change mode when double clicking on an editor
2025-05-28 18:00:26 +02:00
Calixte Denizet
47e69e93a3 [Editor] Change mode when double clicking on an editor
It was only possible to double click on a FreeText editor while being in ink mode (or any other).
2025-05-28 17:49:16 +02:00
Calixte Denizet
de1a9e7055 Fix the colors of disabled buttons in the dialogs 2025-05-26 19:11:24 +02:00
Jonas Jenwald
a8e05d82e2
Merge pull request #19961 from nicolo-ribaudo/debugger-contructPath-op
Show the op dispatched by constructPath in the debugger
2025-05-23 13:15:55 +02:00
Jonas Jenwald
d81174d7bc
Merge pull request #19956 from Snuffleupagus/versionInfoHeader
Improve how the PDF.js version/commit information is exposed in the *built* files
2025-05-22 15:24:02 +02:00
Nicolò Ribaudo
0596f03d4e
Show the op dispatched by constructPath in the debugger
The `constructPath` op receives as arguments not only the
information to construct the path, but also the op to apply
the path to (such as "fill", or "stroke").

This commit updates the Stepper tool in the debugger to decode
that op, showing its name rather than just its numeric ID.
2025-05-19 19:33:14 +02:00
Calixte Denizet
69231e2dbd Fix pdfjsPreloadedWorker when it's undefined 2025-05-19 17:05:37 +02:00
Jonas Jenwald
97a42486f5 Improve how the PDF.js version/commit information is exposed in the *built* files
To make it easier to tell which PDF.js version/commit that the *built* files correspond to, they have (since many years) included `pdfjsVersion` and `pdfjsBuild` constants with that information.

As currently implemented this has a few shortcomings:
 - It requires manually adding the code, with its preprocessor statements, in all relevant files.

 - It requires ESLint disable statements, since it's obviously unused code.

 - Being unused, this code is removed in the minified builds.

 - This information would be more appropriate as comments, however Babel discards all comments during building.

 - It would be helpful to have this information at the top of the *built* files, however it's being moved during building.

To address all of these issues, we'll instead utilize Webpack to insert the version/commit information as a comment placed just after the license header.
2025-05-19 15:01:05 +02:00
Jonas Jenwald
eef1e3e87f Ensure that the viewer clears the workerPort option when using "fake" workers
Without this "fake" workers may be ignored in the API, which isn't really what you want when manually providing the `disableWorker=true` hash parameter. (Note that this requires the `pdfBugEnabled` option/preference to be set as well.)

Also, after the changes in PR 19810 we can just load the "fake" worker directly in development mode and don't need to manually assign it to the global scope.
2025-05-17 11:41:33 +02:00