mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
XFA - Add back empty subforms (which can have a background)
This commit is contained in:
parent
2bae399422
commit
f168998d93
1 changed files with 5 additions and 10 deletions
|
@ -2154,10 +2154,6 @@ class ExclGroup extends XFAObject {
|
|||
return HTMLResult.FAILURE;
|
||||
}
|
||||
|
||||
if (children.length === 0) {
|
||||
return HTMLResult.EMPTY;
|
||||
}
|
||||
|
||||
let marginH = 0;
|
||||
let marginV = 0;
|
||||
if (this.margin) {
|
||||
|
@ -4337,10 +4333,6 @@ class Subform extends XFAObject {
|
|||
return HTMLResult.FAILURE;
|
||||
}
|
||||
|
||||
if (children.length === 0) {
|
||||
return HTMLResult.EMPTY;
|
||||
}
|
||||
|
||||
let marginH = 0;
|
||||
let marginV = 0;
|
||||
if (this.margin) {
|
||||
|
@ -4649,7 +4641,8 @@ class Template extends XFAObject {
|
|||
const flush = index => {
|
||||
const html = root[$flushHTML]();
|
||||
if (html) {
|
||||
hasSomething = true;
|
||||
hasSomething =
|
||||
hasSomething || (html.children && html.children.length !== 0);
|
||||
htmlContentAreas[index].children.push(html);
|
||||
}
|
||||
};
|
||||
|
@ -4671,7 +4664,9 @@ class Template extends XFAObject {
|
|||
const html = root[$toHTML](space);
|
||||
if (html.success) {
|
||||
if (html.html) {
|
||||
hasSomething = true;
|
||||
hasSomething =
|
||||
hasSomething ||
|
||||
(html.html.children && html.html.children.length !== 0);
|
||||
htmlContentAreas[i].children.push(html.html);
|
||||
} else if (!hasSomething) {
|
||||
mainHtml.children.pop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue