-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Split the existing PDFFunction
in two classes, a private PDFFunction
and a public PDFFunctionFactory
, and utilize the latter in
PDFDocument to allow various code to access the methods of
PDFFunction`
#8968
Split the existing PDFFunction
in two classes, a private PDFFunction
and a public PDFFunctionFactory
, and utilize the latter in
PDFDocument to allow various code to access the methods of
PDFFunction`
#8968
Conversation
/botio test |
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.
Looks good with the question below answered.
src/core/obj.js
Outdated
this.pdfManager = pdfManager; | ||
this.xref = xref; | ||
this.pdfFunctionFactory = pdfFunctionFactory; |
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 cannot spot why we need this property here.
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 cannot spot why we need this property here.
We don't, that's just a case of a bit too much copy-pasting. Removed now, thanks!
…n `PDFImage`, and change a couple of methods to use Objects rather than plain parameters The `inline` parameter is passed to a number of methods/functions in `PDFImage`, despite not actually being used. Its value is never checked, nor is it ever assigned to the current `PDFImage` instance (i.e. no `this.inline = inline` exists). Looking briefly at the history of this code, I was also unable to find a point in time where `inline` was being used. As far as I'm concerned, `inline` does nothing more than add clutter to already very unwieldy method/function signatures, hence why I'm proposing that we just remove it. To further simplify call-sites using `PDFImage`/`NativeImageDecoder`, a number of methods/functions are changed to take Objects rather than a bunch of (somewhat) randomly ordered parameters.
…on` and a public `PDFFunctionFactory``, and utilize the latter in `PDFDocument` to allow various code to access the methods of `PDFFunction` *Follow-up to PR 8909.* This requires us to pass around `pdfFunctionFactory` to quite a lot of existing code, however I don't see another way of handling this while still guaranteeing that we can access `PDFFunction` as freely as in the old code. Please note that the patch passes all tests locally (unit, font, reference), and I *very* much hope that we have sufficient test-coverage for the code in question to catch any typos/mistakes in the re-factoring.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/3d1230141ee4408/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/02848a95278d088/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/02848a95278d088/output.txt Total script time: 16.58 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/3d1230141ee4408/output.txt Total script time: 22.38 mins
|
Split the existing `PDFFunction` in two classes, a private `PDFFunction` and a public `PDFFunctionFactory``, and utilize the latter in `PDFDocument` to allow various code to access the methods of `PDFFunction`
Follow-up to PR #8909.
This requires us to pass around
pdfFunctionFactory
to quite a lot of existing code, however I don't see another way of handling this while still guaranteeing that we can accessPDFFunction
as freely as in the old code.Please note that the patch passes all tests locally (unit, font, reference), and I very much hope that we have sufficient test-coverage for the code in question to catch any typos/mistakes in the re-factoring.