1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Adjust the (applicable) existing isName callsites to use the new isName(v, name) version of the function

This commit is contained in:
Jonas Jenwald 2016-08-04 15:13:37 +02:00
parent af636aae96
commit 83ce6f0b6d
4 changed files with 13 additions and 17 deletions

View file

@ -287,7 +287,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
var groupSubtype = group.get('S');
var colorSpace;
if (isName(groupSubtype) && groupSubtype.name === 'Transparency') {
if (isName(groupSubtype, 'Transparency')) {
groupOptions.isolated = (group.get('I') || false);
groupOptions.knockout = (group.get('K') || false);
colorSpace = (group.has('CS') ?
@ -582,7 +582,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
gStateObj.push([key, value]);
break;
case 'SMask':
if (isName(value) && value.name === 'None') {
if (isName(value, 'None')) {
gStateObj.push([key, false]);
break;
}
@ -890,8 +890,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
assert(isStream(xobj), 'XObject should be a stream');
var type = xobj.dict.get('Subtype');
assert(isName(type),
'XObject should have a Name subtype');
assert(isName(type), 'XObject should have a Name subtype');
if (type.name === 'Form') {
stateManager.save();
@ -1602,8 +1601,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
assert(isStream(xobj), 'XObject should be a stream');
var type = xobj.dict.get('Subtype');
assert(isName(type),
'XObject should have a Name subtype');
assert(isName(type), 'XObject should have a Name subtype');
if ('Form' !== type.name) {
xobjsCache.key = name;