Commit Graph
14448 Commits
Author SHA1 Message Date
Calixte Denizet dd55e76f5d XFA - Avoid to have containers not pushed in the html
- it aims to fix issue #13668.
2021-07-12 21:34:58 +02:00
calixteman 8ab65ed32d Merge pull request #13720 from mozilla/revert-13716-layout7
Revert "XFA - Avoid to have containers not pushed in the html"
2021-07-12 09:46:50 +02:00
calixteman 140c2bc563 Revert "XFA - Avoid to have containers not pushed in the html" 2021-07-12 09:46:38 +02:00
calixteman b6445ddc08 Merge pull request #13716 from calixteman/layout7
XFA - Avoid to have containers not pushed in the html
2021-07-12 09:31:27 +02:00
calixteman bd3639ff80 Merge pull request #13718 from calixteman/xfa_tooltip
XFA - Support assist element
2021-07-12 00:00:20 +02:00
calixteman 789d5c9b39 Merge pull request #13717 from calixteman/valign
XFA - Fix wrong vertical alignments
2021-07-11 22:57:49 +02:00
Calixte Denizet 9bbc194846 XFA - Support assist element 2021-07-11 21:01:18 +02:00
Calixte Denizet ff49fa5247 XFA - Fix wrong vertical alignments 2021-07-11 19:46:20 +02:00
Calixte Denizet fccc6c2242 XFA - Avoid to have containers not pushed in the html
- it aims to fix issue #13668.
2021-07-11 19:14:44 +02:00
calixteman 70434c132f Merge pull request #13714 from calixteman/myriad
XFA - Use fake MyriadPro as a fallback for missing fonts
2021-07-11 15:53:36 +02:00
Tim van der Meij 94b60b311f Merge pull request #13715 from Snuffleupagus/update-packages
Update packages and translations
2021-07-11 14:33:01 +02:00
Calixte Denizet 690b5d1941 XFA - Use fake MyriadPro as a fallback for missing fonts
- aims to fix #13597.
2021-07-11 13:52:13 +02:00
Jonas Jenwald c9ed65a0c4 Update l10n files 2021-07-11 12:25:54 +02:00
Jonas Jenwald 46b6e57b7c Update the eslint-plugin-unicorn package to the latest version 2021-07-11 12:21:29 +02:00
Jonas Jenwald 689e5c54a7 Update the es-module-shims package to the latest version 2021-07-11 12:16:47 +02:00
Jonas Jenwald a926976e4d Update npm packages 2021-07-11 12:14:47 +02:00
calixteman d416b23898 Merge pull request #13705 from calixteman/lineheight3
XFA - Fix text positions (bug 1718741)
2021-07-10 14:19:03 +02:00
Jonas Jenwald 16759bf390 Merge pull request #13712 from Snuffleupagus/checkDimensions-bbox
XFA - Always compute the transformed BBox values in `checkDimensions` (PR 13691 follow-up)
2021-07-10 13:27:16 +02:00
Jonas Jenwald 700b79a305 XFA - Always compute the transformed BBox values in checkDimensions (PR 13691 follow-up)
This way we ensure that these BBox values are *always* defined as expected for every `case`-block, and we also don't need to duplicate the lookup in multiple places. (Also, the patch removes a couple of unnecessary line-breaks in existing comments.)

Fixes https://github.com/mozilla/pdf.js/pull/13691#pullrequestreview-702356627, which was flagged by LGTM.
2021-07-10 11:24:05 +02:00
Tim van der Meij 2822ba4208 Merge pull request #13699 from mdrodz/webpack-hash-implementation
making webpack aware of the change inside of the worker file and hash
2021-07-09 23:06:43 +02:00
Tim van der Meij 62b5dc9eb7 Merge pull request #13696 from Snuffleupagus/issue-13689
[GENERIC viewer] Try to fixup "incomplete" language codes (issue 13689)
2021-07-09 23:01:19 +02:00
Tim van der Meij a6d2e78b8a Merge pull request #13690 from symtalha14/text-annotation-comb
Fixed text annotation comb input box
2021-07-09 22:58:50 +02:00
calixteman f7cb8b4bdd Merge pull request #13710 from calixteman/13706_f_up
XFA - Move xfa layer on top of the others (follow-up of #13706)
2021-07-09 22:00:25 +02:00
calixteman a4f60fc417 Merge pull request #13708 from calixteman/xfa_tab
XFA - Add support for traversal and traverse element
2021-07-09 21:59:50 +02:00
Calixte Denizet ff77acb357 XFA - Move xfa layer on top of the others (follow-up of #13706) 2021-07-09 20:58:19 +02:00
Calixte Denizet ccac125623 XFA - Add support for traversal and traverse element
- For now, just implement the "next" target in using tabindex attribute of html elements.
2021-07-09 20:50:25 +02:00
calixteman caaf77375f Merge pull request #13703 from eltociear/patch-4
XFA - Fix typo in factory.js
2021-07-09 20:12:55 +02:00
calixteman 90e527968a Merge pull request #13706 from calixteman/13697
XFA - Keep xfa layer on top of the others (bug 1719629)
2021-07-09 20:10:39 +02:00
Calixte Denizet 1b77888400 XFA - Keep xfa layer on top of the others (bug 1719629) 2021-07-09 18:18:22 +02:00
Calixte Denizet 58e1f51688 XFA - Fix text positions (bug 1718741)
- font line height is taken into account by acrobat when it isn't with masterpdfeditor: I extracted a font from a pdf, modified some ascent/descent properties thanks to ttx and the reinjected the font in the pdf: only Acrobat is taken it into account. So in this patch, line heights for some substituted fonts are added.
  - it seems that Acrobat is using a line height of 1.2 when the line height in the font is not enough (it's the only way I found to fix correctly bug 1718741).
   - don't use flex in wrapper container (which was causing an horizontal overflow in the above bug).
   - consequently, the above fixes introduced a lot of small regressions, so in order to see real improvements on reftests, I fixed the regressions in this patch:
     - replace margin by padding in some case where padding is a part of a container dimensions;
     - remove some flex display: some containers are wrongly sized when rendered;
     - set letter-spacing to 0.01px: it helps to be sure that text is not broken because of not enough width in Firefox.
2021-07-09 18:11:12 +02:00
calixteman 0afc785c7d Merge pull request #13700 from calixteman/image_scale
XFA - Scale correctly images
2021-07-09 15:34:47 +02:00
Ikko Ashimine dba30eac7b XFA - Fix typo in factory.js
occured -> occurred
2021-07-09 21:51:37 +09:00
Calixte Denizet ad195e0f05 XFA - Scale correctly images 2021-07-08 20:28:49 +02:00
Rodolfo Rangel a7c4fb4478 making webpack aware of the change inside of the worker file and hashing its name on build accordingly
removing .worker because it is already added in the [name] part
2021-07-08 13:32:58 -03:00
Jonas Jenwald 29fd39a16e [GENERIC viewer] Try to fixup "incomplete" language codes (issue 13689)
While I don't know if it's technically correct to even do this, it could provide a slightly better out-of-the-box behaviour in browsers that specify (from the PDF.js `l10n`-folder perspective) "incomplete" language codes.

Rather than immediately falling back to English, we'll use a white-list to try and re-write a "partial" language code to a (hopefully) suitable one that matches an existing `l10n`-folder. The disadvantage of this solution is that the list needs to be kept *manually* up-to-date with any changes in the `l10n`-folder, however new locales are added infrequently enough that this should be acceptable.

Fixes 13689 (assuming we actually want/care to do so, otherwise we should just WONTFIX the issue).
2021-07-08 12:54:58 +02:00
calixteman c33bf0b5e8 Merge pull request #13692 from calixteman/bind_global
XFA - Correctly bind global data (bug 1718725)
2021-07-08 12:42:22 +02:00
Jonas Jenwald 418880d473 Merge pull request #13694 from Snuffleupagus/handleBreak-rm-extra-target
XFA - remove unnecessary check in the `handleBreak` function (PR 13687 follow-up)
2021-07-08 09:58:29 +02:00
Jonas Jenwald df6107714a XFA - remove unnecessary check in the handleBreak function (PR 13687 follow-up)
With the changes in PR 13687 we're now checking if `target` is defined *twice* in a row, which shouldn't be necessary :-)

(I noticed this when glancing at the unofficial LGTM results; maybe we should re-evalute the decision to not integrate that into the CI.)
2021-07-07 23:22:29 +02:00
calixteman fbd2f28618 Merge pull request #13693 from calixteman/textfields
XFA - Enable disabled fields (bug 1719464)
2021-07-07 21:43:21 +02:00
symtalha14 e34e2e0af6 Fixed text annotation input field 2021-07-07 23:41:49 +05:30
calixteman 36cfb15668 Merge pull request #13691 from calixteman/layout6
XFA - Handle correctly nested containers with lr-tb layout (bug 1718670)
2021-07-07 19:17:58 +02:00
Calixte Denizet d9a776caf8 XFA - Enable disabled fields (bug 1719464)
- it's a workaround in waiting for JS implementation to let the use fill manually some fields.
2021-07-07 19:11:36 +02:00
Calixte Denizet 8a06df9253 XFA - Handle correctly nested containers with lr-tb layout (bug 1718670)
- and avoid to push a field with no dimensions when we have some available space in width in a parent.
2021-07-07 18:54:32 +02:00
Calixte Denizet 778800a53a XFA - Correctly bind global data (bug 1718725) 2021-07-07 17:36:56 +02:00
Jonas Jenwald b2b7806cab Merge pull request #13649 from Snuffleupagus/xfa-merge-supplemental-font-data
Merge the supplemental font data files used with XFA documents
2021-07-07 15:07:17 +02:00
Jonas Jenwald 37d2808977 Merge the supplemental font data files used with XFA documents
When XFA support was added, the size of the *built* `pdf.worker.js` file increased quite a bit. Hence I think that it makes sense to, where easily possible, do what we can to (slightly) reduce the size of the PDF.js library.

The supplemental font data files (added for XFA rendering), containing rescale-factors respectively widths, seem like an excellent candidate here since they're not particularly large in either line-count or file sizes.
In this patch these files are instead merged into a *single* file per font, rather than four different ones, and even with these changes the resulting source files don't become all that large.[1]

For e.g. the `gulp mozcentral` build, this reduces the size of the *built* `pdf.worker.js` file by more than `3 kB`. Given the overall simplicity of the patch, that kind of size decrease definitely seem worthwhile to me.

---
[1] Especially when compared to truly large files such as e.g. `glyphlist.js`, `metrics.js`, and `unicode.js`.
2021-07-07 11:56:34 +02:00
calixteman 1eb9a3e9eb Merge pull request #13687 from calixteman/failing_som
XFA - Don't fail xfa loading because of a JS subexpression in SOM expressions
2021-07-07 11:50:26 +02:00
Calixte Denizet 0486d24e36 XFA - Don't fail xfa loading because of a JS subexpression in SOM expressions
- Fix for one pdf in bug 1717668 (PDFIUM-292-0.pdf).
2021-07-07 10:47:53 +02:00
Jonas Jenwald 05ebb6329b Merge pull request #13683 from brendandahl/mask-fixes
Fix transformations when painting image masks and tiling patterns.
2021-07-07 10:24:01 +02:00
Brendan Dahl a52c0c6988 Fix transformations when painting image masks and tiling patterns.
Previously, when we filled image masks we didn't copy over the current transformation,
this caused patterns to be misaligned when painted. Now we create a temporary
canvas with the mask and have the transform copied over and offset it relative to
where the mask would be painted. We also weren't properly offsetting tiling patterns.
This isn't usually noticeable since patters repeat, but in the case of #13561 the pattern
is only drawn once and has to be in the correct position to line up with the mask image.

These fixes broke #11473, but highlighted that we were drawing that correctly by
accident and not correctly handling negative bounding boxes on tiling patterns.

Fixes #6297,  #13561, #13441

Partially fixes #1344 (still blurry but boxes are in correct position now)
2021-07-06 17:29:32 -07:00