Commit Graph

6128 Commits

Author SHA1 Message Date
Calixte Denizet
e7229854bd Fix the id used in aria-controls used to make a relationship between the popup and its parent 2023-08-31 15:48:32 +02:00
Christophe Coevoet
f84f2646f4 Fix JSDoc types
This fixes invalid type references (either due to invalid paths for the
import or missing imports) in the JS doc, as well as some missing or
invalid parameter names for @param annotations.
2023-08-31 13:09:52 +02:00
Calixte Denizet
d185db2b70 Add tagged annotations in the structure tree (bug 1850797) 2023-08-31 12:35:32 +02:00
Jonas Jenwald
1b8441dacc Don't pass in unused pageColors to CanvasGraphics.endDrawing (PR 16380 follow-up)
This became unnecessary in PR 16380, however we forgot to update one of the API call-sites.
2023-08-28 16:14:22 +02:00
Jonas Jenwald
9b4efe2c2f Use WeakSet.prototype.delete() unconditionally in the InternalRenderTask class
It's not necessary to check if an object exists before trying remove it from a `WeakSet`; see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/delete#return_value
2023-08-28 16:10:33 +02:00
Jonas Jenwald
ec3d2be761 Introduce more optional chaining in the code-base
Also, use logical OR assignment a bit more.
2023-08-26 10:52:23 +02:00
Jonas Jenwald
598421b11f
Merge pull request #16856 from Snuffleupagus/limit-lineEndings
Exclude `lineEndings`, in Annotation-data, in MOZCENTRAL builds (PR 14899 follow-up)
2023-08-24 15:58:32 +02:00
Calixte Denizet
24b480fabe Don't reset all fields when the resetForm argument is an array
correctly set the readonly property in the annotation layer and set the default checkbox value to Off when none is provided.
2023-08-24 09:10:27 -04:00
Calixte Denizet
ee3ac35e05 Revert fix for bug 1838855 (bug 1849876)
The issue described in the mentioned bug is reall because
Acrobat is rendering the XFA instead of the Acroform.
The original patch just tried to workaround the issue but it
induces some regressions.
2023-08-23 12:34:41 -04:00
Jonas Jenwald
cd181eb746 Exclude lineEndings, in Annotation-data, in MOZCENTRAL builds (PR 14899 follow-up)
This was added in PR 14899, over a year ago, however it's still completely unused in the PDF.js library/viewer. In hindsight I think that it was a mistake to add unused functionality, and the issue should probably have been WONTFIXed instead, however we probably can't just remove it now.
Thanks to the pre-processor, we can at least exclude this code in the *built-in* Firefox PDF Viewer.
2023-08-21 10:15:04 +02:00
Jonas Jenwald
988ce2820b Initialize the PDFWorker.#workerPorts WeakMap lazily
By default this WeakMap isn't needed, and it's simple enough to initialize it lazily instead.
2023-08-19 16:18:38 +02:00
Jonas Jenwald
2993c7725b [Firefox] Exclude more workerPort related code in MOZCENTRAL builds
Given that this code is (and has always been) unused in the Firefox PDF Viewer, we don't need to include it in that build-target.
2023-08-19 15:52:00 +02:00
Jonas Jenwald
4d19db0b19 Re-format the code to account for prettier and globals updates
The `prettier` update slightly changed the formatting of some await-expressions; please see https://github.com/prettier/prettier/blob/main/CHANGELOG.md#302

The `globals` update removed the need for some eslint-disable statements; please see https://github.com/sindresorhus/globals/releases/tag/v13.21.0
2023-08-19 09:30:34 +02:00
Jonas Jenwald
60581c427e
Merge pull request #16844 from Snuffleupagus/StampEditor-isEmpty
Update the `StampEditor.isEmpty` method to handle File (PR 16828 follow-up)
2023-08-18 20:40:09 +02:00
Jonas Jenwald
d513899fc7 Update the StampEditor.isEmpty method to handle File (PR 16828 follow-up)
After the changes in PR 16828 the `StampEditor` can now be initialized with a File, in addition to a URL, hence it seems that the `isEmpty` method ought to take that property into account as well.

Looking at this I also noticed that the assignment in the constructor may cause the `this.#bitmapUrl`/`this.#bitmapFile` fields be `undefined` which "breaks" the comparisons in the `isEmpty` method.
We could obviously fix those specific cases, but it seemed overall safer (with future changes) to just update the `isEmpty` method to be less sensitive to exactly how these fields are initialized and reset.
2023-08-17 09:25:58 +02:00
Jonas Jenwald
df9cb772d9 Add a helper method to reduce duplication in StampEditor.#getBitmap
Currently we're repeating virtually the same code *four times* when fetching the bitmap-data, which seems unnecessary.

Also, ensure that the `#bitmapPromise` is always `null`ed by moving that into the `StampEditor.#getBitmapDone` method.
2023-08-17 08:36:07 +02:00
Tim van der Meij
8cf2f6d352
Merge pull request #16830 from Snuffleupagus/issue-16777-2
Avoid using the global `workerPort` when destruction has started, but not yet finished (issue 16777)
2023-08-13 12:18:28 +02:00
Jonas Jenwald
6669a99299 Remove the "no-babel-preset" comment used with the LIB build-target (PR 16829 follow-up)
Similar to the changes in PR 16829, this no longer seems necessary now.
2023-08-13 08:55:58 +02:00
Jonas Jenwald
66437917db Avoid using the global workerPort when destruction has started, but not yet finished (issue 16777)
Given that the `PDFDocumentLoadingTask.destroy()`-method is documented as being asynchronous, you thus need to await its completion before attempting to load a new PDF document when using the global `workerPort`.
If you don't await destruction as intended then a new `getDocument`-call can remain pending indefinitely, without any kind of indication of the problem, as shown in the issue.

In order to improve the current situation, without unnecessarily complicating the API-implementation, we'll now throw during the `getDocument`-call if the global `workerPort` is in the process of being destroyed.
This part of the code-base has apparently never been covered by any tests, hence the patch adds unit-tests for both the *correct* usage (awaiting destruction) as well as the specific case outlined in the issue.
2023-08-12 21:21:50 +02:00
Calixte Denizet
2dd6f07b57 [Editor] Add the possibility to paste an image from the clipboard (bug 1848317) 2023-08-11 19:49:18 +02:00
Calixte Denizet
d527fb3ff2 [Editor] Remove the stamp editor displayed when the image was loading (bug 1848313)
Make the annotation editor layer unclickable while the image is loading and
change the cursor to 'wait'.
2023-08-11 16:46:23 +02:00
Calixte Denizet
659fbc5020 [Editor] Add a button to explicitly add an image (bug 1848108)
The main stamp button will be used to just enter in a add/edit image mode:
 - the user can add a new image in using the new button.
 - the user can edit an image in resizing, moving it.
In image mode, when the user clicks outside on the page but not on an editor,
then all the selected editors will be unselected.
2023-08-11 15:05:46 +02:00
calixteman
1d523d3ec1
Merge pull request #16825 from calixteman/editor_avoid_right_click
[Editor] Avoid showing the context menu or resizing when a resizer is right clicked
2023-08-10 18:37:59 +02:00
calixteman
0dd70c4e66
Merge pull request #16824 from calixteman/editor_dont_unselect_on_render
[Editor] Avoid to unselect when a new page is rendered
2023-08-10 18:37:42 +02:00
Calixte Denizet
96a1f323c4 [Editor] Avoid showing the context menu or resizing when a resizer is right clicked 2023-08-10 18:24:57 +02:00
Calixte Denizet
71f5050ed2 [Editor] Avoid to unselect when a new page is rendered 2023-08-10 18:02:27 +02:00
Jonas Jenwald
389a26c115 Fallback to check all pages when getting the pageIndex of FieldObjects
Given that the FieldObjects are parsed in parallel, in combination with the existing caching in the `getPage`-method and `annotations`-getter, adding additional caches for this fallback code-path doesn't seem entirely necessary.
2023-08-10 17:10:04 +02:00
calixteman
4be6c90796
Merge pull request #16822 from calixteman/issue16821
[Editor] Don't forget to encrypt image streams (see issue #16821)
2023-08-10 16:18:17 +02:00
Calixte Denizet
7a5b3423d6 [Editor] Don't forget to encrypt image streams (see issue #16821)
and encrypt a compressed stream after having been compressed.
2023-08-10 15:19:45 +02:00
Calixte Denizet
402e3fed95 [Editor] Add the possibility to move all the selected editors with the mouse (bug 1847894) 2023-08-10 14:45:36 +02:00
calixteman
d4ba312f00
Merge pull request #16820 from calixteman/editor_stamp_integer_dims
[Editor] Avoid to have slightly truncated images because of non-integer canvas dimensions
2023-08-10 14:16:46 +02:00
Calixte Denizet
b6b51f57ed [Editor] Avoid to have slightly truncated images because of non-integer canvas dimensions 2023-08-10 14:11:42 +02:00
Jonas Jenwald
4962d005f8
Merge pull request #16815 from Snuffleupagus/more-optional-chaining-3
Introduce even more optional chaining in the code-base
2023-08-10 13:33:20 +02:00
Calixte Denizet
b6432ef9de [Editor] Avoid to add a cancelled added image in the undo/redo stack
We're adding the action in the undo/redo stack whatever the status of the
operation was. This patch aims to add the action only when the image has been
successfully added.
2023-08-10 12:18:15 +02:00
Jonas Jenwald
ec7746350d Introduce even more optional chaining in the code-base
This replaces a few more small/simple if-statements with optional chaining.
2023-08-09 17:04:54 +02:00
Calixte Denizet
9ae7ad0fa6 [Editor] Avoid to unselect some editors when the main window is focused
When several editors are selected and the window loses and then gets back its focus,
the previously focused editor is triggering its focus callback making it the only
selected one.
This patch aims to avoid triggering the focus callback called when the main window
gets its focus back.
2023-08-09 12:09:15 +02:00
Calixte Denizet
7d8b53bf7a [Editor] Move an the editor div in the DOM once a translation with the keyboard is done
When moving an element in the DOM, the focus is potentially lost, so we need to make sure
that the focused element before the translation will get back its focus after it.
But we must take care to not execute any focus/blur callbacks because the user didn't
do anything which should trigger such events: it's a detail of implementation. For example,
when several editors are selected and moved, then at the end the same must be selected, so
no element receive a focus event which will set it as selected.
2023-08-08 21:02:05 +02:00
Calixte Denizet
8f6635bacf [Editor] Avoid to add a new line when hitting enter with a selected freetext editor 2023-08-08 18:24:48 +02:00
calixteman
e914870c14
Merge pull request #16793 from calixteman/editor_resize_rotated
[Editor] Fix the resizing of an editor when it's rotated (bug 1847268)
2023-08-08 18:24:20 +02:00
Jonas Jenwald
2e9f2e630c
Merge pull request #16804 from Snuffleupagus/issue-16800
Take fill-alpha into account with default icons for FileAttachment annotations (issue 16800)
2023-08-08 16:39:37 +02:00
calixteman
007b46279d
Merge pull request #16807 from calixteman/bug1847733
[Annotation] Strip out the array index in the path only when the path is from a terminal node (bug 1847733)
2023-08-08 16:14:23 +02:00
Jonas Jenwald
e2819d0c67 Take fill-alpha into account with default icons for FileAttachment annotations (issue 16800) 2023-08-08 15:53:48 +02:00
Calixte Denizet
e2f20a1afe [Annotation] Strip out the array index in the path only when the path is from a terminal node (bug 1847733) 2023-08-08 15:05:27 +02:00
Calixte Denizet
aa71619c2d [Editor] Fix the resizing of an editor when it's rotated (bug 1847268)
There are 2 rotation we've to deal with: the viewer one and the editor one.
The previous implementation was a bit complex and having to deal with these
rotation would have potentially increase it.
So this patch aims to simplify the implementation and deal with all the possible
cases.
The main idea is to transform the mouse deltas according to the rotations and then
apply the resizing in the page coordinates system.
2023-08-08 12:54:12 +02:00
Calixte Denizet
400699687e [Editor] Fix the dimensions of the annotation editor layer (follow-up of #16794) 2023-08-08 11:19:04 +02:00
Jonas Jenwald
e414dfcff7 Use the round CSS function in the setLayerDimensions helper function
This has now been enabled unconditionally in Firefox, see https://bugzilla.mozilla.org/show_bug.cgi?id=1814589

For the `page`-containers in the viewer, this patch should restore the behaviour prior to PR 15770; see e.g. https://github.com/mozilla/pdf.js/pull/15770/files#diff-c48e3561004f5db8f11d5ebab2fd661591222ba911cb4173fbced15f026bac6bL182-L183
Note that these changes this will lead to a tiny bit of movement in some `text` and `annotations` reference tests.

Please find additional information at https://developer.mozilla.org/en-US/docs/Web/CSS/round
2023-08-04 14:33:06 +02:00
calixteman
399475247f
Merge pull request #16781 from calixteman/editor_rewrite_dragging
[Editor] Refactor dragging and dropping an editor (bug 1802895, bug 1844618)
2023-08-03 15:38:12 +02:00
Calixte Denizet
b59b1a81a9 [Editor] Refactor dragging and dropping an editor (bugs 1802895, 1844618)
It'll help to have a full control on what's happening when moving an editor.
2023-08-03 14:47:16 +02:00
calixteman
be29a4dce5
Merge pull request #16786 from calixteman/editor_resizers_blur
[Editor] Stop the resize session when the window is blurred
2023-08-03 13:47:11 +02:00
Calixte Denizet
99c62f9248 [Editor] Stop the resize session when the window is blurred 2023-08-03 10:51:47 +02:00
Calixte Denizet
fcfb2457bc [Editor] Use a getter and not a function for the _checkIfSVGFitsInCanvas (bug 1846727)
It's a followup of #16780.
2023-08-03 09:46:31 +02:00
Calixte Denizet
556f42fe52 [Editor] Let SVG images be resized horizontally/vertically without keeping the aspect ratio (bug 1846727) 2023-08-02 12:43:39 +02:00
Jonas Jenwald
e6728f94f4
Merge pull request #16779 from Snuffleupagus/deprecate-getJavaScript
[api-minor] Deprecate the `PDFDocumentProxy.getJavaScript` method
2023-08-01 20:58:36 +02:00
calixteman
4735ed8f16
Merge pull request #16776 from calixteman/gv_print_or_save
[GeckoView] Allow to query pdf.js to know if we can avoid to print a pdf (bug 1846296)
2023-08-01 15:21:10 +02:00
Calixte Denizet
8bd4a18190 [GeckoView] Allow to query pdf.js to know if we can avoid to print a pdf (bug 1846296) 2023-08-01 15:15:04 +02:00
Jonas Jenwald
64e8557fb5 [api-minor] Deprecate the PDFDocumentProxy.getJavaScript method
This method is very old, however with the exception of the auto-print hack (when scripting is disabled) in the viewer it's never actually been used.

Most likely the idea with `PDFDocumentProxy.getJavaScript` was that it'd be useful if scripting support was added, however it turned out that it was a bit too simplistic and instead a number of new methods were added for the scripting use-cases.
2023-08-01 09:02:05 +02:00
calixteman
5b8f680480
Merge pull request #16029 from calixteman/bug1815196
[api-minor] Don't print hidden annotations (bug 1815196)
2023-07-31 20:14:43 +02:00
Calixte Denizet
71960bea64 Don't print hidden annotatons (bug 1815196)
and handle correctly the NoView and NoPrint flags when they're changed
from JS.
2023-07-31 13:04:15 +02:00
Calixte Denizet
f2bf0ccc4f [Editor] Limit image types to the ones supported by the browser (bug 1846230) 2023-07-31 11:01:28 +02:00
calixteman
621c92dbdd
Merge pull request #16766 from calixteman/fix_willprint
Make sure WillPrint ran before starting printing
2023-07-30 18:37:26 +02:00
calixteman
7bdd3491b0
Merge pull request #16767 from calixteman/color_storage
Add the color changes in the annotation storage
2023-07-30 15:17:27 +02:00
Calixte Denizet
d16d1f0d23 Add the color changes in the annotation storage 2023-07-30 14:03:27 +02:00
Calixte Denizet
8439e11160 Make sure WillPrint ran before starting printing 2023-07-30 12:38:46 +02:00
Jonas Jenwald
930cbc4d27 Make the passwordCapability field, in WorkerTransport, actually private as intended 2023-07-30 11:45:35 +02:00
calixteman
0b715e2a73
Merge pull request #16762 from calixteman/editor_focus
[Editor] When an editor is unselected give the focus to the current page
2023-07-27 21:31:24 +02:00
Calixte Denizet
9d576d5097 [Editor] When an editor is unselected give the focus to the current page
Follow-up of #16756.
2023-07-27 21:12:26 +02:00
Jonas Jenwald
d6c0950389 Avoid eagerly matching "trailer"-strings when searching for incomplete objects in XRef.indexObjects (issue 16759, PR 15854 follow-up, bug 1845762)
When searching for "endobj"-operators, make sure that we don't accidentally match a "trailer"-string in /Content-streams without /Filter-entries (i.e. streams that contain "raw" and thus human-readable data).
2023-07-27 17:57:12 +02:00
Jonas Jenwald
5560643597
Merge pull request #16758 from Snuffleupagus/cMapUrl-standardFontDataUrl-validation
Tweak the `useWorkerFetch` default value checks (PR 15879 follow-up)
2023-07-27 17:52:57 +02:00
Jonas Jenwald
c09bd5568c Tweak the useWorkerFetch default value checks (PR 15879 follow-up)
Currently we accidentally accept `cMapUrl` and `standardFontDataUrl` parameters that are empty strings or `null`, since e.g. `new URL(null, document.baseURI)` doesn't throw, when validating the `useWorkerFetch` parameter via the `isValidFetchUrl` helper function.
Please note that we are currently failing gracefully in this case, as intended, however the warning-messages printed in the console are perhaps less helpful without this patch.
2023-07-27 16:26:39 +02:00
Calixte Denizet
59bcfd9b9e [Editor] Blur unselected editors
When an editor is selected in using the keyboard then it has the focus.
But then if the editor is unselected with Escape key then the focus must
be removed otherwise we still have a blue outline around it.
And add few missing timeout in the integration tests.
2023-07-27 16:26:38 +02:00
Jonas Jenwald
34f2e7d4f9 [Editor] Reduce a bit of duplication on _keyboardManager initialization
The way that the callback-methods are specified feels unnecessarily verbose, however we can introduce a short-hand to improve this.

Also, adds a couple of new-lines to improve overall readability.
2023-07-27 11:42:01 +02:00
calixteman
82faae26c0
Merge pull request #16750 from calixteman/editor_keeboard_freetext
[Editor] Add the possibility to move an empty freetext editor with the keyboard (bug 1845088)
2023-07-27 11:38:17 +02:00
Calixte Denizet
93b09f6320 [Editor] Add the possibility to move an empty freetext editor with the keyboard (bug 1845088) 2023-07-27 09:56:26 +02:00
Jonas Jenwald
c0fe96b8fe Additional *manual* unicorn/prefer-ternary changes
Not all cases could be automatically fixed, and the changes also triggered a number of `prefer-const` errors that needed to be handled manually.
2023-07-27 09:48:24 +02:00
Jonas Jenwald
674e7ee381 Enable the unicorn/prefer-ternary ESLint plugin rule
To limit the readability impact of these changes, the `only-single-line` option was used; please find additional details at https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md

These changes were done automatically, using the `gulp lint --fix` command.
2023-07-27 09:18:26 +02:00
Calixte Denizet
9078587422 [Editor] Use the same keyboard shortcut as in Preview to move an editor on mac 2023-07-26 21:23:38 +02:00
Calixte Denizet
bb6936c931 [Editor] Make editors movable in using the keyboard (bug 1845088)
Selected editors can be moved in using the arrows:
 - up/down/left/right will move the editors of 1 in page unit;
 - ctrl (or meta)+up/down/left/right will move them of 10 in page unit.
2023-07-26 21:05:26 +02:00
calixteman
48cc67f17e
Merge pull request #16741 from calixteman/editor_no_ed_when_pinching
[Editor] Avoid to trigger an editor creation when pinching on a touchscreen
2023-07-25 20:25:30 +02:00
Calixte Denizet
6b545d666e [Editor] Avoid to trigger an editor creation when pinching on a touch screen 2023-07-25 19:00:05 +02:00
Calixte Denizet
76caaab195 [Editor] Set keyboard events on window instead of the main container
The keyboard shortcuts (copy, paste, ...) didn't work correctly when the
main container was not focused.
This patch adds few waitForTimeout in the integration test for FreeText
in order to avoid possible intermittent failures.
2023-07-25 18:38:31 +02:00
calixteman
e00629966d
Merge pull request #16732 from calixteman/editor_resize
[Editor] Add some resizers all around an editor (bug 1843302)
2023-07-25 14:17:09 +02:00
Calixte Denizet
2688bf2ebd [Editor] Add some resizers all around an editor (bug 1843302)
- it'll improve the way to resize images: diagonally (in keeping ratio between dimensions)
  or horizontally/vertically.
- the resizer was almost invisible in HCM.
- make a resize undoable/redoable.
2023-07-25 13:53:30 +02:00
Jonas Jenwald
3b6d2554a8 Fix copying of the reduced Planck constant
Please see https://en.wikipedia.org/wiki/H_with_stroke
2023-07-24 18:42:46 +02:00
Jonas Jenwald
d188b66af6 [api-minor] Attempt to prevent Node.js-specific polyfill errors from completely breaking the library
The existing Node.js-specific polyfills depend on the `node-canvas` package, which has unfortunately (repeatedly) shown to cause trouble for many users. We attempted to improve the situation by listing the relevant packages as `optionalDependencies`, but that didn't seem to really fix the problem.

With this patch the library should be able to load in Node.js-environments even if polyfilling fails, and any errors will instead occur during rendering. Obviously this is *not* a proper solution, since it basically moves the problem to another part of the code-base.
However for certain "simpler" use-cases, such as e.g. text-extraction, these changes should hopefully improve general usability of the PDF.js library in Node.js-environments.

*Please note:* For most PDF documents rendering should still work though, since `DOMMatrix` is *currently* only used with Patterns and `Path2D` only with Type3-fonts and Patterns.
2023-07-24 13:00:34 +02:00
calixteman
71f113bf85
Merge pull request #16718 from calixteman/bug1844572
Don't replace Acroform dictionary if nothing has changed when saving (bug 1844572)
2023-07-24 10:00:43 +02:00
Calixte Denizet
33fdec1392 Don't replace Acroform dictionary if nothing has changed when saving (bug 1844572) 2023-07-22 17:51:06 +02:00
Jonas Jenwald
c018070e80 Enable the no-lonely-if ESLint rule
These changes were mostly done automatically, using `gulp lint --fix`, and only a few spots with comments needed manual tweaking; please see https://eslint.org/docs/latest/rules/no-lonely-if
2023-07-21 20:10:44 +02:00
Jonas Jenwald
abb24f82fb
Merge pull request #16714 from TaTo30/xfa-select-storage
XFA - Set storage values to select and option elements
2023-07-21 20:09:32 +02:00
TaTo30
18619ce4c9 [XFA] Update select and option element attributes with the stored data and
removes the 'selected' attribute from option element if it's not actually selected.
2023-07-21 10:32:33 -06:00
calixteman
d74b68cd09
Merge pull request #16722 from calixteman/dont_set_filter
Don't uselessly change the filter when drawing (bug 1508765)
2023-07-21 14:37:54 +02:00
Calixte Denizet
9a4750fee5 Don't uselessly change the filter when drawing
When profiling the pdf in https://bugzilla.mozilla.org/show_bug.cgi?id=1508765,
I noticed that half a second was spent to set the filter to "none".
2023-07-21 13:29:29 +02:00
Calixte Denizet
d470e91223 Don't get the text content for an annotation when /NeedAppearances is true (bug 1844583)
When the flag is set, the appearance has to be generated from the value so it's
useless/meaningless to extract the content from the existing appearance.
2023-07-21 12:26:27 +02:00
Calixte Denizet
9277801493 Text annotations must use their own canvas when their appearance is generated (bug 1844576)
When a pdf has /NeedAppearances set to true, the annotation appearance must be
generated from its value and we must take into account the hasOwnCanvas property.
2023-07-21 09:51:50 +02:00
calixteman
2a508b95e1
Merge pull request #16719 from calixteman/bug1844625
[Editor] Allow to delete an editor in using the Delete key (aka fn+backspace) (bug 1844625)
2023-07-20 19:42:38 +02:00
Calixte Denizet
cd97fcb414 [Editor] Allow to delete an editor in using the Delete key (aka fn+backspace) (bug 1844625) 2023-07-20 19:08:54 +02:00
Jonas Jenwald
88524bf9ae Don't reset temporary XRef-entries during saving (PR 16392 follow-up)
*Please note:* I'm not aware of any bugs caused by this, however that might be more luck than anything else.

In PR 16392 the `incrementalUpdate` function, and all of its various helpers, were made asynchronous. However the call-site in `src/core/worker.js` wasn't updated, which means that we currently reset temporary XRef-entries while saving is ongoing.
2023-07-20 15:49:59 +02:00
Calixte Denizet
8daf2f1eb1 [Annotation] Use the clip-path property when an annotation has some quad points
This way it'll avoid to split a div in multiple divs having the same id (which
is supposed to be unique).
2023-07-20 10:53:23 +02:00
Calixte Denizet
295eb13a44 [Editor] Bind redo action on meta+shift+z on mac (bug 1844293) 2023-07-19 11:17:50 +02:00
Calixte Denizet
7ac3bf6f17 [Editor] Don't forget to generate non-missing images when printing (bug 1844036) 2023-07-18 15:39:18 +02:00
Jonas Jenwald
d022912719 Remove most build-time require-calls from the src/display/-folder
By leveraging import maps we can get rid of *most* of the remaining `require`-calls in the `src/display/`-folder, since we should strive to use modern `import`-statements wherever possible.
The only remaining cases are Node.js-specific dependencies, since those seem very difficult to convert unless we start producing a bundle *specifically* for Node.js environments.
2023-07-17 19:47:13 +02:00