Calixte Denizet
18a7a82c29
[Editor] FreeText annotations aren't supposed to have an attached popup so disable commenting for them (bug 1995028)
2025-10-17 18:33:15 +02:00
calixteman
928a758811
Merge pull request #20372 from calixteman/bug1994958
...
[Editor] Fix the tooltip of the comment button when in the editor toolbar (bug 1994958)
2025-10-17 16:20:30 +02:00
Calixte Denizet
54ffd860ec
[Editor] Fix the tooltip of the comment button when in the editor toolbar (bug 1994958)
2025-10-17 15:47:55 +02:00
Tim van der Meij
1c1becf60b
Merge pull request #20369 from calixteman/bug1994738
...
[Editor] Correctly focus the annotation once the comment has been removed in the annotation layer (bug 1994738)
2025-10-16 20:43:55 +02:00
Calixte Denizet
fd3f7528b6
[Editor] Correctly focus the annotation once the comment has been removed in the annotation layer (bug 1994738)
2025-10-16 16:12:36 +02:00
Calixte Denizet
bb2a1126e6
Use a binary format for the glyph paths
...
We used a SVG string which can be pass to the Path2D ctor but it's a bit slower than
building the path step by step.
Having numerical data instead of a string will help the font data serialization.
2025-10-16 15:52:51 +02:00
Nicolò Ribaudo
d79651e797
Reset sameLineText dependencies data on setTextMatrix
...
The position of the text rendered by `showText` is affected
incrementally by the preceding `showText` operations "on the same line".
For this reason, we keep track of all of them (with their dependencies)
in `sameLineText`.
`sameLineText` can be reset whenever we explicitly position the text
somewhere else. We were previously only doing it for `moveText`, and
this patch updates the code to also do it on `setTextMatrix` (which
resets `this.current.x/y` in `CanvasGraphics` to 0).
The complexity of subsequent `sameLineText` operations dependency
tracking grows quadratically with the number of operations on the same
line, so this patch fixes the performance problem when there are whole
pages of text that only use `setTextMatrix` and not `moveText`.
2025-10-15 17:56:30 +02:00
Calixte Denizet
aab521327b
Very slightly improve intersector performance
...
It just avoid useless computations.
2025-10-13 14:55:44 +02:00
calixteman
30fdf16071
Merge pull request #20354 from Aditi-1400/use-enum
...
Use enums instead of string for mesh shading figure type
2025-10-10 18:49:50 +02:00
calixteman
0d8a300777
Merge pull request #20353 from calixteman/improve_intersector
...
[Annotation] Improve the performance of the code for getting glyphs which belongs to annotations bounding boxes (bug 1987914)
2025-10-10 13:31:03 +02:00
Calixte Denizet
c4d436764c
[Annotation] Improve the performance of the code for getting glyphs which belongs to annotations bounding boxes (bug 1987914)
...
Instead of looking at every bbox, we use a grid (64x64) where each cell of the grid is associated with the bboxes
touching it.
In order to get the potential bboxes containing a point, we just have to compute the number of the cell containing
it and in using the associated described above, we can quickly know if the point is contained.
With the pdf in the mentioned bug, it's ~20 times faster.
2025-10-10 13:28:18 +02:00
calixteman
c8d8f9fbb4
Merge pull request #20352 from calixteman/improve_struct_tree_parser
...
Improve performance of the struct tree build (bug 1987914)
2025-10-10 13:27:11 +02:00
Aditi
e8d08c941c
Use enums instead of string for mesh shading figure type
2025-10-10 04:21:03 +05:30
Tim van der Meij
0fedfc9ceb
Merge pull request #20351 from calixteman/avoid_null
...
[Editor] Avoid to have a null button in the DOM when there's no comment manager
2025-10-09 20:57:20 +02:00
Calixte Denizet
f5a6dd4164
[Annotation] Use the annotations rect in order to fix the order in the DOM (bug 1987914)
...
It's just a partial fix for bug 1987914 but the time spent to add the annotations in the DOM
is divided by 5.
2025-10-09 17:43:49 +02:00
Calixte Denizet
9797dc0eb4
Improve performance of the struct tree build (bug 1987914)
...
For the pdf in bug 1987914, the overall time spent in `addTopLevelNode` is dropping from ~6s to ~70ms.
2025-10-09 16:08:56 +02:00
Calixte Denizet
16d0077387
[Editor] Avoid to have a null button in the DOM when there's no comment manager
2025-10-09 09:25:43 +02:00
Calixte Denizet
41dea1e38b
[Editor] Make sure that annotation positions in the DOM respect the visual order (bug 1992770)
2025-10-08 15:11:09 +02:00
Calixte Denizet
5c28346abc
[Editor] Make sure all editors are focusable with the keyboard (bug 1992868)
2025-10-07 21:15:26 +02:00
Calixte Denizet
be987f2fbf
[Editor] Make sure that comment stuff is removed when an editor is deleted (bug 1992987)
2025-10-07 19:09:48 +02:00
Tim van der Meij
68ed5be9ac
[Editor] Remove obsolete arguments for setDims calls in the highlight code
...
The `width` and `height` arguments for `setDims` have been removed in
PR #20285 , but for two calls in the highlight code they remained. This
commit removes them as they are no longer used in the method itself.
Fixes 0722faa9.
2025-10-05 13:52:09 +02:00
Calixte Denizet
19ff148163
Fix incremental saving with hybrid references
...
This patch removes some previous fixes which are now likely fixed by #17636 .
Fixes #20302 .
2025-10-04 18:31:55 +02:00
Calixte Denizet
4d15bfec0d
Only apply word spacing when there is a 0x20 in the text chunk
...
Fixes #20319 .
2025-10-03 22:18:02 +02:00
calixteman
3234912c86
Merge pull request #20224 from james-atticus/improve-serif-fallback-font-name-matching
...
Improve serif fallback font name matching
2025-10-01 19:58:13 +02:00
calixteman
042e821bec
Merge pull request #20320 from calixteman/bug1991584
...
[Annotation] Fix some timezone issues when getting a date from the date picker (bug 1991584)
2025-10-01 00:41:17 -11:00
calixteman
cd66ecf3d2
Merge pull request #20318 from calixteman/fix_editorStats
...
[Editor] Avoid an error when getting the editors telemetry data
2025-10-01 00:40:35 -11:00
Calixte Denizet
12066af578
[Editor] Add a fake annotation (in the annotation layer) associated with an editor in order to be able to show the comment button (bug 1989420)
2025-10-01 09:08:57 +02:00
Calixte Denizet
7b9cde1daf
[Annotation] Fix some timezone issues when getting a date from the date picker (bug 1991584)
2025-09-30 11:07:31 +02:00
Calixte Denizet
678aec9890
[Editor] Avoid an error when getting the editors telemetry data
2025-09-29 16:41:15 +02:00
Calixte Denizet
02ddf277ab
[Editor] Add some telemetry for the commenting feature (bug 1991172)
2025-09-26 21:04:09 +02:00
Calixte Denizet
7fc7b79cd0
[Annotation] In reading mode with new commment stuff enabled, use the comment popup for annotations without a popup but with some contents (bug 1991029)
2025-09-26 18:24:55 +02:00
Calixte Denizet
f547e834e1
[Editor] Give the focus to the comment button after editing in reading mode
2025-09-26 17:18:37 +02:00
calixteman
7051fd0215
Merge pull request #20307 from calixteman/bug1990872
...
[Editor] Make sure the selected editor is correctly focused after switching editing mode (bug 1990872)
2025-09-26 09:17:48 +02:00
Calixte Denizet
888df7c319
[Editor] Make sure the selected editor is correctly focused after switching editing mode (bug 1990872)
2025-09-25 22:42:32 +02:00
Calixte Denizet
442932f0b3
[Editor] Move the focus to the comment button once editing is done (bug 1990820)
2025-09-25 20:17:52 +02:00
Calixte Denizet
90e56b706e
[Editor] Add a title to the comment buttons (bug 1990813)
2025-09-25 18:47:49 +02:00
Calixte Denizet
0b40bf1743
[Editor] Update the color and the position of the comment button in reading mode they've been modified
2025-09-24 09:45:37 +02:00
calixteman
48c10d8938
Merge pull request #20285 from calixteman/editor_remove_useless_dim_stuff
...
[Editor] Remove useless computations when setting the dimensions of an editor
2025-09-23 20:26:12 +02:00
calixteman
225b07aa29
Merge pull request #20283 from calixteman/bug1989304
...
[Editor] Make sure the comment dialog is visible on the screen (bug 1989304)
2025-09-23 19:30:28 +02:00
calixteman
44affa76b9
Merge pull request #20197 from ryzokuken/sab-font-data
...
Serialize font data into an ArrayBuffer
2025-09-22 09:40:14 +02:00
Calixte Denizet
0722faa9ce
[Editor] Remove useless computations when setting the dimensions of an editor
...
And remove an unused functions AnnotationEditor::setAspectRatio/fixDims.
2025-09-19 18:08:56 +02:00
Ujjwal Sharma
4bed7370f4
[WIP] Serialize font data into an ArrayBuffer
...
This PR serializes font data into an ArrayBuffer
that is then transfered from the worker to the
main thread. It's more efficient than the current
solution which clones the "export data" object
which includes the font data as a Uint8Array.
It prepares us to switch to a SharedArrayBuffer
in the future, which would allow us to share
the font data with multiple agents, which would be
crucial for the upcoming "renderer" worker.
2025-09-19 12:02:40 +05:30
Calixte Denizet
623d422ddb
[Editor] Make sure the comment dialog is visible on the screen (bug 1989304)
2025-09-18 21:23:42 +02:00
Calixte Denizet
cbc5241b53
[Editor] Make sure to not add extra editors when showing again a destroyed page
2025-09-18 15:18:50 +02:00
James Fitzsimmons
ae8f8e4d34
Improve serif fallback font name matching
2025-09-18 14:15:41 +10:00
Tim van der Meij
05af4ff783
Merge pull request #20252 from sigmaSd/patch-1
...
Use `console.warn`/`console.info` where appropriate
2025-09-16 19:41:54 +02:00
Bedis Nbiba
b6165c02b9
use console.warn/info where appropriate
...
Change info to use console.info and warn function
to use console.warn, this not only makes sense semantically
but also in practice server side runtimes like deno
write console.log to stdout, and console.warn
to stderr (info goes to stdout, unfortunately?)
this is important because logging to stdout
can break some cli apps.
2025-09-15 22:37:08 +00:00
Tim van der Meij
d85fd12437
Merge pull request #20274 from calixteman/save_comment_reading_mode
...
[Annotation] Save the comment changes made in reading mode (bug 1987427)
2025-09-15 23:32:51 +02:00
Calixte Denizet
764c2e639c
[Editor] Fix the position of the comment popup and its dialog
...
Only fix the popup position if the user didn't change it.
And don't adjust the dialog position since it should have the same as the popup.
2025-09-15 21:26:36 +02:00
Calixte Denizet
5feb4674d6
[Annotation] Save the comment changes made in reading mode (bug 1987427)
2025-09-15 19:49:49 +02:00