Browse Source

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

master v2.0.318
pdfjsbot 7 years ago
parent
commit
c15eeae6bc
  1. 2
      bower.json
  2. 690
      build/pdf.js
  3. 2
      build/pdf.js.map
  4. 2
      build/pdf.min.js
  5. 754
      build/pdf.worker.js
  6. 2
      build/pdf.worker.js.map
  7. 2
      build/pdf.worker.min.js
  8. 2
      lib/core/chunked_stream.js
  9. 2
      lib/core/cmap.js
  10. 4
      lib/core/fonts.js
  11. 2
      lib/core/worker.js
  12. 4
      lib/display/annotation_layer.js
  13. 8
      lib/display/api.js
  14. 2
      lib/display/dom_utils.js
  15. 4
      lib/display/global.js
  16. 4
      lib/pdf.js
  17. 4
      lib/pdf.worker.js
  18. 6
      lib/shared/compatibility.js
  19. 2
      package.json

2
bower.json

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

690
build/pdf.js

File diff suppressed because it is too large Load Diff

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

754
build/pdf.worker.js vendored

File diff suppressed because it is too large Load Diff

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

2
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

2
lib/core/chunked_stream.js

@ -356,7 +356,7 @@ var ChunkedStreamManager = function ChunkedStreamManagerClosure() { @@ -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);
}
}

2
lib/core/cmap.js

@ -684,7 +684,7 @@ var CMapFactory = function CMapFactoryClosure() { @@ -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) {

4
lib/core/fonts.js

@ -908,7 +908,7 @@ var Font = function FontClosure() { @@ -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() { @@ -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,

2
lib/core/worker.js

@ -223,7 +223,7 @@ var WorkerMessageHandler = { @@ -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 + '".'));
}

4
lib/display/annotation_layer.js

@ -501,7 +501,7 @@ var ChoiceWidgetAnnotationElement = function (_WidgetAnnotationElem4) { @@ -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) { @@ -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 + '"]';

8
lib/display/api.js

@ -178,7 +178,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -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 () { @@ -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() { @@ -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;

2
lib/display/dom_utils.js

@ -277,7 +277,7 @@ var SimpleXMLParser = function () { @@ -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) {

4
lib/display/global.js

@ -51,8 +51,8 @@ if (!_global_scope2.default.PDFJS) { @@ -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) {

4
lib/pdf.js

@ -21,8 +21,8 @@ @@ -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');

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@ @@ -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
lib/shared/compatibility.js

@ -116,6 +116,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -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;

2
package.json

@ -1,6 +1,6 @@ @@ -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": [

Loading…
Cancel
Save