[Pkg-javascript-commits] [pdf.js] 178/210: Moves shared/function.js to core/
David Prévot
taffit at moszumanska.debian.org
Thu Jun 5 14:21:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch upstream
in repository pdf.js.
commit fcc4dfd9b5e619a8ffe48fa4ea2db15a440159a9
Author: Yury Delendik <ydelendik at mozilla.com>
Date: Wed May 21 13:06:23 2014 -0500
Moves shared/function.js to core/
---
examples/acroforms/index.html | 1 -
examples/helloworld/index.html | 1 -
make.js | 1 -
src/{shared => core}/function.js | 17 ++++++++++++++++-
src/shared/util.js | 14 --------------
src/worker_loader.js | 2 +-
test/font/font_test.html | 2 +-
test/test_slave.html | 1 -
test/unit/unit_test.html | 2 +-
web/viewer.html | 1 -
10 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/examples/acroforms/index.html b/examples/acroforms/index.html
index 6acdaef..5ac3fdc 100644
--- a/examples/acroforms/index.html
+++ b/examples/acroforms/index.html
@@ -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>
diff --git a/examples/helloworld/index.html b/examples/helloworld/index.html
index d303e67..b38060b 100644
--- a/examples/helloworld/index.html
+++ b/examples/helloworld/index.html
@@ -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>
diff --git a/make.js b/make.js
index 40de70f..60a126b 100644
--- a/make.js
+++ b/make.js
@@ -370,7 +370,6 @@ target.bundle = function(args) {
var SHARED_SRC_FILES = [
'shared/util.js',
- 'shared/function.js',
'shared/annotation.js',
];
diff --git a/src/shared/function.js b/src/core/function.js
similarity index 98%
rename from src/shared/function.js
rename to src/core/function.js
index b6e0f3a..dd4507c 100644
--- a/src/shared/function.js
+++ b/src/core/function.js
@@ -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) {
diff --git a/src/shared/util.js b/src/shared/util.js
index de115ce..6898ca3 100644
--- a/src/shared/util.js
+++ b/src/shared/util.js
@@ -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.
*
diff --git a/src/worker_loader.js b/src/worker_loader.js
index 0aca59d..6a8ddbf 100644
--- a/src/worker_loader.js
+++ b/src/worker_loader.js
@@ -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',
diff --git a/test/font/font_test.html b/test/font/font_test.html
index 1003ae2..743363f 100644
--- a/test/font/font_test.html
+++ b/test/font/font_test.html
@@ -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>
diff --git a/test/test_slave.html b/test/test_slave.html
index 195400f..1e03be4 100644
--- a/test/test_slave.html
+++ b/test/test_slave.html
@@ -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>
diff --git a/test/unit/unit_test.html b/test/unit/unit_test.html
index 02fc98a..2db04b1 100644
--- a/test/unit/unit_test.html
+++ b/test/unit/unit_test.html
@@ -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>
diff --git a/web/viewer.html b/web/viewer.html
index d16416d..39c05a2 100644
--- a/web/viewer.html
+++ b/web/viewer.html
@@ -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>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list