Repository navigation
Update version to 6.3.289 - #36
Conversation
Document how to use the viewer to open files
The fallback path used when the `menuItems` aren't provided/correct can be simplified, since the manual loop isn't necessary.
Bumps [undici](https://github.com/nodejs/undici) from 7.28.0 to 7.29.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v7.28.0...v7.29.0) --- updated-dependencies: - dependency-name: undici dependency-version: 7.29.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github/codeql-action/autobuild](https://github.com/github/codeql-action) from 4.37.2 to 4.37.3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@e064762...e4fba86) --- updated-dependencies: - dependency-name: github/codeql-action/autobuild dependency-version: 4.37.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github/codeql-action/init](https://github.com/github/codeql-action) from 4.37.2 to 4.37.3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@e064762...e4fba86) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.37.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [github/codeql-action/analyze](https://github.com/github/codeql-action) from 4.37.2 to 4.37.3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@e064762...e4fba86) --- updated-dependencies: - dependency-name: github/codeql-action/analyze dependency-version: 4.37.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Follow-up to PR mozilla#21690: these tests check that pressing Home/End correctly updates the last focused menu-item index, so that a following ArrowUp/ArrowDown press doesn't move focus to an unexpected menu-item.
Add integration tests for the Home/End keys in the `Menu` class
When a viewer page was copied, each copy got its own annotationStorage entry, but newAnnotationsByPage was keyed only by source page. As a result, every output copy received all entries and reused their memoized references. Tag each entry with its rank among output copies of the same source page. The display and worker compute this rank independently; inserted documents preserve the order of copies. Keep unextracted entries at rank -1 so shared stamp bitmaps remain available without being written. Without ranks, new annotations are applied only to the first copy.
It flags the regexes whose search is quadratic in the input length, like the autolinker and XFA-path ones fixed recently. The three existing offenders: `\s*` matched the CSS indentation but also the line terminators that make `^` match with the `m` flag (the preprocessed CSS is unchanged), `(\d+)` made every digit of a number a candidate start position, and `/T.*$/` could fail on the `$` and backtrack since `.` doesn't match a line terminator.
`\d+\.?\d*` can split a run of digits in as many ways as it is long, so it would backtrack polynomially if anything following it could reject. The optional exponent can't, hence no bug today, but `\d+(?:\.\d*)?` accepts the same numbers unambiguously.
…/undici-7.29.0 Bump undici from 7.28.0 to 7.29.0
…ns/github/codeql-action/analyze-4.37.3 Bump github/codeql-action/analyze from 4.37.2 to 4.37.3
…ns/github/codeql-action/init-4.37.3 Bump github/codeql-action/init from 4.37.2 to 4.37.3
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.4 to 3.1.5. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.4...v3.1.5) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
…ns/github/codeql-action/autobuild-4.37.3 Bump github/codeql-action/autobuild from 4.37.2 to 4.37.3
…shorten Shorten the `Menu` constructor a tiny bit
…ar-move Enable the `regexp/no-super-linear-move` ESLint rule
…/fast-uri-3.1.5 Bump fast-uri from 3.1.4 to 3.1.5
Remove the ambiguity from the PostScript number regex
The remaining rules from the plugin's "Best Practices" category that the recommended config leaves off, plus the two it only warns about, all of which the code already complies with. `regexp/prefer-regexp-test` is left off, since `unicorn/prefer-regexp-test` already covers it.
…-parent-cycle Avoid an infinite loop on cyclic field Parent chains
Enable a few more `eslint-plugin-regexp` rules
Preserve `RowSpan`, `ColSpan`, `Headers`, `Scope`, `Short` and `Summary` when serializing the structure tree, and map them to the corresponding ARIA attributes in the viewer. The attributes are now collected from both the `A` and the `C` entries, which may be arrays interleaving dictionaries and revision numbers: this also fixes the bounding box and the MS Office MathML lookups, which only handled a single direct dictionary. Fixes mozilla#18090.
…new-annotations Give copied annotations distinct references
`/ParentTreeNextKey` was set to `parentTree.size`, but the map is sparse: `extractPages` deletes the entries of the struct elements that were never cloned, so `size` is no longer a free key. PDF 32000-1 Table 322 requires "an integer greater than any key in the parent tree", hence `max(key) + 1`.
…the `src/scripting_api/util.js` file Rather than inlining all of that code, by moving it into separate helper methods we can utilize `Map.prototype.getOrInsertComputed()` instead. Also, make a couple of the existing class fields actually private.
….js` Rather than only caching a string and then re-creating the regular expression on every `Util.prototype._scand` invocation, the entire regular expression can be cached directly instead.
The "Custom" entry is a feature that, outside of a single unit-test, isn't used anywhere in the PDF.js code-base. Besides changing this data to use a Map, rather than a regular Object, the validation can be moved since it's not necessary when a white-listed type has been encountered.
…ance-streams for Annotations Currently we have the same exact code three times, in different static methods, which seems like unnecessary duplication.
…ineToCurveToAppearance Add a helper function for writing lineTo/curveTo when creating Appearance-streams for Annotations
Remove unused `BasePdfManager`/`LocalPdfManager` methods
…om-Map [api-minor] Convert `documentInfo` to return any "Custom" data in a Map
…l10n Localize the comment dialog save button through its label span
l10n: Update locale files
*Note:* This functionality isn't currently used in the default viewer.
[api-minor] Convert `markInfo` to return data in a Map
…ces-tests Improve unit-test coverage for the `getViewerPreferences` functionality
…ses (PR 21637 follow-up) The only actual `getOutputLength` call-site, outside of the unit-tests, was removed in PR 21637 and these methods are now unused. This code can always be easily re-instated if needed, thanks to version control, so let's avoid shipping dead code in the builds.
…outputlength Remove the unused `getOutputLength` method from the `ColorSpace` classes (PR 21637 follow-up)
Also, make use of actually private fields in one case.
This code is short and simple enough that it can just be inlined in the `hasJSActions` getter.
Tweak the `WorkerTask` class and the `hasJSActions` getter
| if (!response.ok) { | ||
| throw new Error(response.statusText); | ||
| } | ||
| return fs.promises.writeFile(file, response.body); |
| contents.substring(bracket); | ||
| fs.writeFileSync("test/test_manifest.json", out); | ||
| execSync(`git add ${testManifest} ${gitIgnore}`); | ||
| execSync(`git add ${file}`); |
| try { | ||
| fs.mkdirSync(path.dirname(indexPath), { recursive: true }); | ||
| const tmpPath = `${indexPath}.${process.pid}.tmp`; | ||
| fs.writeFileSync(tmpPath, serialized); |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
react-pdfshould be updated to v11.0.0 to test this update