calixteman
592d6c070a
Merge pull request #20179 from calixteman/add_rect_popup
...
[Editor] Add a Rect entry to a saved popup in order to avoid to have an invalid pdf
2025-08-24 12:01:31 +02:00
calixteman
78f63dd6db
Merge pull request #20180 from calixteman/mv_comment_button
...
[Editor] Move the comment button just before the delete one
2025-08-24 12:00:29 +02:00
calixteman
cfe08bd035
Merge pull request #20184 from calixteman/use_cached_annotations
...
Use the cached annotations when collecting them by types
2025-08-24 11:57:17 +02:00
Nicolò Ribaudo
6a22da9c2e
Add logic to track rendering area of various PDF ops
...
This commit is a first step towards #6419 , and it can also help with
first compute which ops can affect what is visible in that part of
the page.
This commit adds logic to track operations with their respective
bounding boxes. Only operations that actually cause something to
be rendered have a bounding box and dependencies.
Consider the following example:
```
0. setFillRGBColor
1. beginText
2. showText "Hello"
3. endText
4. constructPath [...] -> eoFill
```
here we have three rendering operations: the showText op (2) and the
path (4). (2) depends on (0), (1) and (3), while (4) only depends on
(0). Both (2) and (4) have a bounding box.
This tracking happens when first rendering a PDF: we then use the
recorded information to optimize future partial renderings of a PDF, so
that we can skip operations that do not affected the PDF area on the
canvas.
All this logic only runs when the new `enableOptimizedPartialRendering`
preference, disabled by default, is enabled.
The bounding boxes and dependencies are also shown in the pdfBug
stepper. When hovering over a step now:
- it highlights the steps that they depend on
- it highlights on the PDF itself the bounding box
2025-08-22 18:26:59 +02:00
Calixte Denizet
ebc3411727
Use the cached annotations when collecting them by types
2025-08-21 18:04:00 +02:00
Calixte Denizet
f8466c9ff8
[Editor] Add a Rect entry to a saved popup in order to avoid to have an invalid pdf
2025-08-20 17:56:50 +02:00
Calixte Denizet
f8ea63606c
[Editor] Move the comment button just before the delete one
2025-08-20 17:18:38 +02:00
Calixte Denizet
9e5ee1e5a7
[Editor] Add the ability to get all the editable annotations in a pdf document
...
We want to be able to show all the comments in a pdf even if the pages where they are
haven't been rendered.
And it'll help to fix the issue #18915 .
2025-08-18 21:31:11 +02:00
Tim van der Meij
c6bd044438
Merge pull request #20164 from calixteman/editor_hide_deleted_annotation
...
[Editor] Correctly hide deleted annotations
2025-08-14 20:39:39 +02:00
Calixte Denizet
6365188535
[Editor] Avoid to use a null signal when setting listeners in the editor toolbar
...
It should fix the error:
```
JavaScript error: http://127.0.0.1:43303/build/generic/build/pdf.mjs , line 1445:
TypeError: EventTarget.addEventListener: 'signal' member of AddEventListenerOptions is not an object.
```
we've when running integration tests on the Linux bot.
2025-08-14 15:07:22 +02:00
Calixte Denizet
6a00174688
[Editor] Correctly hide deleted annotations
2025-08-13 22:41:19 +02:00
Calixte Denizet
1d4ae786f4
Check the setDash arguments
...
It fixes #20155 .
2025-08-09 22:34:44 +02:00
Knut Hühne
760c8d632c
Mark canvasContext as optional
...
In #20016 , the `canvasContext` property of `RenderParameters` was deprecated in favor of the new `canvas` property.
The JSDoc was updated to include the new parameter along with the old one.
I think the old one should be enclosed in `[]` to mark it as optional (and to allow usage from TypeScript with just the `canvas` parameter provided).
I also reordered the properties so that all required properties come first, follow by optional ones.
2025-08-06 12:38:30 +02:00
宋铄运 (Alan Song)
3d9374e02e
lazy initialize IccColorSpace.#finalizer
2025-08-05 22:29:32 +00:00
Calixte Denizet
a81e99168a
[Editor] Highlight text on a selectionchange event which hasn't been triggered by the pointer or the keyboard (bug 1976597)
...
It's useful for users highlighting with NVDA.
They've to enable native selection and then selection some text.
In this case only a selectionchange is triggered once the selection is done.
2025-07-31 21:03:32 +02:00
Calixte Denizet
3fb7cd40e7
[Editor] Add a floating button in order to highlight the text selection and add a comment (bug 1979381)
...
The callback called when clicking on the button is the same as the one trigged by clicking in the context menu (in m-c).
2025-07-28 15:32:23 +02:00
Calixte Denizet
57ce4f8f43
Use a HTML date/time input when a field requires a date or a time.
...
The user will be able to enter a date in the format corresponding to their locale
and it'll be formatted in using the format provided by the pdf.
2025-07-24 22:01:45 +02:00
Calixte Denizet
78391ed85a
Fix the xref table with the values we've at the beginning of a xref stream (bug 1978317)
2025-07-22 22:10:23 +02:00
Tim van der Meij
ed141970e6
Merge pull request #20099 from calixteman/bug1977259
...
[Editor] Fix the highlighting colors in HCM (bug 1977259)
2025-07-18 22:25:43 +02:00
Calixte Denizet
f695e0ca62
Make the link annotations correctly announced by screen readers (bug 1708041)
...
And focus the targeted page when the user clicks on a link.
2025-07-18 20:15:31 +02:00
Calixte Denizet
c022a3294a
[Editor] Fix the highlighting colors in HCM (bug 1977259)
...
Using the same color in HCM or non-HCM was inducing a too small contrast between
some bg/fg colors making the text a bit hard to read.
2025-07-18 20:11:28 +02:00
Calixte Denizet
8b17e5ecd8
Use canvas context text primitives when the font file is missing
...
It fixes #20065 .
The only to get a path (from the path generator) is when the font is embedded.
So when we need a path (disableFontFace: true or when we want to use a pattern for stroking/filling), it's impossible
to fulfil.
2025-07-18 19:57:30 +02:00
Calixte Denizet
6d7e0e7025
[Editor] Only add a popup to an existing annotation if it exits
...
It fixes the ink integration test "must update an existing annotation".
2025-07-18 17:31:53 +02:00
Tim van der Meij
23bd705cea
Merge pull request #20080 from calixteman/add_comment_1
...
[Editor] Add the possibility to add Popup annotations (bug 1976724)
2025-07-17 21:07:06 +02:00
calixteman
d2f8e60794
Merge pull request #20098 from calixteman/update_highlight_color
...
[Editor] Make possible to change the highlight color from the main panel
2025-07-17 21:06:29 +02:00
Calixte Denizet
5162209b27
[Editor] Make possible to change the highlight color from the main panel
...
It's consistent with the way to change colors for FreeText or Ink annotations.
2025-07-17 20:57:51 +02:00
Calixte Denizet
86d58b637f
Don't add an undefined id to the span for marked content
...
It fixes #20102 .
2025-07-17 19:13:30 +02:00
Calixte Denizet
636ff503ff
[Editor] Add the possibility to add Popup annotations (bug 1976724)
...
It's a first big step.
This patch contains a new modal dialog to let the user edit/update a Popup
2025-07-15 22:39:16 +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
Tim van der Meij
b7a0f01f40
Merge pull request #19976 from calixteman/write_popup
...
[Editor] Add the possibility to add a popup to an annotation when saving
2025-07-12 15:28:56 +02:00
Tim van der Meij
64b150f78f
Merge pull request #20077 from calixteman/remove_popup
...
[Editor] Remove a popup from the DOM when it's deleted
2025-07-12 15:25:49 +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
Calixte Denizet
b07914843b
[Editor] Remove a popup from the DOM when it's deleted
2025-07-11 21:55:14 +02:00
Calixte Denizet
8fc51dc089
[Editor] Add the possibility to add a popup to an annotation when saving
...
When saving/printing, only update the properties which are provided and set
a default value only when there is no pre-existing one.
2025-07-11 21:42:21 +02:00
Tim van der Meij
e853a8f41a
Merge pull request #20081 from calixteman/signature_description
...
Add the l10n parameter when pasting a Signature annotation
2025-07-11 20:27:06 +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
0f504d9a1a
Add the l10n parameter when pasting a Signature annotation
2025-07-10 21:01:24 +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
calixteman
0e2b59e3d5
Merge pull request #20064 from calixteman/dict_api
...
Add few methods to the Dict class in order to simplify the code when writing an annotation
2025-07-08 22:16:57 +02:00
calixteman
481b74a1c2
Merge pull request #20063 from calixteman/issue20062
...
Fix the default appearance of a Polygon annotation when a fill color is provided
2025-07-08 22:10:52 +02:00
Calixte Denizet
63b37b4371
Add few methods to the Dict class in order to simplify the code when writing an annotation
2025-07-08 21:23:29 +02:00
Calixte Denizet
ecc7096a80
Fix the default appearance of a Polygon annotation when a fill color is provided
...
It fixes #20062 .
2025-07-08 20:51:58 +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
Tim van der Meij
cbeef3233f
Merge pull request #20056 from calixteman/one_click
...
[Editor] Allow to change the editor mode when selecting the corresponding editor (bug 1975538)
2025-07-06 19:35:31 +02: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