pdf.js/test
Jonas Jenwald 8d5689387b Improve handling of named destinations in out-of-order NameTrees (PR 10274 follow-up)
According to the specification, see https://web.archive.org/web/20210404042322if_/https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G6.2384179, the keys of a NameTree/NumberTree should be ordered.
For corrupt PDF files, which violate this assumption, it's thus possible that trying to lookup a single entry fails.

Previously, in PR 10274, we implemented a fallback that only applies to the "bottom" node of a NameTree/NumberTree, which in general might not actually help for sufficiently corrupt NameTree/NumberTree data.
Instead we remove the current *limited* fallback from `NameOrNumberTree.get`, and defer to the call-site to handle this case explicitly e.g. by using `NameOrNumberTree.getAll` for data where that makes sense. For well-formed documents, these changes should *not* lead to any additional data fetching/parsing.

Finally, as part of these changes, the validation of named destination data is improved in the `Catalog` and a new unit-test is also added.
2021-05-21 15:48:37 +02:00
..
chromium Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
font Move the IdentityToUnicodeMap/ToUnicodeMap from src/core/fonts.js and into its own file 2021-05-02 21:00:29 +02:00
integration Merge pull request #13328 from calixteman/js_display1 2021-05-17 08:47:13 -07:00
pdfs Improve handling of named destinations in out-of-order NameTrees (PR 10274 follow-up) 2021-05-21 15:48:37 +02:00
resources Introduce Puppeteer for handling browsers during tests 2020-04-27 13:03:12 +02:00
stats Enable the ESLint no-var rule in the test/stats/ folder 2021-03-14 10:15:45 +01:00
ttx Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
types Add typescript definitions 2020-07-30 11:10:37 +02:00
unit Improve handling of named destinations in out-of-order NameTrees (PR 10274 follow-up) 2021-05-21 15:48:37 +02:00
.eslintrc Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.js Enable the ESLint no-var rule in test/add_test.js 2021-03-14 10:25:51 +01:00
annotation_layer_builder_overrides.css Enable the Stylelint length-zero-no-unit rule 2021-01-10 14:09:36 +01:00
downloadutils.js Account for formatting changes in Prettier version 2.3.0 2021-05-16 11:44:05 +02:00
driver.js Account for formatting changes in Prettier version 2.3.0 2021-05-16 11:44:05 +02:00
integration-boot.js Fix position of highlighted all text. (#13306) 2021-04-28 10:15:31 +02:00
test_manifest.json Improve handling of named destinations in out-of-order NameTrees (PR 10274 follow-up) 2021-05-21 15:48:37 +02:00
test_slave.html Use the SimpleLinkService when running "annotations" reference tests 2017-09-12 15:24:46 +02:00
test.js Account for formatting changes in Prettier version 2.3.0 2021-05-16 11:44:05 +02:00
testutils.js Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
text_layer_test.css Fix highlighting of search results when the textLayer contains br-elements (PR 13257 follow-up, issue 13323) 2021-05-02 15:36:01 +02:00
webserver.js Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00