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

XFA - Elements created outside of XML must have all their properties (bug 1722029)

- an Image element was created, attached to its parent but the $globalData property was not set and that led to an error.
  - the pdf in bug 1722029 has 27 rendered rows (checked in Acrobat) when only one was displayed: this patch some binding issues around the occur element.
This commit is contained in:
Calixte Denizet 2021-07-26 16:14:46 +02:00
parent 777d890268
commit 959120e6c9
5 changed files with 98 additions and 34 deletions

View file

@ -204,6 +204,9 @@ class XFAObject {
[$appendChild](child) {
child[_parent] = this;
this[_children].push(child);
if (!child[$globalData] && this[$globalData]) {
child[$globalData] = this[$globalData];
}
}
[$removeChild](child) {
@ -236,6 +239,9 @@ class XFAObject {
[$insertAt](i, child) {
child[_parent] = this;
this[_children].splice(i, 0, child);
if (!child[$globalData] && this[$globalData]) {
child[$globalData] = this[$globalData];
}
}
/**