1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00
pdf.js/test
Jonas Jenwald 3838c4e27c Re-factor the handling of *empty* Name-instances (PR 13612 follow-up)
When working on PR 13612, I mostly prioritized a simple solution that didn't require touching a lot of code. However, while working on PR 13735 I started to realize that the static `Name.empty` construction really wasn't a good idea.

In particular, having a special `Name`-instance where the `name`-property isn't actually a String is confusing (to put it mildly) and can easily lead to issues elsewhere. The only reason for not simply allowing the `name`-property to be an *empty* string, in PR 13612, was to avoid having to touch a lot of existing code. However, it turns out that this is only limited to a few methods in the `PartialEvaluator` and a few of the `BaseLocalCache`-implementations, all of which can be easily re-factored to handle *empty* `Name`-instances.

All-in-all, I think that this patch is even an *overall* improvement since we're now validating (what should always be) `Name`-data better in the `PartialEvaluator`.
This is what I ought to have done from the start, sorry about the code churn here!
2021-07-15 12:00:42 +02:00
..
chromium Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
font Add non-PRODUCTION/TESTING overflow asserts to various string helper-functions (issue 6759) 2021-06-27 16:06:30 +02:00
integration Enable the ESLint operator-assignment rule 2021-07-04 12:57:45 +02:00
pdfs XFA - Avoid to have containers not pushed in the html 2021-07-12 21:34:58 +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 basic linting of JSON files using eslint-plugin-json 2021-06-15 12:19:01 +02:00
unit Re-factor the handling of *empty* Name-instances (PR 13612 follow-up) 2021-07-15 12:00:42 +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 Drop obsolete logic from the downloadFile function in test/downloadutils.js 2021-05-22 14:45:42 +02:00
driver.js [test/driver.js] Ensure that Image src is set *after* the callbacks in resolveImages 2021-07-05 16:28:59 +02:00
integration-boot.js Fix position of highlighted all text. (#13306) 2021-04-28 10:15:31 +02:00
test.js Account for formatting changes in Prettier version 2.3.0 2021-05-16 11:44:05 +02:00
test_manifest.json XFA - Avoid to have containers not pushed in the html 2021-07-12 21:34:58 +02:00
test_slave.html Use the SimpleLinkService when running "annotations" reference tests 2017-09-12 15:24:46 +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