Browse Source

PDF.js version 1.8.376 - See mozilla/pdf.js@5df0cccaa33f0713190f9fd9d63950477c4487ee

pdfjsbot 8 years ago
parent
commit
ea0cbd8970

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.8.374",
+  "version": "1.8.376",
   "main": [
     "build/pdf.js",
     "build/pdf.worker.js"

+ 7 - 7
build/pdf.combined.js

@@ -12827,8 +12827,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
 }();
 var version, build;
 {
-  exports.version = version = '1.8.374';
-  exports.build = build = 'b4c35857';
+  exports.version = version = '1.8.376';
+  exports.build = build = '5df0ccca';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;
@@ -23677,7 +23677,7 @@ var Catalog = function CatalogClosure() {
             if (isString(url)) {
               var baseUrl = url.split('#')[0];
               if (isString(remoteDest)) {
-                url = baseUrl + '#' + (/^\d+$/.test(remoteDest) ? 'nameddest=' : '') + remoteDest;
+                url = baseUrl + '#' + remoteDest;
               } else if (isArray(remoteDest)) {
                 url = baseUrl + '#' + JSON.stringify(remoteDest);
               }
@@ -28240,8 +28240,8 @@ if (!_util.globalScope.PDFJS) {
 }
 var PDFJS = _util.globalScope.PDFJS;
 {
-  PDFJS.version = '1.8.374';
-  PDFJS.build = 'b4c35857';
+  PDFJS.version = '1.8.376';
+  PDFJS.build = '5df0ccca';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {
@@ -43834,8 +43834,8 @@ exports.TilingPattern = TilingPattern;
 "use strict";
 
 
-var pdfjsVersion = '1.8.374';
-var pdfjsBuild = 'b4c35857';
+var pdfjsVersion = '1.8.376';
+var pdfjsBuild = '5df0ccca';
 var pdfjsSharedUtil = __w_pdfjs_require__(0);
 var pdfjsDisplayGlobal = __w_pdfjs_require__(26);
 var pdfjsDisplayAPI = __w_pdfjs_require__(10);

File diff suppressed because it is too large
+ 0 - 0
build/pdf.combined.js.map


+ 6 - 6
build/pdf.js

@@ -3535,8 +3535,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
 }();
 var version, build;
 {
-  exports.version = version = '1.8.374';
-  exports.build = build = 'b4c35857';
+  exports.version = version = '1.8.376';
+  exports.build = build = '5df0ccca';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;
@@ -5509,8 +5509,8 @@ if (!_util.globalScope.PDFJS) {
 }
 var PDFJS = _util.globalScope.PDFJS;
 {
-  PDFJS.version = '1.8.374';
-  PDFJS.build = 'b4c35857';
+  PDFJS.version = '1.8.376';
+  PDFJS.build = '5df0ccca';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {
@@ -8012,8 +8012,8 @@ exports.TilingPattern = TilingPattern;
 "use strict";
 
 
-var pdfjsVersion = '1.8.374';
-var pdfjsBuild = 'b4c35857';
+var pdfjsVersion = '1.8.376';
+var pdfjsBuild = '5df0ccca';
 var pdfjsSharedUtil = __w_pdfjs_require__(0);
 var pdfjsDisplayGlobal = __w_pdfjs_require__(9);
 var pdfjsDisplayAPI = __w_pdfjs_require__(3);

File diff suppressed because it is too large
+ 0 - 0
build/pdf.js.map


File diff suppressed because it is too large
+ 0 - 0
build/pdf.min.js


+ 3 - 3
build/pdf.worker.js

@@ -20664,7 +20664,7 @@ var Catalog = function CatalogClosure() {
             if (isString(url)) {
               var baseUrl = url.split('#')[0];
               if (isString(remoteDest)) {
-                url = baseUrl + '#' + (/^\d+$/.test(remoteDest) ? 'nameddest=' : '') + remoteDest;
+                url = baseUrl + '#' + remoteDest;
               } else if (isArray(remoteDest)) {
                 url = baseUrl + '#' + JSON.stringify(remoteDest);
               }
@@ -37150,8 +37150,8 @@ exports.Type1Parser = Type1Parser;
 "use strict";
 
 
-var pdfjsVersion = '1.8.374';
-var pdfjsBuild = 'b4c35857';
+var pdfjsVersion = '1.8.376';
+var pdfjsBuild = '5df0ccca';
 var pdfjsCoreWorker = __w_pdfjs_require__(8);
 {
   __w_pdfjs_require__(19);

File diff suppressed because it is too large
+ 0 - 0
build/pdf.worker.js.map


File diff suppressed because it is too large
+ 0 - 0
build/pdf.worker.min.js


+ 1 - 1
lib/core/obj.js

@@ -590,7 +590,7 @@ var Catalog = function CatalogClosure() {
             if (isString(url)) {
               var baseUrl = url.split('#')[0];
               if (isString(remoteDest)) {
-                url = baseUrl + '#' + (/^\d+$/.test(remoteDest) ? 'nameddest=' : '') + remoteDest;
+                url = baseUrl + '#' + remoteDest;
               } else if (isArray(remoteDest)) {
                 url = baseUrl + '#' + JSON.stringify(remoteDest);
               }

+ 2 - 2
lib/display/api.js

@@ -1418,8 +1418,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
 }();
 var version, build;
 {
-  exports.version = version = '1.8.374';
-  exports.build = build = 'b4c35857';
+  exports.version = version = '1.8.376';
+  exports.build = build = '5df0ccca';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;

+ 2 - 2
lib/display/global.js

@@ -39,8 +39,8 @@ if (!_util.globalScope.PDFJS) {
 }
 var PDFJS = _util.globalScope.PDFJS;
 {
-  PDFJS.version = '1.8.374';
-  PDFJS.build = 'b4c35857';
+  PDFJS.version = '1.8.376';
+  PDFJS.build = '5df0ccca';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {

+ 2 - 2
lib/pdf.js

@@ -14,8 +14,8 @@
  */
 'use strict';
 
-var pdfjsVersion = '1.8.374';
-var pdfjsBuild = 'b4c35857';
+var pdfjsVersion = '1.8.376';
+var pdfjsBuild = '5df0ccca';
 var pdfjsSharedUtil = require('./shared/util.js');
 var pdfjsDisplayGlobal = require('./display/global.js');
 var pdfjsDisplayAPI = require('./display/api.js');

+ 2 - 2
lib/pdf.worker.js

@@ -14,8 +14,8 @@
  */
 'use strict';
 
-var pdfjsVersion = '1.8.374';
-var pdfjsBuild = 'b4c35857';
+var pdfjsVersion = '1.8.376';
+var pdfjsBuild = '5df0ccca';
 var pdfjsCoreWorker = require('./core/worker.js');
 {
   require('./core/network.js');

+ 2 - 2
lib/test/unit/annotation_spec.js

@@ -413,8 +413,8 @@ describe('annotation', function () {
       var annotation = annotationFactory.create(xref, annotationRef, pdfManagerMock, idFactoryMock);
       var data = annotation.data;
       expect(data.annotationType).toEqual(_util.AnnotationType.LINK);
-      expect(data.url).toEqual('http://www.example.com/test.pdf#nameddest=15');
-      expect(data.unsafeUrl).toEqual('http://www.example.com/test.pdf#nameddest=15');
+      expect(data.url).toEqual('http://www.example.com/test.pdf#15');
+      expect(data.unsafeUrl).toEqual('http://www.example.com/test.pdf#15');
       expect(data.dest).toBeUndefined();
       expect(data.newWindow).toBeFalsy();
     });

+ 4 - 4
lib/test/unit/api_spec.js

@@ -803,11 +803,11 @@ describe('api', function () {
         var docBaseUrlAnnotations = data[1];
         var invalidDocBaseUrlAnnotations = data[2];
         expect(defaultAnnotations[0].url).toBeUndefined();
-        expect(defaultAnnotations[0].unsafeUrl).toEqual('../../0021/002156/215675E.pdf#nameddest=15');
-        expect(docBaseUrlAnnotations[0].url).toEqual('http://www.example.com/0021/002156/215675E.pdf#nameddest=15');
-        expect(docBaseUrlAnnotations[0].unsafeUrl).toEqual('../../0021/002156/215675E.pdf#nameddest=15');
+        expect(defaultAnnotations[0].unsafeUrl).toEqual('../../0021/002156/215675E.pdf#15');
+        expect(docBaseUrlAnnotations[0].url).toEqual('http://www.example.com/0021/002156/215675E.pdf#15');
+        expect(docBaseUrlAnnotations[0].unsafeUrl).toEqual('../../0021/002156/215675E.pdf#15');
         expect(invalidDocBaseUrlAnnotations[0].url).toBeUndefined();
-        expect(invalidDocBaseUrlAnnotations[0].unsafeUrl).toEqual('../../0021/002156/215675E.pdf#nameddest=15');
+        expect(invalidDocBaseUrlAnnotations[0].unsafeUrl).toEqual('../../0021/002156/215675E.pdf#15');
         Promise.all([defaultLoadingTask.destroy(), docBaseUrlLoadingTask.destroy(), invalidDocBaseUrlLoadingTask.destroy()]).then(done);
       }).catch(function (reason) {
         done.fail(reason);

+ 4 - 7
lib/web/pdf_link_service.js

@@ -25,10 +25,6 @@ var _dom_events = require('./dom_events');
 
 var _ui_utils = require('./ui_utils');
 
-var PageNumberRegExp = /^\d+$/;
-function isPageNumber(str) {
-  return PageNumberRegExp.test(str);
-}
 var PDFLinkService = function PDFLinkServiceClosure() {
   function PDFLinkService(options) {
     options = options || {};
@@ -114,9 +110,9 @@ var PDFLinkService = function PDFLinkServiceClosure() {
         goToDestination(destination[0]);
       });
     },
-    getDestinationHash: function PDFLinkService_getDestinationHash(dest) {
+    getDestinationHash: function getDestinationHash(dest) {
       if (typeof dest === 'string') {
-        return this.getAnchorUrl('#' + (isPageNumber(dest) ? 'nameddest=' : '') + escape(dest));
+        return this.getAnchorUrl('#' + escape(dest));
       }
       if (dest instanceof Array) {
         var str = JSON.stringify(dest);
@@ -124,6 +120,7 @@ var PDFLinkService = function PDFLinkServiceClosure() {
       }
       return this.getAnchorUrl('');
     },
+
     getAnchorUrl: function PDFLinkService_getAnchorUrl(anchor) {
       return (this.baseUrl || '') + anchor;
     },
@@ -186,7 +183,7 @@ var PDFLinkService = function PDFLinkServiceClosure() {
           });
         }
       } else {
-        if (isPageNumber(hash) && hash <= this.pagesCount) {
+        if (/^\d+$/.test(hash) && hash <= this.pagesCount) {
           console.warn('PDFLinkService_setHash: specifying a page number ' + 'directly after the hash symbol (#) is deprecated, ' + 'please use the "#page=' + hash + '" form instead.');
           this.page = hash | 0;
         }

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.8.374",
+  "version": "1.8.376",
   "main": "build/pdf.js",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [

+ 4 - 7
web/pdf_viewer.js

@@ -682,10 +682,6 @@ var _dom_events = __w_pdfjs_require__(2);
 
 var _ui_utils = __w_pdfjs_require__(1);
 
-var PageNumberRegExp = /^\d+$/;
-function isPageNumber(str) {
-  return PageNumberRegExp.test(str);
-}
 var PDFLinkService = function PDFLinkServiceClosure() {
   function PDFLinkService(options) {
     options = options || {};
@@ -771,9 +767,9 @@ var PDFLinkService = function PDFLinkServiceClosure() {
         goToDestination(destination[0]);
       });
     },
-    getDestinationHash: function PDFLinkService_getDestinationHash(dest) {
+    getDestinationHash: function getDestinationHash(dest) {
       if (typeof dest === 'string') {
-        return this.getAnchorUrl('#' + (isPageNumber(dest) ? 'nameddest=' : '') + escape(dest));
+        return this.getAnchorUrl('#' + escape(dest));
       }
       if (dest instanceof Array) {
         var str = JSON.stringify(dest);
@@ -781,6 +777,7 @@ var PDFLinkService = function PDFLinkServiceClosure() {
       }
       return this.getAnchorUrl('');
     },
+
     getAnchorUrl: function PDFLinkService_getAnchorUrl(anchor) {
       return (this.baseUrl || '') + anchor;
     },
@@ -843,7 +840,7 @@ var PDFLinkService = function PDFLinkServiceClosure() {
           });
         }
       } else {
-        if (isPageNumber(hash) && hash <= this.pagesCount) {
+        if (/^\d+$/.test(hash) && hash <= this.pagesCount) {
           console.warn('PDFLinkService_setHash: specifying a page number ' + 'directly after the hash symbol (#) is deprecated, ' + 'please use the "#page=' + hash + '" form instead.');
           this.page = hash | 0;
         }

File diff suppressed because it is too large
+ 0 - 0
web/pdf_viewer.js.map


Some files were not shown because too many files changed in this diff