Skip to content
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

Convert the code in src/core/evaluator.js to use standard classes #12060

Merged
merged 2 commits into from
Jul 6, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Jul 5, 2020

  • Move some constants and helper functions out of the PartialEvaluator closure

    This will simplify the class conversion in the next patch, and with modern JavaScript the moved code is still limited to the current module scope.

    Please note: For improved consistency with our usual formatting, the TILING_PATTERN/SHADING_PATTERN constants where re-factored slightly.

  • Convert the code in src/core/evaluator.js to use standard classes

    This removes additional // eslint-disable-next-line no-shadow usage, which our old pseudo-classes necessitated.

    Most of the re-formatting changes, after the class definitions and methods were fixed, were done automatically by Prettier.

    Please note: I'm purposely not doing any var to let/const conversion here, since it's generally better to (if possible) do that automatically on e.g. a directory basis instead.


Much smaller and more manageable diff with https://github.com/mozilla/pdf.js/pull/12060/files?w=1

…` closure

This will simplify the `class` conversion in the next patch, and with modern JavaScript the moved code is still limited to the current module scope.

*Please note:* For improved consistency with our usual formatting, the `TILING_PATTERN`/`SHADING_PATTERN` constants where re-factored slightly.
This removes additional `// eslint-disable-next-line no-shadow` usage, which our old pseudo-classes necessitated.

Most of the re-formatting changes, after the `class` definitions and methods were fixed, were done automatically by Prettier.

*Please note:* I'm purposely not doing any `var` to `let`/`const` conversion here, since it's generally better to (if possible) do that automatically on e.g. a directory basis instead.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Jul 5, 2020

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

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

@pdfjsbot
Copy link

pdfjsbot commented Jul 5, 2020

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/046724a4a3b22cd/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jul 5, 2020

From: Bot.io (Linux m4)


Failed

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

Total script time: 26.43 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/a980fb634cd0f36/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Jul 5, 2020

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/046724a4a3b22cd/output.txt

Total script time: 28.68 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.215.176.217:8877/046724a4a3b22cd/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit cf8daaf into mozilla:master Jul 6, 2020
@timvandermeij
Copy link
Contributor

Looks good; thanks!

@Snuffleupagus Snuffleupagus deleted the evaluator-class branch July 6, 2020 23:16
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.

3 participants