XFA - Correctly bind global data (bug 1718725)
This commit is contained in:
parent
b2b7806cab
commit
778800a53a
@ -25,7 +25,6 @@ import {
|
|||||||
$getDataValue,
|
$getDataValue,
|
||||||
$getParent,
|
$getParent,
|
||||||
$getRealChildrenByNameIt,
|
$getRealChildrenByNameIt,
|
||||||
$global,
|
|
||||||
$hasSettableValue,
|
$hasSettableValue,
|
||||||
$indexOf,
|
$indexOf,
|
||||||
$insertAt,
|
$insertAt,
|
||||||
@ -158,19 +157,13 @@ class Binder {
|
|||||||
// (which is the location of global variables).
|
// (which is the location of global variables).
|
||||||
generator = this.data[$getRealChildrenByNameIt](
|
generator = this.data[$getRealChildrenByNameIt](
|
||||||
name,
|
name,
|
||||||
/* allTransparent = */ false,
|
/* allTransparent = */ true,
|
||||||
/* skipConsumed = */ false
|
/* skipConsumed = */ false
|
||||||
);
|
);
|
||||||
|
|
||||||
while (true) {
|
match = generator.next().value;
|
||||||
match = generator.next().value;
|
if (match) {
|
||||||
if (!match) {
|
return match;
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (match[$global]) {
|
|
||||||
return match;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thirdly, try to find it in attributes.
|
// Thirdly, try to find it in attributes.
|
||||||
@ -590,6 +583,7 @@ class Binder {
|
|||||||
dataNode,
|
dataNode,
|
||||||
global
|
global
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
$appendChild,
|
$appendChild,
|
||||||
$global,
|
|
||||||
$namespaceId,
|
$namespaceId,
|
||||||
$nodeName,
|
$nodeName,
|
||||||
$onChild,
|
$onChild,
|
||||||
@ -47,8 +46,6 @@ class Datasets extends XFAObject {
|
|||||||
child[$namespaceId] === NamespaceIds.signature.id)
|
child[$namespaceId] === NamespaceIds.signature.id)
|
||||||
) {
|
) {
|
||||||
this[name] = child;
|
this[name] = child;
|
||||||
} else {
|
|
||||||
child[$global] = true;
|
|
||||||
}
|
}
|
||||||
this[$appendChild](child);
|
this[$appendChild](child);
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@ const $getNextPage = Symbol();
|
|||||||
const $getSubformParent = Symbol();
|
const $getSubformParent = Symbol();
|
||||||
const $getParent = Symbol();
|
const $getParent = Symbol();
|
||||||
const $getTemplateRoot = Symbol();
|
const $getTemplateRoot = Symbol();
|
||||||
const $global = Symbol();
|
|
||||||
const $globalData = Symbol();
|
const $globalData = Symbol();
|
||||||
const $hasSettableValue = Symbol();
|
const $hasSettableValue = Symbol();
|
||||||
const $ids = Symbol();
|
const $ids = Symbol();
|
||||||
@ -1063,7 +1062,6 @@ export {
|
|||||||
$getRealChildrenByNameIt,
|
$getRealChildrenByNameIt,
|
||||||
$getSubformParent,
|
$getSubformParent,
|
||||||
$getTemplateRoot,
|
$getTemplateRoot,
|
||||||
$global,
|
|
||||||
$globalData,
|
$globalData,
|
||||||
$hasSettableValue,
|
$hasSettableValue,
|
||||||
$ids,
|
$ids,
|
||||||
|
1
test/pdfs/xfa_bug1718725.pdf.link
Normal file
1
test/pdfs/xfa_bug1718725.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
https://bugzilla.mozilla.org/attachment.cgi?id=9229341
|
@ -944,6 +944,14 @@
|
|||||||
"lastPage": 2,
|
"lastPage": 2,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "xfa_bug1718725",
|
||||||
|
"file": "pdfs/xfa_bug1718725.pdf",
|
||||||
|
"md5": "09c7a599338ff75491f29a8f1f94454b",
|
||||||
|
"link": true,
|
||||||
|
"rounds": 1,
|
||||||
|
"enableXfa": true,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "xfa_bug1718740",
|
{ "id": "xfa_bug1718740",
|
||||||
"file": "pdfs/xfa_bug1718740.pdf",
|
"file": "pdfs/xfa_bug1718740.pdf",
|
||||||
"md5": "fab4277f2c70fd1edb35f597f5fe6819",
|
"md5": "fab4277f2c70fd1edb35f597f5fe6819",
|
||||||
|
Loading…
Reference in New Issue
Block a user