mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Moves shared/function.js to core/
This commit is contained in:
parent
7a19085159
commit
fcc4dfd9b5
10 changed files with 19 additions and 23 deletions
|
@ -14,7 +14,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals PostScriptLexer, PostScriptParser, error, info, isArray, isBool */
|
||||
/* globals PostScriptLexer, PostScriptParser, error, info, isArray, isBool,
|
||||
isDict, isStream */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -436,6 +437,20 @@ var PDFFunction = (function PDFFunctionClosure() {
|
|||
};
|
||||
})();
|
||||
|
||||
function isPDFFunction(v) {
|
||||
var fnDict;
|
||||
if (typeof v != 'object') {
|
||||
return false;
|
||||
} else if (isDict(v)) {
|
||||
fnDict = v;
|
||||
} else if (isStream(v)) {
|
||||
fnDict = v.dict;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return fnDict.has('FunctionType');
|
||||
}
|
||||
|
||||
var PostScriptStack = (function PostScriptStackClosure() {
|
||||
var MAX_STACK_SIZE = 100;
|
||||
function PostScriptStack(initialStack) {
|
|
@ -963,20 +963,6 @@ function isRef(v) {
|
|||
return v instanceof Ref;
|
||||
}
|
||||
|
||||
function isPDFFunction(v) {
|
||||
var fnDict;
|
||||
if (typeof v != 'object') {
|
||||
return false;
|
||||
} else if (isDict(v)) {
|
||||
fnDict = v;
|
||||
} else if (isStream(v)) {
|
||||
fnDict = v.dict;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return fnDict.has('FunctionType');
|
||||
}
|
||||
|
||||
/**
|
||||
* Promise Capability object.
|
||||
*
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
// List of shared files to include;
|
||||
var sharedFiles = [
|
||||
'shared/util.js',
|
||||
'shared/function.js',
|
||||
'shared/annotation.js'
|
||||
];
|
||||
|
||||
|
@ -34,6 +33,7 @@ var otherFiles = [
|
|||
'core/obj.js',
|
||||
'core/charsets.js',
|
||||
'core/cidmaps.js',
|
||||
'core/function.js',
|
||||
'core/colorspace.js',
|
||||
'core/crypto.js',
|
||||
'core/pattern.js',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue