[Pkg-javascript-commits] [pdf.js] 293/414: Moves shared/global to display/global

David Prévot taffit at moszumanska.debian.org
Tue Jun 28 17:12:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit a8e5912cb16612d39a83e7bf20e43a9b6567e02e
Author: Yury Delendik <ydelendik at mozilla.com>
Date:   Wed Mar 2 19:32:20 2016 -0600

    Moves shared/global to display/global
---
 src/display/api.js                | 12 ++++++------
 src/display/dom_utils.js          | 11 +++++------
 src/display/font_loader.js        | 15 +++++++--------
 src/{shared => display}/global.js |  6 +++---
 src/display/text_layer.js         | 10 +++++-----
 src/main_loader.js                | 11 ++++++-----
 src/pdf.js                        |  2 +-
 test/unit/unit_test.html          |  6 +++---
 8 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/src/display/api.js b/src/display/api.js
index e7ad3dd..40872b3 100644
--- a/src/display/api.js
+++ b/src/display/api.js
@@ -21,19 +21,19 @@
     define('pdfjs/display/api', ['exports', 'pdfjs/shared/util',
       'pdfjs/display/font_loader', 'pdfjs/display/canvas',
       'pdfjs/display/metadata', 'pdfjs/display/dom_utils',
-      'pdfjs/shared/global', 'require'], factory);
+      'pdfjs/display/global', 'require'], factory);
   } else if (typeof exports !== 'undefined') {
     factory(exports, require('../shared/util.js'), require('./font_loader.js'),
       require('./canvas.js'), require('./metadata.js'),
-      require('./dom_utils.js'), require('../shared/global.js'));
+      require('./dom_utils.js'), require('./global.js'));
   } else {
     factory((root.pdfjsDisplayAPI = {}), root.pdfjsSharedUtil,
       root.pdfjsDisplayFontLoader, root.pdfjsDisplayCanvas,
       root.pdfjsDisplayMetadata, root.pdfjsDisplayDOMUtils,
-      root.pdfjsSharedGlobal);
+      root.pdfjsDisplayGlobal);
   }
 }(this, function (exports, sharedUtil, displayFontLoader, displayCanvas,
-                  displayMetadata, displayDOMUtils, sharedGlobal, amdRequire) {
+                  displayMetadata, displayDOMUtils, displayGlobal, amdRequire) {
 
 var InvalidPDFException = sharedUtil.InvalidPDFException;
 var MessageHandler = sharedUtil.MessageHandler;
@@ -59,8 +59,8 @@ var FontLoader = displayFontLoader.FontLoader;
 var CanvasGraphics = displayCanvas.CanvasGraphics;
 var createScratchCanvas = displayCanvas.createScratchCanvas;
 var Metadata = displayMetadata.Metadata;
-var PDFJS = sharedGlobal.PDFJS;
-var globalScope = sharedGlobal.globalScope;
+var PDFJS = displayGlobal.PDFJS;
+var globalScope = displayGlobal.globalScope;
 
 var DEFAULT_RANGE_CHUNK_SIZE = 65536; // 2^16 = 65536
 
diff --git a/src/display/dom_utils.js b/src/display/dom_utils.js
index f061b53..0d56f29 100644
--- a/src/display/dom_utils.js
+++ b/src/display/dom_utils.js
@@ -18,21 +18,20 @@
 (function (root, factory) {
   if (typeof define === 'function' && define.amd) {
     define('pdfjs/display/dom_utils', ['exports', 'pdfjs/shared/util',
-      'pdfjs/shared/global'], factory);
+      'pdfjs/display/global'], factory);
   } else if (typeof exports !== 'undefined') {
-    factory(exports, require('../shared/util.js'),
-      require('../shared/global.js'));
+    factory(exports, require('../shared/util.js'), require('./global.js'));
   } else {
     factory((root.pdfjsDisplayDOMUtils = {}), root.pdfjsSharedUtil,
-      root.pdfjsSharedGlobal);
+      root.pdfjsDisplayGlobal);
   }
-}(this, function (exports, sharedUtil, sharedGlobal) {
+}(this, function (exports, sharedUtil, displayGlobal) {
 
 var deprecated = sharedUtil.deprecated;
 var removeNullCharacters = sharedUtil.removeNullCharacters;
 var shadow = sharedUtil.shadow;
 var warn = sharedUtil.warn;
-var PDFJS = sharedGlobal.PDFJS;
+var PDFJS = displayGlobal.PDFJS;
 
 /**
  * Optimised CSS custom property getter/setter.
diff --git a/src/display/font_loader.js b/src/display/font_loader.js
index b78303e..3109e86 100644
--- a/src/display/font_loader.js
+++ b/src/display/font_loader.js
@@ -19,15 +19,14 @@
 (function (root, factory) {
   if (typeof define === 'function' && define.amd) {
     define('pdfjs/display/font_loader', ['exports', 'pdfjs/shared/util',
-      'pdfjs/shared/global'], factory);
+      'pdfjs/display/global'], factory);
   } else if (typeof exports !== 'undefined') {
-    factory(exports, require('../shared/util.js'),
-      require('../shared/global.js'));
+    factory(exports, require('../shared/util.js'), require('./global.js'));
   } else {
     factory((root.pdfjsDisplayFontLoader = {}), root.pdfjsSharedUtil,
-      root.pdfjsSharedGlobal);
+      root.pdfjsDisplayGlobal);
   }
-}(this, function (exports, sharedUtil, sharedGlobal) {
+}(this, function (exports, sharedUtil, displayGlobal) {
 
 var assert = sharedUtil.assert;
 var bytesToString = sharedUtil.bytesToString;
@@ -35,9 +34,9 @@ var string32 = sharedUtil.string32;
 var shadow = sharedUtil.shadow;
 var warn = sharedUtil.warn;
 
-var PDFJS = sharedGlobal.PDFJS;
-var globalScope = sharedGlobal.globalScope;
-var isWorker = sharedGlobal.isWorker;
+var PDFJS = displayGlobal.PDFJS;
+var globalScope = displayGlobal.globalScope;
+var isWorker = displayGlobal.isWorker;
 
 function FontLoader(docId) {
   this.docId = docId;
diff --git a/src/shared/global.js b/src/display/global.js
similarity index 93%
rename from src/shared/global.js
rename to src/display/global.js
index f21d4c3..89ccde0 100644
--- a/src/shared/global.js
+++ b/src/display/global.js
@@ -18,11 +18,11 @@
 
 (function (root, factory) {
   if (typeof define === 'function' && define.amd) {
-    define('pdfjs/shared/global', ['exports', 'pdfjs/shared/util'], factory);
+    define('pdfjs/display/global', ['exports', 'pdfjs/shared/util'], factory);
   } else if (typeof exports !== 'undefined') {
-    factory(exports, require('./util.js'));
+    factory(exports, require('../shared/util.js'));
   } else {
-    factory((root.pdfjsSharedGlobal = {}), root.pdfjsSharedUtil);
+    factory((root.pdfjsDisplayGlobal = {}), root.pdfjsSharedUtil);
   }
 }(this, function (exports, sharedUtil) {
 
diff --git a/src/display/text_layer.js b/src/display/text_layer.js
index 29f197e..62b59a3 100644
--- a/src/display/text_layer.js
+++ b/src/display/text_layer.js
@@ -18,20 +18,20 @@
 (function (root, factory) {
   if (typeof define === 'function' && define.amd) {
     define('pdfjs/display/text_layer', ['exports', 'pdfjs/shared/util',
-      'pdfjs/display/dom_utils', 'pdfjs/shared/global'], factory);
+      'pdfjs/display/dom_utils', 'pdfjs/display/global'], factory);
   } else if (typeof exports !== 'undefined') {
     factory(exports, require('../shared/util.js'), require('./dom_utils.js'),
-      require('../shared/global.js'));
+      require('./global.js'));
   } else {
     factory((root.pdfjsDisplayTextLayer = {}), root.pdfjsSharedUtil,
-      root.pdfjsDisplayDOMUtils, root.pdfjsSharedGlobal);
+      root.pdfjsDisplayDOMUtils, root.pdfjsDisplayGlobal);
   }
-}(this, function (exports, sharedUtil, displayDOMUtils, sharedGlobal) {
+}(this, function (exports, sharedUtil, displayDOMUtils, displayGlobal) {
 
 var Util = sharedUtil.Util;
 var createPromiseCapability = sharedUtil.createPromiseCapability;
 var CustomStyle = displayDOMUtils.CustomStyle;
-var PDFJS = sharedGlobal.PDFJS;
+var PDFJS = displayGlobal.PDFJS;
 
 /**
  * Text layer render parameters.
diff --git a/src/main_loader.js b/src/main_loader.js
index dca02af..5ac1c42 100644
--- a/src/main_loader.js
+++ b/src/main_loader.js
@@ -19,23 +19,24 @@
   if (typeof define === 'function' && define.amd) {
     define('pdfjs/main_loader', ['exports', 'pdfjs/display/api',
       'pdfjs/display/annotation_layer', 'pdfjs/display/text_layer',
-      'pdfjs/display/dom_utils', 'pdfjs/shared/util', 'pdfjs/shared/global'],
+      'pdfjs/display/dom_utils', 'pdfjs/shared/util', 'pdfjs/display/global'],
       factory);
   } else if (typeof exports !== 'undefined') {
     factory(exports, require('./display/api.js'),
       require('./display/annotation_layer.js'),
       require('./display/text_layer.js'), require('./display/dom_utils.js'),
-      require('./shared/util.js'), require('./shared/global.js'));
+      require('./shared/util.js'), require('./display/global.js'));
   } else {
     factory((root.pdfjsMainLoader = {}), root.pdfjsDisplayAPI,
       root.pdfjsDisplayAnnotationLayer, root.pdfjsDisplayTextLayer,
-      root.pdfjsDisplayDOMUtils, root.pdfjsSharedUtil, root.pdfjsSharedGlobal);
+      root.pdfjsDisplayDOMUtils, root.pdfjsSharedUtil, root.pdfjsDisplayGlobal);
   }
 }(this, function (exports, displayAPI, displayAnnotationLayer,
-                  displayTextLayer, displayDOMUtils, sharedUtil, sharedGlobal) {
+                  displayTextLayer, displayDOMUtils, sharedUtil,
+                  displayGlobal) {
 
   // Sync the exports below with ./pdf.js file/template.
-  exports.PDFJS = sharedGlobal.PDFJS;
+  exports.PDFJS = displayGlobal.PDFJS;
 
   exports.getDocument = displayAPI.getDocument;
   exports.PDFDataRangeTransport = displayAPI.PDFDataRangeTransport;
diff --git a/src/pdf.js b/src/pdf.js
index 6a5c880..c9ef03c 100644
--- a/src/pdf.js
+++ b/src/pdf.js
@@ -44,7 +44,7 @@
   }).call(pdfjsLibs);
 
 //#if MAIN_FILE
-  exports.PDFJS = pdfjsLibs.pdfjsSharedGlobal.PDFJS;
+  exports.PDFJS = pdfjsLibs.pdfjsDisplayGlobal.PDFJS;
   exports.getDocument = pdfjsLibs.pdfjsDisplayAPI.getDocument;
   exports.PDFDataRangeTransport =
     pdfjsLibs.pdfjsDisplayAPI.PDFDataRangeTransport;
diff --git a/test/unit/unit_test.html b/test/unit/unit_test.html
index 7e2a6c6..44762c8 100644
--- a/test/unit/unit_test.html
+++ b/test/unit/unit_test.html
@@ -46,20 +46,20 @@
 
     function initializePDFJS(callback) {
       require.config({paths: {'pdfjs': '../../src'}});
-      require(['pdfjs/shared/util', 'pdfjs/shared/global', 'pdfjs/core/primitives',
+      require(['pdfjs/shared/util', 'pdfjs/display/global', 'pdfjs/core/primitives',
           'pdfjs/core/annotation', 'pdfjs/core/crypto', 'pdfjs/core/stream',
           'pdfjs/core/fonts', 'pdfjs/core/ps_parser', 'pdfjs/core/function',
           'pdfjs/core/parser', 'pdfjs/core/evaluator', 'pdfjs/core/cmap',
           'pdfjs/core/worker', 'pdfjs/core/network', 'pdfjs/display/api',
           'pdfjs/display/metadata', 'pdfjs/display/dom_utils'],
-          function (sharedUtil, sharedGlobal, corePrimitives, coreAnnotation,
+          function (sharedUtil, displayGlobal, corePrimitives, coreAnnotation,
                     coreCrypto, coreStream, coreFonts, corePsParser, coreFunction,
                     coreParser, coreEvaluator, coreCMap, coreWorker, coreNetwork,
                     displayAPI, displayMetadata, displayDOMUtils) {
 
         pdfjsLibs = {
           sharedUtil: sharedUtil,
-          sharedGlobal: sharedGlobal,
+          displayGlobal: displayGlobal,
           corePrimitives: corePrimitives,
           coreAnnotation: coreAnnotation,
           coreCrypto: coreCrypto,

-- 
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