1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-28 23:28:16 +02:00

XFA - Handle correctly subformSet

- it aims to avoid to loop forever when opening pdf in #13213;
  - the idea is to consider subformSet as inexistent when running in the tree. So if we've subformA > subformSet > subformB then subformB will be visited as a direct child of subformA.
This commit is contained in:
Calixte Denizet 2021-06-11 17:49:13 +02:00
parent 7b4fa0a038
commit d1e945998b
5 changed files with 65 additions and 21 deletions

View file

@ -16,6 +16,7 @@
import {
$extra,
$getParent,
$getSubformParent,
$nodeName,
$toStyle,
XFAObject,
@ -296,7 +297,7 @@ function computeBbox(node, html, availableSpace) {
}
function fixDimensions(node) {
const parent = node[$getParent]();
const parent = node[$getSubformParent]();
if (parent.layout && parent.layout.includes("row")) {
const extra = parent[$extra];
const colSpan = node.colSpan;