Skip to content

Commit c33bf0b

Browse files
authored
Merge pull request #13692 from calixteman/bind_global
XFA - Correctly bind global data (bug 1718725)
2 parents 418880d + 778800a commit c33bf0b

File tree

5 files changed

+14
-16
lines changed

5 files changed

+14
-16
lines changed

src/core/xfa/bind.js

+5-11
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
$getDataValue,
2626
$getParent,
2727
$getRealChildrenByNameIt,
28-
$global,
2928
$hasSettableValue,
3029
$indexOf,
3130
$insertAt,
@@ -158,19 +157,13 @@ class Binder {
158157
// (which is the location of global variables).
159158
generator = this.data[$getRealChildrenByNameIt](
160159
name,
161-
/* allTransparent = */ false,
160+
/* allTransparent = */ true,
162161
/* skipConsumed = */ false
163162
);
164163

165-
while (true) {
166-
match = generator.next().value;
167-
if (!match) {
168-
break;
169-
}
170-
171-
if (match[$global]) {
172-
return match;
173-
}
164+
match = generator.next().value;
165+
if (match) {
166+
return match;
174167
}
175168

176169
// Thirdly, try to find it in attributes.
@@ -590,6 +583,7 @@ class Binder {
590583
dataNode,
591584
global
592585
);
586+
593587
if (!found) {
594588
break;
595589
}

src/core/xfa/datasets.js

-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import {
1717
$appendChild,
18-
$global,
1918
$namespaceId,
2019
$nodeName,
2120
$onChild,
@@ -47,8 +46,6 @@ class Datasets extends XFAObject {
4746
child[$namespaceId] === NamespaceIds.signature.id)
4847
) {
4948
this[name] = child;
50-
} else {
51-
child[$global] = true;
5249
}
5350
this[$appendChild](child);
5451
}

src/core/xfa/xfa_object.js

-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ const $getNextPage = Symbol();
5151
const $getSubformParent = Symbol();
5252
const $getParent = Symbol();
5353
const $getTemplateRoot = Symbol();
54-
const $global = Symbol();
5554
const $globalData = Symbol();
5655
const $hasSettableValue = Symbol();
5756
const $ids = Symbol();
@@ -1074,7 +1073,6 @@ export {
10741073
$getRealChildrenByNameIt,
10751074
$getSubformParent,
10761075
$getTemplateRoot,
1077-
$global,
10781076
$globalData,
10791077
$hasSettableValue,
10801078
$ids,

test/pdfs/xfa_bug1718725.pdf.link

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://bugzilla.mozilla.org/attachment.cgi?id=9229341

test/test_manifest.json

+8
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,14 @@
944944
"lastPage": 2,
945945
"type": "eq"
946946
},
947+
{ "id": "xfa_bug1718725",
948+
"file": "pdfs/xfa_bug1718725.pdf",
949+
"md5": "09c7a599338ff75491f29a8f1f94454b",
950+
"link": true,
951+
"rounds": 1,
952+
"enableXfa": true,
953+
"type": "eq"
954+
},
947955
{ "id": "xfa_bug1718740",
948956
"file": "pdfs/xfa_bug1718740.pdf",
949957
"md5": "fab4277f2c70fd1edb35f597f5fe6819",

0 commit comments

Comments
 (0)