Explorar o código

PDF.js version 2.0.318 - See mozilla/pdf.js@7fbeeebbffe68787117aade4b3c00c4728aac81c

pdfjsbot %!s(int64=7) %!d(string=hai) anos
pai
achega
c15eeae6bc

+ 1 - 1
bower.json

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

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 259 - 177
build/pdf.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
build/pdf.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
build/pdf.min.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 269 - 187
build/pdf.worker.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
build/pdf.worker.js.map


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
build/pdf.worker.min.js


+ 1 - 1
lib/core/chunked_stream.js

@@ -356,7 +356,7 @@ var ChunkedStreamManager = function ChunkedStreamManagerClosure() {
         var beginChunk = this.getBeginChunk(ranges[i].begin);
         var endChunk = this.getEndChunk(ranges[i].end);
         for (var chunk = beginChunk; chunk < endChunk; ++chunk) {
-          if (chunksToRequest.indexOf(chunk) < 0) {
+          if (!chunksToRequest.includes(chunk)) {
             chunksToRequest.push(chunk);
           }
         }

+ 1 - 1
lib/core/cmap.js

@@ -684,7 +684,7 @@ var CMapFactory = function CMapFactoryClosure() {
     } else if (name === 'Identity-V') {
       return Promise.resolve(new IdentityCMap(true, 2));
     }
-    if (BUILT_IN_CMAPS.indexOf(name) === -1) {
+    if (!BUILT_IN_CMAPS.includes(name)) {
       return Promise.reject(new Error('Unknown CMap name: ' + name));
     }
     if (!fetchBuiltInCMap) {

+ 2 - 2
lib/core/fonts.js

@@ -908,7 +908,7 @@ var Font = function FontClosure() {
         tables['post'] = null;
         for (var i = 0; i < numTables; i++) {
           var table = readTableEntry(font);
-          if (VALID_TABLES.indexOf(table.tag) < 0) {
+          if (!VALID_TABLES.includes(table.tag)) {
             continue;
           }
           if (table.length === 0) {
@@ -1556,7 +1556,7 @@ var Font = function FontClosure() {
               ttContext.functionsUsed[funcId] = true;
               if (funcId in ttContext.functionsStackDeltas) {
                 stack.length += ttContext.functionsStackDeltas[funcId];
-              } else if (funcId in ttContext.functionsDefined && functionsCalled.indexOf(funcId) < 0) {
+              } else if (funcId in ttContext.functionsDefined && !functionsCalled.includes(funcId)) {
                 callstack.push({
                   data: data,
                   i: i,

+ 1 - 1
lib/core/worker.js

@@ -223,7 +223,7 @@ var WorkerMessageHandler = {
     var cancelXHRs = null;
     var WorkerTasks = [];
     var apiVersion = docParams.apiVersion;
-    var workerVersion = '2.0.315';
+    var workerVersion = '2.0.318';
     if (apiVersion !== null && apiVersion !== workerVersion) {
       throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
     }

+ 2 - 2
lib/display/annotation_layer.js

@@ -501,7 +501,7 @@ var ChoiceWidgetAnnotationElement = function (_WidgetAnnotationElem4) {
         var optionElement = document.createElement('option');
         optionElement.textContent = option.displayValue;
         optionElement.value = option.exportValue;
-        if (this.data.fieldValue.indexOf(option.displayValue) >= 0) {
+        if (this.data.fieldValue.includes(option.displayValue)) {
           optionElement.setAttribute('selected', true);
         }
         selectElement.appendChild(optionElement);
@@ -529,7 +529,7 @@ var PopupAnnotationElement = function (_AnnotationElement4) {
     value: function render() {
       var IGNORE_TYPES = ['Line', 'Square', 'Circle', 'PolyLine', 'Polygon'];
       this.container.className = 'popupAnnotation';
-      if (IGNORE_TYPES.indexOf(this.data.parentType) >= 0) {
+      if (IGNORE_TYPES.includes(this.data.parentType)) {
         return this.container;
       }
       var selector = '[data-annotation-id="' + this.data.parentId + '"]';

+ 4 - 4
lib/display/api.js

@@ -178,7 +178,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
   if (worker.destroyed) {
     return Promise.reject(new Error('Worker was destroyed'));
   }
-  var apiVersion = '2.0.315';
+  var apiVersion = '2.0.318';
   source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
   source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
   source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@@ -650,7 +650,7 @@ var LoopbackPort = function () {
         var result;
         var buffer;
         if ((buffer = value.buffer) && (0, _util.isArrayBuffer)(buffer)) {
-          var transferable = transfers && transfers.indexOf(buffer) >= 0;
+          var transferable = transfers && transfers.includes(buffer);
           if (value === buffer) {
             result = value;
           } else if (transferable) {
@@ -1567,8 +1567,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
 }();
 var version, build;
 {
-  exports.version = version = '2.0.315';
-  exports.build = build = 'd42541d2';
+  exports.version = version = '2.0.318';
+  exports.build = build = '7fbeeebb';
 }
 exports.getDocument = getDocument;
 exports.LoopbackPort = LoopbackPort;

+ 1 - 1
lib/display/dom_utils.js

@@ -277,7 +277,7 @@ var SimpleXMLParser = function () {
   }, {
     key: '_decodeXML',
     value: function _decodeXML(text) {
-      if (text.indexOf('&') < 0) {
+      if (!text.includes('&')) {
         return text;
       }
       return text.replace(/&(#(x[0-9a-f]+|\d+)|\w+);/gi, function (all, entityName, number) {

+ 2 - 2
lib/display/global.js

@@ -51,8 +51,8 @@ if (!_global_scope2.default.PDFJS) {
 }
 var PDFJS = _global_scope2.default.PDFJS;
 {
-  PDFJS.version = '2.0.315';
-  PDFJS.build = 'd42541d2';
+  PDFJS.version = '2.0.318';
+  PDFJS.build = '7fbeeebb';
 }
 PDFJS.pdfBug = false;
 if (PDFJS.verbosity !== undefined) {

+ 2 - 2
lib/pdf.js

@@ -21,8 +21,8 @@
  */
 'use strict';
 
-var pdfjsVersion = '2.0.315';
-var pdfjsBuild = 'd42541d2';
+var pdfjsVersion = '2.0.318';
+var pdfjsBuild = '7fbeeebb';
 var pdfjsSharedUtil = require('./shared/util.js');
 var pdfjsDisplayGlobal = require('./display/global.js');
 var pdfjsDisplayAPI = require('./display/api.js');

+ 2 - 2
lib/pdf.worker.js

@@ -21,7 +21,7 @@
  */
 'use strict';
 
-var pdfjsVersion = '2.0.315';
-var pdfjsBuild = 'd42541d2';
+var pdfjsVersion = '2.0.318';
+var pdfjsBuild = '7fbeeebb';
 var pdfjsCoreWorker = require('./core/worker.js');
 exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

+ 6 - 0
lib/shared/compatibility.js

@@ -116,6 +116,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
       }
     };
   })();
+  (function checkStringIncludes() {
+    if (String.prototype.includes) {
+      return;
+    }
+    String.prototype.includes = require('core-js/fn/string/includes');
+  })();
   (function checkArrayIncludes() {
     if (Array.prototype.includes) {
       return;

+ 1 - 1
package.json

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

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio