Browse Source

Moves shared/function.js to core/

Yury Delendik 11 years ago
parent
commit
fcc4dfd9b5
  1. 1
      examples/acroforms/index.html
  2. 1
      examples/helloworld/index.html
  3. 1
      make.js
  4. 17
      src/core/function.js
  5. 14
      src/shared/util.js
  6. 2
      src/worker_loader.js
  7. 2
      test/font/font_test.html
  8. 1
      test/test_slave.html
  9. 2
      test/unit/unit_test.html
  10. 1
      web/viewer.html

1
examples/acroforms/index.html

@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
<!-- In production, only one script (pdf.js) is necessary -->
<!-- In production, change the content of PDFJS.workerSrc below -->
<script src="../../src/shared/util.js"></script>
<script src="../../src/shared/function.js"></script>
<script src="../../src/shared/annotation.js"></script>
<script src="../../src/display/api.js"></script>
<script src="../../src/display/metadata.js"></script>

1
examples/helloworld/index.html

@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
<!-- In production, only one script (pdf.js) is necessary -->
<!-- In production, change the content of PDFJS.workerSrc below -->
<script src="../../src/shared/util.js"></script>
<script src="../../src/shared/function.js"></script>
<script src="../../src/shared/annotation.js"></script>
<script src="../../src/display/api.js"></script>
<script src="../../src/display/metadata.js"></script>

1
make.js

@ -370,7 +370,6 @@ target.bundle = function(args) { @@ -370,7 +370,6 @@ target.bundle = function(args) {
var SHARED_SRC_FILES = [
'shared/util.js',
'shared/function.js',
'shared/annotation.js',
];

17
src/shared/function.js → src/core/function.js

@ -14,7 +14,8 @@ @@ -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() { @@ -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) {

14
src/shared/util.js

@ -963,20 +963,6 @@ function isRef(v) { @@ -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.
*

2
src/worker_loader.js

@ -21,7 +21,6 @@ @@ -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 = [ @@ -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',

2
test/font/font_test.html

@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
<script src="../../src/display/webgl.js"></script>
<script src="../../src/core/obj.js"></script>
<script src="../../src/shared/annotation.js"></script>
<script src="../../src/shared/function.js"></script>
<script src="../../src/core/function.js"></script>
<script src="../../src/core/charsets.js"></script>
<script src="../../src/core/cidmaps.js"></script>
<script src="../../src/core/colorspace.js"></script>

1
test/test_slave.html

@ -20,7 +20,6 @@ limitations under the License. @@ -20,7 +20,6 @@ limitations under the License.
<title>pdf.js test slave</title>
<style type="text/css"></style>
<script src="/src/shared/util.js"></script>
<script src="/src/shared/function.js"></script>
<script src="/src/shared/annotation.js"></script>
<script src="/src/display/api.js"></script>
<script src="/src/display/metadata.js"></script>

2
test/unit/unit_test.html

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
<script src="../../src/display/webgl.js"></script>
<script src="../../src/core/obj.js"></script>
<script src="../../src/shared/annotation.js"></script>
<script src="../../src/shared/function.js"></script>
<script src="../../src/core/function.js"></script>
<script src="../../src/core/charsets.js"></script>
<script src="../../src/core/cidmaps.js"></script>
<script src="../../src/core/colorspace.js"></script>

1
web/viewer.html

@ -48,7 +48,6 @@ http://sourceforge.net/adobe/cmap/wiki/License/ @@ -48,7 +48,6 @@ http://sourceforge.net/adobe/cmap/wiki/License/
<!--#if !PRODUCTION-->
<script src="../src/shared/util.js"></script>
<script src="../src/shared/function.js"></script>
<script src="../src/shared/annotation.js"></script>
<script src="../src/display/api.js"></script>
<script src="../src/display/metadata.js"></script>

Loading…
Cancel
Save