mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #13692 from calixteman/bind_global
XFA - Correctly bind global data (bug 1718725)
This commit is contained in:
commit
c33bf0b5e8
5 changed files with 14 additions and 16 deletions
|
@ -25,7 +25,6 @@ import {
|
|||
$getDataValue,
|
||||
$getParent,
|
||||
$getRealChildrenByNameIt,
|
||||
$global,
|
||||
$hasSettableValue,
|
||||
$indexOf,
|
||||
$insertAt,
|
||||
|
@ -158,19 +157,13 @@ class Binder {
|
|||
// (which is the location of global variables).
|
||||
generator = this.data[$getRealChildrenByNameIt](
|
||||
name,
|
||||
/* allTransparent = */ false,
|
||||
/* allTransparent = */ true,
|
||||
/* skipConsumed = */ false
|
||||
);
|
||||
|
||||
while (true) {
|
||||
match = generator.next().value;
|
||||
if (!match) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (match[$global]) {
|
||||
return match;
|
||||
}
|
||||
match = generator.next().value;
|
||||
if (match) {
|
||||
return match;
|
||||
}
|
||||
|
||||
// Thirdly, try to find it in attributes.
|
||||
|
@ -590,6 +583,7 @@ class Binder {
|
|||
dataNode,
|
||||
global
|
||||
);
|
||||
|
||||
if (!found) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
import {
|
||||
$appendChild,
|
||||
$global,
|
||||
$namespaceId,
|
||||
$nodeName,
|
||||
$onChild,
|
||||
|
@ -47,8 +46,6 @@ class Datasets extends XFAObject {
|
|||
child[$namespaceId] === NamespaceIds.signature.id)
|
||||
) {
|
||||
this[name] = child;
|
||||
} else {
|
||||
child[$global] = true;
|
||||
}
|
||||
this[$appendChild](child);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ const $getNextPage = Symbol();
|
|||
const $getSubformParent = Symbol();
|
||||
const $getParent = Symbol();
|
||||
const $getTemplateRoot = Symbol();
|
||||
const $global = Symbol();
|
||||
const $globalData = Symbol();
|
||||
const $hasSettableValue = Symbol();
|
||||
const $ids = Symbol();
|
||||
|
@ -1074,7 +1073,6 @@ export {
|
|||
$getRealChildrenByNameIt,
|
||||
$getSubformParent,
|
||||
$getTemplateRoot,
|
||||
$global,
|
||||
$globalData,
|
||||
$hasSettableValue,
|
||||
$ids,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue