-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Refactor some xfa*** getters in document.js #14739
Conversation
calixteman
commented
Apr 1, 2022
- it's a follow-up of PR [Annotations] Some annotations can have their values stored in the xfa:datasets #14735.
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/0addd64632b77cd/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/1b26958ffe78aa4/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/0addd64632b77cd/output.txt Total script time: 23.52 mins
Image differences available at: http://54.241.84.105:8877/0addd64632b77cd/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/1b26958ffe78aa4/output.txt Total script time: 26.63 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nicer, thank you!
src/core/document.js
Outdated
entries["xdp:xdp"] = stringToUTF8String(xfa.getString()); | ||
return entries; | ||
const str = stringToUTF8String(stream.getString()); | ||
const data = Object.fromEntries([[key, str]]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you create this object directly, using the { [key]: str }
notation, or does that perhaps not work correctly with the development viewer (because of the SystemJS dependency)?
src/core/document.js
Outdated
const entries = { | ||
"xdp:xdp": null, | ||
template: null, | ||
datasets: null, | ||
config: null, | ||
connectionSet: null, | ||
localeSet: null, | ||
stylesheet: null, | ||
"/xdp:xdp": null, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason for using null
here rather than empty strings as before, since then you could skip the explicit assign of empty strings in get xfaData()
below?
- it's a follow-up of PR mozilla#14735.
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/83a5ee7e6ba7336/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/4fa9fe1e867de68/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/83a5ee7e6ba7336/output.txt Total script time: 24.23 mins
Image differences available at: http://54.241.84.105:8877/83a5ee7e6ba7336/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/4fa9fe1e867de68/output.txt Total script time: 26.12 mins
Image differences available at: http://54.193.163.58:8877/4fa9fe1e867de68/reftest-analyzer.html#web=eq.log |