Skip to content

XFA - Create Form DOM in merging template and data trees #13018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

calixteman
Copy link
Contributor

Copy link
Contributor

@brendandahl brendandahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. It could use some more comments in parts that are algorithms out of the spec even if it's just paraphrasing the spec.

@@ -732,6 +734,53 @@ class PDFDocument {
});
}

get xfaData() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used anywhere?

);
}

static [$newInstance]() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to use the $ format for a static field?

@@ -159,6 +218,7 @@ class XFAObject {

[$dump]() {
const dumped = Object.create(null);
// dumped.$nodeName = this[$nodeName];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@@ -640,10 +750,24 @@ class Option10 extends IntegerObject {
}
}

function isChild(node, parentNode) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this only works on XFAObjects can it be in the class instead. e.g. someNode[$isChildOf](parentNode) Also, a slightly more accurate name would be isDescendent

}
}

_findDataByNameToConsume(name, dataNode, global) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some comments on what is being searched first, second, ....

  - Spec: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.364.2157&rep=rep1&type=pdf#page=171;
  - support for the 2 ways of merging: consumeData and matchTemplate;
  - create additional nodes in template DOM when occur node allows it;
  - support for global values in data DOM.
@brendandahl
Copy link
Contributor

/botio-linux unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @brendandahl received. Current queue size: 0

Live output at: http://54.67.70.0:8877/ec5ab465eef8755/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/ec5ab465eef8755/output.txt

Total script time: 3.60 mins

  • Unit Tests: FAILED

@brendandahl brendandahl merged commit 3d4bb5e into mozilla:master Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants