-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Conversation
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.215.176.217:8877/e07adda8b8eeda7/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/62eb014099f3ef3/output.txt |
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/e07adda8b8eeda7/output.txt Total script time: 23.90 mins
Image differences available at: http://54.215.176.217:8877/e07adda8b8eeda7/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/62eb014099f3ef3/output.txt Total script time: 30.95 mins
Image differences available at: http://107.21.233.14:8877/62eb014099f3ef3/reftest-analyzer.html#web=eq.log |
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 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?
src/core/evaluator.js
Outdated
@@ -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) { |
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 might be paranoid, but can you please do if (!value || !isName(value)) {
or simply if(!isName(value)) {
instead, to prevent any possible issues here?
src/core/evaluator.js
Outdated
case 'Luminosity': | ||
return 'luminosity'; | ||
} | ||
warn('Unsupported blend mode: ' + value); |
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 needs to be warn('Unsupported blend mode: ' + value.name);
.
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/04e42f416ab95bc/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.215.176.217:8877/9c235ed7543aee1/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/9c235ed7543aee1/output.txt Total script time: 23.14 mins
|
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/04e42f416ab95bc/output.txt Total script time: 29.76 mins
Image differences available at: http://107.21.233.14:8877/04e42f416ab95bc/reftest-analyzer.html#web=eq.log |
/botio-linux unittest |
From: Bot.io (Linux)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/9d40aa6d86990b9/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/9d40aa6d86990b9/output.txt Total script time: 2.55 mins
|
/botio makeref |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/2f8a6d74de402a3/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/20562873d183950/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/20562873d183950/output.txt Total script time: 22.69 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/2f8a6d74de402a3/output.txt Total script time: 28.81 mins
|
Normalize blend mode names.
Fixes #6652
I ran into this issue myself this weekend. This also gets rid of a regex in a potentially hot path.