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

Normalize blend mode names. #8266

Merged
merged 1 commit into from
Apr 11, 2017
Merged

Conversation

brendandahl
Copy link
Contributor

Fixes #6652
I ran into this issue myself this weekend. This also gets rid of a regex in a potentially hot path.

@brendandahl
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/e07adda8b8eeda7/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/62eb014099f3ef3/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/e07adda8b8eeda7/output.txt

Total script time: 23.90 mins

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

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/62eb014099f3ef3/output.txt

Total script time: 30.95 mins

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

Image differences available at: http://107.21.233.14:8877/62eb014099f3ef3/reftest-analyzer.html#web=eq.log

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

This looks great, thank you for fixing this!
r=me, with the comments/questions below addressed.

Unless I'm mistaken, shouldn't https://github.com/brendandahl/pdf.js/blob/611f342820fabab67d036aad6ee15932a1f4cc3e/src/display/canvas.js#L1875 be changed to source-over as well? Edit: I think this will avoid the movement in the issue1096 test-case.

Can you please also add the reduced test-case to https://github.com/mozilla/pdf.js/blob/master/test/pdfs/.gitignore too?

@@ -217,6 +217,50 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
}
};

// Convert PDF blend mode names to HTML5 blend mode names.
function normalizeBlendMode(value) {
if (!value || !value.name) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This might be paranoid, but can you please do if (!value || !isName(value)) { or simply if(!isName(value)) { instead, to prevent any possible issues here?

case 'Luminosity':
return 'luminosity';
}
warn('Unsupported blend mode: ' + value);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be warn('Unsupported blend mode: ' + value.name);.

@brendandahl
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/04e42f416ab95bc/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/9c235ed7543aee1/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/9c235ed7543aee1/output.txt

Total script time: 23.14 mins

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/04e42f416ab95bc/output.txt

Total script time: 29.76 mins

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

Image differences available at: http://107.21.233.14:8877/04e42f416ab95bc/reftest-analyzer.html#web=eq.log

@Snuffleupagus
Copy link
Collaborator

/botio-linux unittest

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/9d40aa6d86990b9/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/9d40aa6d86990b9/output.txt

Total script time: 2.55 mins

  • Unit Tests: Passed

@Snuffleupagus
Copy link
Collaborator

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/2f8a6d74de402a3/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/20562873d183950/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/20562873d183950/output.txt

Total script time: 22.69 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@Snuffleupagus Snuffleupagus merged commit 10e5f76 into mozilla:master Apr 11, 2017
@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/2f8a6d74de402a3/output.txt

Total script time: 28.81 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants