-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Re-factor document.getElementsByName
lookups in the AnnotationLayer (issue 14003)
#14023
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
Re-factor document.getElementsByName
lookups in the AnnotationLayer (issue 14003)
#14023
Conversation
525a3f0
to
f54431a
Compare
document.getElementsByName
lookups in AnnotationLayer (issue 14003)document.getElementsByName
lookups in the AnnotationLayer (issue 14003)
/botio integrationtest |
f54431a
to
3b4dea4
Compare
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.
Could you add an integration test please ?
Anyway it looks good overall.
bc0b248
to
b9f9ae6
Compare
5976a51
to
6cf4142
Compare
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.
I started looking but haven't had the chance to take a very close look. A question follows below + small nit about use of self
.
6cf4142
to
1ddc633
Compare
@Snuffleupagus here is an integration test: calixteman@2d551ea |
Thank you, thank looks fantastic! |
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/7948e35c756ad38/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/52d7931e3f91535/output.txt |
6040ae3
to
386acf5
Compare
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/cb9814ec02fa851/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/a769fbb25430584/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/cb9814ec02fa851/output.txt Total script time: 2.78 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/a769fbb25430584/output.txt Total script time: 5.59 mins
|
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/45a43b1af76969a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/a0bc66574f50437/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/45a43b1af76969a/output.txt Total script time: 3.62 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/a0bc66574f50437/output.txt Total script time: 6.93 mins
|
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/f44028359798898/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/54a2b22e6f59757/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/f44028359798898/output.txt Total script time: 21.69 mins
Image differences available at: http://54.241.84.105:8877/f44028359798898/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/54a2b22e6f59757/output.txt Total script time: 32.92 mins
Image differences available at: http://54.193.163.58:8877/54a2b22e6f59757/reftest-analyzer.html#web=eq.log |
- it aims to fix mozilla#12721. - Thanks to PR mozilla#14023, we've now the fieldObjects in the annotation layer so we can easily map fields names on their id if needed. - Reset values in the storage, in the JS sandbox and in the visible html elements.
- it aims to fix mozilla#12721. - Thanks to PR mozilla#14023, we've now the fieldObjects in the annotation layer so we can easily map fields names on their id if needed. - Reset values in the storage, in the JS sandbox and in the visible html elements.
- it aims to fix mozilla#12721. - Thanks to PR mozilla#14023, we've now the fieldObjects in the annotation layer so we can easily map fields names on their id if needed. - Reset values in the storage, in the JS sandbox and in the visible html elements.
- it aims to fix mozilla#12721. - Thanks to PR mozilla#14023, we've now the fieldObjects in the annotation layer so we can easily map fields names on their id if needed. - Reset values in the storage, in the JS sandbox and in the visible html elements.
- it aims to fix mozilla#12721. - Thanks to PR mozilla#14023, we've now the fieldObjects in the annotation layer so we can easily map fields names on their id if needed. - Reset values in the storage, in the JS sandbox and in the visible html elements.
- it aims to fix mozilla#12721. - Thanks to PR mozilla#14023, we've now the fieldObjects in the annotation layer so we can easily map fields names on their id if needed. - Reset values in the storage, in the JS sandbox and in the visible html elements.
This replaces direct
document.getElementsByName
lookups with a helper method which:PDFDocumentProxy.getFieldObjects
API-method, such that we can directly lookup only the necessary DOM elements.document.getElementsByName
as before, such that e.g. the standalone viewer components still work.Finally, to fix the problems reported in issue 14003, regardless of the code-path we now also enforce that the DOM elements found were actually created by the AnnotationLayer code.
With these changes we'll thus be able to update form elements on all visible pages just as before, but we'll additionally update the AnnotationStorage for not-yet-rendered elements thus fixing a pre-existing bug.
Fixes #14003