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

XFA - Remove empty pages

- it aims to fix #13583;
  - fix the switch to breakBefore target;
  - force the layout of an unsplittable element on an empty page;
  - don't fail when there is horizontal overflow (except in lr-tb);
  - handle correctly overflow in the same content area (bug 1717805, bug 1717668);
  - fix a typo in radial gradient first argument.
This commit is contained in:
Calixte Denizet 2021-06-21 09:38:50 +02:00
parent f35e4cc9ab
commit ff440d13e7
12 changed files with 329 additions and 113 deletions

View file

@ -43,6 +43,7 @@ const $getChildrenByClass = Symbol();
const $getChildrenByName = Symbol();
const $getChildrenByNameIt = Symbol();
const $getDataValue = Symbol();
const $getExtra = Symbol();
const $getRealChildrenByNameIt = Symbol();
const $getChildren = Symbol();
const $getContainedChildren = Symbol();
@ -177,11 +178,7 @@ class XFAObject {
}
[$getTemplateRoot]() {
let parent = this[$getParent]();
while (parent[$nodeName] !== "template") {
parent = parent[$getParent]();
}
return parent;
return this[$globalData].template;
}
[$isSplittable]() {
@ -1060,6 +1057,7 @@ export {
$getChildrenByNameIt,
$getContainedChildren,
$getDataValue,
$getExtra,
$getNextPage,
$getParent,
$getRealChildrenByNameIt,