Calixte Denizet
94ad3afab6
[Editor] Move the code to generate the SVG path from draw_layer.js to outliner.js
...
It'll be useful to avoid too much duplicated code when adding the free highlighting tool.
2024-01-11 19:10:33 +01:00
calixteman
35daccf34b
Merge pull request #17498 from calixteman/editor_dont_throw_highlight_color
...
[Editor] Don't throw when changing the color of an invisible highlight
2024-01-11 18:34:01 +01:00
Calixte Denizet
b4a7007397
[Editor] Don't throw when changing the color of an invisible highlight
2024-01-11 17:48:06 +01:00
Jonas Jenwald
12875359c3
Merge pull request #17494 from mozilla/dependabot/npm_and_yarn/follow-redirects-1.15.4
...
Bump follow-redirects from 1.15.3 to 1.15.4
2024-01-11 09:59:21 +01:00
dependabot[bot]
7d15d23147
Bump follow-redirects from 1.15.3 to 1.15.4
...
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects ) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases )
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4 )
---
updated-dependencies:
- dependency-name: follow-redirects
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 04:54:43 +00:00
Nicolò Ribaudo
4197f6a284
Add note about running npm install
on MacOS
2024-01-10 15:21:15 +01:00
Nicolò Ribaudo
d2a5210475
Update gulp-cli
to 2.3.0 and explicitly add it as a dependency
2024-01-10 14:59:32 +01:00
calixteman
903af4ee00
Merge pull request #17487 from calixteman/fix_final_spaces
...
Remove terminal white spaces when extracting text from annotation appearances
2024-01-10 10:03:52 +01:00
Calixte Denizet
0392feaee4
Remove terminal white spaces when extracting text from annotation appearances
2024-01-09 10:42:53 +01:00
Tim van der Meij
29faa38dd7
Merge pull request #17482 from Snuffleupagus/update-packages
...
Update packages and translations
2024-01-06 14:16:56 +01:00
Jonas Jenwald
2cb93cc344
Update l10n files
2024-01-06 10:10:22 +01:00
Jonas Jenwald
c5a69544af
Update npm packages
2024-01-06 10:09:12 +01:00
calixteman
6c5e237a40
Merge pull request #17481 from calixteman/editor_default_init
...
[Editor] Init the default highlight color before creating the first editor instance
2024-01-05 22:00:08 +01:00
Calixte Denizet
17e1519410
[Editor] Init the default highlight color before creating the first editor instance
...
We want to be able to draw an highlight with the default color but without having an
instance of the HighlightEditor.
2024-01-05 17:52:54 +01:00
calixteman
130a0fef3d
Merge pull request #17458 from calixteman/bug1871353
...
Preserve the whitespaces when getting text from FreeText annotations (bug 1871353)
2024-01-05 14:21:27 +01:00
Calixte Denizet
7839e7b495
Preserve the whitespaces when getting text from FreeText annotations (bug 1871353)
...
When the text of an annotation is extracted in using getTextContent, consecutive white spaces
are just replaced by one space and. So this patch add an option to make sure that white
spaces are preserved when appearance is parsed.
For the case where there's no appearance, we can have a fast path to get the correct string
from the Content entry.
When an existing FreeText is edited, space (0x20) are replaced by non-breakable (0xa0) ones
to make to see all of them on screen.
2024-01-05 10:20:32 +01:00
calixteman
1019b9f821
Merge pull request #17476 from calixteman/bug1869001
...
Avoid to have the text layer mismatching the rendered text with mismatching locales (bug 1869001)
2024-01-04 22:03:35 +01:00
Calixte Denizet
f84f48b5d0
Avoid to have the text layer mismatching the rendered text with mismatching locales (bug 1869001)
...
The system locale (used in OffscreenCanvas) can be different from the one guessed by Fluent,
consequently, in order to avoid any mismatch, we just use an attached canvas element.
The original issue can easily be reproduced locally in adding a lang="ja" in viewer.html
(or with an other language for Japanese users).
2024-01-04 19:20:20 +01:00
calixteman
7873ad98bb
Merge pull request #17477 from calixteman/puppeteer21.7.0
...
Update Puppeteer to version 21.7.0
2024-01-04 19:00:30 +01:00
Calixte Denizet
e5ccb70efb
Update Puppeteer to version 21.7.0
2024-01-04 16:11:09 +01:00
calixteman
dc01782633
Merge pull request #17475 from calixteman/bug1872721
...
[Editor] Take into account the crop box when saving/printing some highlighted text (bug 1872721)
2024-01-03 13:43:31 +01:00
Calixte Denizet
35863cd54b
[Editor] Take into account the crop box when saving/printing some highlighted text (bug 1872721)
2024-01-02 18:53:33 +01:00
Tim van der Meij
231c79800b
Merge pull request #17474 from timvandermeij/bump
...
Bump the stable version in `pdfjs.config`
2023-12-31 15:34:28 +01:00
Tim van der Meij
fea192fbf9
Bump the stable version in pdfjs.config
2023-12-31 15:31:03 +01:00
Tim van der Meij
9e14d04fd9
Merge pull request #17464 from Snuffleupagus/rm-toolbar-reset-events
...
Remove the internal "toolbarreset"/"secondarytoolbarreset" events and slightly re-factor the code
2023-12-29 12:47:20 +01:00
Tim van der Meij
afa65dc766
Merge pull request #17461 from mozilla/dependabot/github_actions/actions/deploy-pages-4
...
Bump actions/deploy-pages from 3 to 4
2023-12-29 12:27:35 +01:00
Tim van der Meij
aef9f7a0cd
Merge pull request #17460 from mozilla/dependabot/github_actions/actions/upload-artifact-4
...
Bump actions/upload-artifact from 3 to 4
2023-12-29 12:26:29 +01:00
Jonas Jenwald
b1ca270162
Remove the internal "secondarytoolbarreset" event and slightly re-factor the code
...
With modern JavaScript class features we can move the relevant event handling into private methods, and thus invoke it directly when resetting the toolbar UI-state.
*Please note:* This patch slightly reduces the size of the `web/secondary_toolbar.js` file.
2023-12-26 11:03:07 +01:00
Jonas Jenwald
234b57bb45
Remove the internal "toolbarreset" event and slightly re-factor the code
...
With modern JavaScript class features we can move the relevant event handling into private methods, and thus invoke it directly when resetting the toolbar UI-state.
*Please note:* This patch slightly reduces the size of the `web/toolbar.js` file.
2023-12-26 10:57:02 +01:00
dependabot[bot]
4e786f68bc
Bump actions/deploy-pages from 3 to 4
...
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages ) from 3 to 4.
- [Release notes](https://github.com/actions/deploy-pages/releases )
- [Commits](https://github.com/actions/deploy-pages/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/deploy-pages
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 12:11:47 +00:00
dependabot[bot]
f56d6802ad
Bump actions/upload-artifact from 3 to 4
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 12:11:44 +00:00
Tim van der Meij
3b94e9fdce
Merge pull request #17456 from Snuffleupagus/update-packages
...
Update packages and translations
2023-12-23 13:34:32 +01:00
Jonas Jenwald
0324187734
Update l10n files
2023-12-23 12:32:00 +01:00
Jonas Jenwald
3793a56116
Update npm packages
2023-12-23 12:29:51 +01:00
Jonas Jenwald
faa24e8ce2
Merge pull request #17428 from Snuffleupagus/cacheGlobally-CopyImage
...
Attempt to further reduce re-parsing for globally cached images (PR 11912, 16108 follow-up)
2023-12-22 10:25:46 +01:00
Jonas Jenwald
9f02cc36d4
Attempt to further reduce re-parsing for globally cached images (PR 11912, 16108 follow-up)
...
In PR 11912 we started caching images that occur on multiple pages globally, which improved performance a lot in many PDF documents.
However, one slightly annoying limitation of the implementation is the need to re-parse the image once the global-caching threshold has been reached. Previously this was difficult to avoid, since large image-resources will cause cleanup to run on the main-thread after rendering has finished. In PR 16108 we started delaying this cleanup a little bit, to improve performance if a user e.g. zooms and/or rotates the document immediately after rendering completes.
Taking those two PRs together, we now have a situation where it's much more likely that the main-thread has "globally used" images cached at the page-level. Hence we can instead attempt to *copy* a locally cached image into the global object-cache on the main-thread and thus reduce unnecessary re-parsing of large/complex global images, which significantly reduces the rendering time in many cases.
For the PDF document in issue 11878, the rendering time of *the second page* changes as follows (on my computer):
- With the `master`-branch it takes >600 ms to render.
- With this patch that goes down to ~50 ms, which is one order of magnitude faster.
(Note that all other pages are, as expected, completely unaffected by these changes.)
This new main-thread copying is limited to "large" global images, since:
- Re-parsing of small images, on the worker-thread, is usually fast enough to not be an issue.
- With the delayed cleanup after rendering, it's still not guaranteed that an image is available in a page-level cache on the main-thread.
- This forces the worker-thread to wait for the main-thread, which is a pattern that you always want to avoid unless absolutely necessary.
2023-12-21 21:26:21 +01:00
Jonas Jenwald
e547b198a3
Compute the length of the final image-bitmap/data on the worker-thread
...
Currently this is done in the API, but moving it into the worker-thread will simplify upcoming changes.
2023-12-21 21:26:21 +01:00
Jonas Jenwald
b09f238436
Add iteration support in the PDFObjects
class
...
This (obviously) only includes "resolved" data, and will be used in an upcoming patch.
2023-12-21 21:26:21 +01:00
Jonas Jenwald
7ea0e40e58
Merge pull request #17441 from Snuffleupagus/outlineOptionsContainer-CSS-toggle
...
Toggle the visibility of the `outlineOptionsContainer`, in the sidebar, using only CSS
2023-12-20 20:27:15 +01:00
Jonas Jenwald
13da916885
Merge pull request #17445 from pulsejet/pulsejet/fix-destroy
...
Prevent errors in `AnnotationEditorUIManager.destroy` if the `altTextManager` is undefined
2023-12-20 20:25:36 +01:00
Varun Patil
4d34107228
Prevent error in AnnotationEditorUIManager.destroy if altTextManager is null
2023-12-20 23:18:34 +05:30
Jonas Jenwald
82464294b9
Toggle the visibility of the outlineOptionsContainer
, in the sidebar, using only CSS
...
Now that `:has()` is available we no longer need to use JavaScript to toggle the visibility of this DOM element.
2023-12-19 10:01:16 +01:00
Jonas Jenwald
52ffd26da9
Merge pull request #17436 from mozilla/revert-17435-dependabot/github_actions/actions/upload-artifact-4
...
Revert "Bump actions/upload-artifact from 3 to 4"
2023-12-18 15:04:32 +01:00
Jonas Jenwald
933e107073
Revert "Bump actions/upload-artifact from 3 to 4"
2023-12-18 15:01:19 +01:00
Jonas Jenwald
6fc3b438f7
Merge pull request #17434 from mozilla/dependabot/github_actions/github/codeql-action-3
...
Bump github/codeql-action from 2 to 3
2023-12-18 14:54:11 +01:00
Jonas Jenwald
8d49a508f2
Merge pull request #17435 from mozilla/dependabot/github_actions/actions/upload-artifact-4
...
Bump actions/upload-artifact from 3 to 4
2023-12-18 14:53:52 +01:00
Jonas Jenwald
648c8f4abb
Merge pull request #17429 from jdanyow/patch-1
...
Center radio button checkmark
2023-12-18 14:06:36 +01:00
dependabot[bot]
25a0a68def
Bump actions/upload-artifact from 3 to 4
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 12:39:30 +00:00
dependabot[bot]
2e82d947a6
Bump github/codeql-action from 2 to 3
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/github/codeql-action/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 12:39:26 +00:00
Tim van der Meij
34eb6fecac
Merge pull request #17431 from timvandermeij/modernize-test
...
Modernize the code in the `test/downloadutils.mjs` file
2023-12-17 22:07:09 +01:00