Commit Graph

18407 Commits

Author SHA1 Message Date
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
Tim van der Meij
f9a0d4efe8
Modernize the rewriteWebArchiveUrl test helper function
This commit changes the code to use a template string and to use `const`
instead of `var`. Combined with the previous commits this allows for
enabling the ESLint `no-var` rule for this file now.
2023-12-17 21:53:50 +01:00
Tim van der Meij
0a10a7b57b
Modernize the downloadManifestFiles/ensurePDFsDownloaded test helper functions
The test helper code largely predates the introduction of modern
JavaScript features and should be refactored to improve readability.
In particular callbacks make the code harder to understand and maintain.

This commit:

- replaces the callback argument with returning a promise;
- replaces the recursive function calls with a simple loop;
- uses `const`/`let` instead of `var`;
- uses arrow functions for shorter code;
- uses template strings for shorter string formatting code.
2023-12-17 21:53:50 +01:00
Tim van der Meij
86bee4409a
Modernize the downloadFile test helper function
The test helper code largely predates the introduction of modern
JavaScript features and should be refactored to improve readability.
In particular callbacks make the code harder to understand and maintain.

This commit:

- replaces the callback argument with returning a promise;
- uses `const` instead of `var`;
- uses arrow functions for shorter code;
- uses template strings for shorter string formatting code;
- uses `Array.includes` for shorter response code checking code.
2023-12-17 21:53:50 +01:00
Jeremy Danyow
1299912744
Center radio button checkmark
fixes #12238
2023-12-16 07:28:03 -08:00
calixteman
91188cf2f8
Merge pull request #17414 from calixteman/fix_l11y_highlight
[Editor] Add some missing strings to localize for highlighting
2023-12-12 20:17:18 +01:00
Calixte Denizet
eff8b2c67b [Editor] Add some missing strings to localize for highlighting 2023-12-12 19:57:38 +01:00
Tim van der Meij
76e3e52021
Merge pull request #17415 from emielmolenaar/fix-viewer-button-closing-tag
Adds missing button closing tag
2023-12-11 22:30:53 +01:00
Tim van der Meij
27d4fff5f2
Merge pull request #17412 from mozilla/dependabot/github_actions/actions/deploy-pages-3
Bump actions/deploy-pages from 2 to 3
2023-12-11 22:24:13 +01:00
Tim van der Meij
51187dce06
Merge pull request #17411 from mozilla/dependabot/github_actions/actions/setup-python-5
Bump actions/setup-python from 4 to 5
2023-12-11 22:23:38 +01:00
Emiel Molenaar
844c4ebad3
Adds missing button closing tag 2023-12-11 17:42:43 +01:00
dependabot[bot]
b388d407a8
Bump actions/deploy-pages from 2 to 3
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 2 to 3.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v2...v3)

---
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-11 12:14:23 +00:00
dependabot[bot]
93143c03fa
Bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 12:14:19 +00:00
Tim van der Meij
39a1fc6992
Merge pull request #17400 from calixteman/autoprint_test
Set a print listener as soon as possible in the autoprint integration test
2023-12-09 20:12:45 +01:00
Calixte Denizet
82be74d036 Set a print listener as soon as possible in the autoprint integration test
This test intermittently fails, likely because the auto-print is triggered fast enough
that we don't manage to get it.
So this patch aims to try to set a listener very early in order to be sure that
we'll be aware that a print has been triggered.
2023-12-09 16:59:43 +01:00
Tim van der Meij
056e6393d0
Merge pull request #17398 from calixteman/test_dont_run_beforeunload
Don't run beforeunload callback when closing page in integration tests
2023-12-09 15:04:00 +01:00
Jonas Jenwald
553729869b
Merge pull request #17397 from Snuffleupagus/app-createScripting-move-options
Re-factor how the `sandboxBundleSrc` option is passed to `PDFScriptingManager`
2023-12-09 14:33:42 +01:00
Jonas Jenwald
92c15a61f1 Re-factor how the sandboxBundleSrc option is passed to PDFScriptingManager
Given that this option isn't used in the Firefox PDF Viewer, we can (ever so slightly) reduce the amount of code needed.
2023-12-09 14:29:31 +01:00
Jonas Jenwald
988d3a188f
Merge pull request #17395 from Snuffleupagus/pypdf-2332
Support Annotations with corrupt /BS-entries
2023-12-09 14:18:29 +01:00
Calixte Denizet
e25cf1ba6f Don't run beforeunload callback when closing page in integration tests
For now, running such callbacks is disabled in Firefox but there are some
plan to reenable them: https://bugzilla.mozilla.org/show_bug.cgi?id=1824220
Having them blocks us to switch to bidi with Chrome.
2023-12-09 14:15:18 +01:00
Jonas Jenwald
a1d859c082 Disable the "should compress and save text" unit-test in Node.js (PR 17202 follow-up)
It seems this unit-test now fails consistently in "all" up-to-date Node.js versions. We should probably try and understand why, but for now just disable it to get passing CI tests.
2023-12-09 14:13:11 +01:00
Tim van der Meij
d6b9e62463
Merge pull request #17391 from Snuffleupagus/AppOptions-collect-non-MOZCENTRAL
Collect a few non-MOZCENTRAL `AppOptions` default values together
2023-12-09 13:59:38 +01:00
Tim van der Meij
c908f2d55c
Merge pull request #17372 from Snuffleupagus/fuzzing-VerbosityLevel-ERRORS
Limit the amount of console "spam" during fuzz tests (PR 17337 follow-up)
2023-12-09 13:57:23 +01:00
Jonas Jenwald
63eb8991a3 Support Annotations with corrupt /BS-entries
There's obviously a few things wrong with the Annotations in the referenced PDF document, however parsing of an Annotation shouldn't just break if the /BS-entry isn't a dictionary.
2023-12-09 10:36:18 +01:00
calixteman
07aa706f1c
Merge pull request #17172 from whimboo/webdriver-bidi
Switch Puppeteer tests from CDP to WebDriver BiDi
2023-12-08 23:02:37 +01:00
Henrik Skupin
d04d28a56d
Remove unnecessary loop for closing open pages 2023-12-08 21:59:18 +01:00
Henrik Skupin
4db01746d8
Run integration tests with WebDriver BiDi instead of CDP for Firefox. 2023-12-08 20:32:50 +01:00