4718 Commits

Author SHA1 Message Date
Calixte Denizet
e44e470eb2 [Editor] Remove useless CSS and fix styling for the comment button 2025-08-26 22:06:49 +02:00
calixteman
5a10376e4d
Merge pull request #20191 from calixteman/link_gotoxy
Add a method goToXY in PDFLinkService in order to scroll the document at a given location
2025-08-25 20:08:03 +02:00
Calixte Denizet
5ed2dfbf26 [Editor] Change the icon for inline comments 2025-08-25 20:04:56 +02:00
Calixte Denizet
1678782680 Add a method goToXY in PDFLinkService in order to scroll the document at a given location
This function is required for the commenting feature: the user will be able to click
on a comment in the sidebar and the document will be scrolled accordingly.
2025-08-25 19:57:53 +02:00
calixteman
5d4f0659bc
Merge pull request #20182 from calixteman/add_comment_button
[Editor] Add a button to the annotation having a popup in order to edit it
2025-08-25 13:18:37 +02:00
Calixte Denizet
bd8c438428 [Editor] Add a button to the annotation having a popup in order to edit it 2025-08-24 21:36:19 +02:00
Tim van der Meij
8be21711a4
Merge pull request #20183 from calixteman/resizer_top_editor
[Editor] Make sure the resizers are on top of the editor content
2025-08-23 21:27:35 +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
0c6cf84274 [Editor] Make sure the resizers are on top of the editor content 2025-08-21 09:10:57 +02:00
calixteman
fcf69d8536
Merge pull request #20093 from Aditi-1400/fix-horizontal-scroll
Make horizontal padding relative to device width
2025-08-06 11:44:55 +02:00
Aditi
9babc144a7 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-08-04 15:29:52 +05:30
Calixte Denizet
287776483f Trigger a fake scrollend event in case it hasn't been triggered by the browser (bug 1957680)
This way, it should unblock zooming with ctrl+wheel after scrolling.
2025-08-01 19:06:26 +02:00
Calixte Denizet
806f9c1cee Disable printing when enablePermission is true and the pdf isn't allowed to be printed (bug 1978985) 2025-07-30 19:29:01 +02:00
Calixte Denizet
38b410f7e5 [Editor] Remove unused property 2025-07-29 11:58:49 +02:00
Calixte Denizet
fbdeb7bb6d [Editor] Remove useless css and use a defined but unused property 2025-07-29 09:33:38 +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
efc1654326 [Editor] Don't show the actions button in the comment popup when it's useless 2025-07-25 19:47:58 +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
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
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
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
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