Browse Source

PDF.js version 2.0.91 - See mozilla/pdf.js@6521d2fd941f26a1b7ae9b97f71842e49f5ff241

master v2.0.91
pdfjsbot 7 years ago
parent
commit
5ded374f3f
  1. 2
      bower.json
  2. 3018
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 2794
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 2
      build/pdf.min.js
  7. 2905
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 2
      build/pdf.worker.min.js
  10. 2
      lib/core/colorspace.js
  11. 24
      lib/core/murmurhash3.js
  12. 2
      lib/core/worker.js
  13. 6
      lib/display/api.js
  14. 5
      lib/display/global.js
  15. 4
      lib/pdf.js
  16. 4
      lib/pdf.worker.js
  17. 125
      lib/shared/compatibility.js
  18. 2
      package.json

2
bower.json

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

3018
build/pdf.combined.js

File diff suppressed because it is too large Load Diff

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

2794
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

2905
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/colorspace.js

@ -407,7 +407,7 @@ var IndexedCS = function IndexedCSClosure() { @@ -407,7 +407,7 @@ var IndexedCS = function IndexedCSClosure() {
for (var i = 0; i < length; ++i) {
this.lookup[i] = lookup.charCodeAt(i);
}
} else if (lookup instanceof Uint8Array || lookup instanceof Array) {
} else if (lookup instanceof Uint8Array) {
this.lookup = lookup;
} else {
throw new _util.FormatError('Unrecognized lookup table: ' + lookup);

24
lib/core/murmurhash3.js

@ -17,8 +17,9 @@ @@ -17,8 +17,9 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MurmurHash3_64 = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _util = require('../shared/util');
var MurmurHash3_64 = function MurmurHash3_64Closure(seed) {
var MASK_HIGH = 0xffff0000;
@ -30,11 +31,12 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { @@ -30,11 +31,12 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) {
}
MurmurHash3_64.prototype = {
update: function MurmurHash3_64_update(input) {
var i;
if (typeof input === 'string') {
var data = new Uint8Array(input.length * 2);
var length = 0;
for (i = 0; i < input.length; i++) {
var data = void 0,
length = void 0;
if ((0, _util.isString)(input)) {
data = new Uint8Array(input.length * 2);
length = 0;
for (var i = 0, ii = input.length; i < ii; i++) {
var code = input.charCodeAt(i);
if (code <= 0xff) {
data[length++] = code;
@ -43,7 +45,7 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { @@ -43,7 +45,7 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) {
data[length++] = code & 0xff;
}
}
} else if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && 'byteLength' in input) {
} else if ((0, _util.isArrayBuffer)(input)) {
data = input;
length = data.byteLength;
} else {
@ -60,9 +62,9 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { @@ -60,9 +62,9 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) {
var C2 = 0x1b873593;
var C1_LOW = C1 & MASK_LOW;
var C2_LOW = C2 & MASK_LOW;
for (i = 0; i < blockCounts; i++) {
if (i & 1) {
k1 = dataUint32[i];
for (var _i = 0; _i < blockCounts; _i++) {
if (_i & 1) {
k1 = dataUint32[_i];
k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;
k1 = k1 << 15 | k1 >>> 17;
k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;
@ -70,7 +72,7 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { @@ -70,7 +72,7 @@ var MurmurHash3_64 = function MurmurHash3_64Closure(seed) {
h1 = h1 << 13 | h1 >>> 19;
h1 = h1 * 5 + 0xe6546b64;
} else {
k2 = dataUint32[i];
k2 = dataUint32[_i];
k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW;
k2 = k2 << 15 | k2 >>> 17;
k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW;

2
lib/core/worker.js

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

6
lib/display/api.js

@ -172,7 +172,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -172,7 +172,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.89';
var apiVersion = '2.0.91';
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
source.chunkedViewerLoading = !!pdfDataRangeTransport;
@ -1535,8 +1535,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -1535,8 +1535,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.89';
exports.build = build = '97f1152d';
exports.version = version = '2.0.91';
exports.build = build = '6521d2fd';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

5
lib/display/global.js

@ -44,8 +44,8 @@ if (!_global_scope2.default.PDFJS) { @@ -44,8 +44,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.89';
PDFJS.build = '97f1152d';
PDFJS.version = '2.0.91';
PDFJS.build = '6521d2fd';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -110,7 +110,6 @@ PDFJS.getDocument = _api.getDocument; @@ -110,7 +110,6 @@ PDFJS.getDocument = _api.getDocument;
PDFJS.LoopbackPort = _api.LoopbackPort;
PDFJS.PDFDataRangeTransport = _api.PDFDataRangeTransport;
PDFJS.PDFWorker = _api.PDFWorker;
PDFJS.hasCanvasTypedArrays = true;
PDFJS.CustomStyle = _dom_utils.CustomStyle;
PDFJS.LinkTarget = _dom_utils.LinkTarget;
PDFJS.addLinkAttributes = _dom_utils.addLinkAttributes;

4
lib/pdf.js

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '2.0.89';
var pdfjsBuild = '97f1152d';
var pdfjsVersion = '2.0.91';
var pdfjsBuild = '6521d2fd';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
*/
'use strict';
var pdfjsVersion = '2.0.89';
var pdfjsBuild = '97f1152d';
var pdfjsVersion = '2.0.91';
var pdfjsBuild = '6521d2fd';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

125
lib/shared/compatibility.js

@ -34,131 +34,6 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -34,131 +34,6 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
globalScope.PDFJS = {};
}
PDFJS.compatibilityChecked = true;
(function checkTypedArrayCompatibility() {
if (typeof Uint8ClampedArray === 'undefined') {
globalScope.Uint8ClampedArray = require('core-js/fn/typed/uint8-clamped-array');
}
if (typeof Uint8Array !== 'undefined') {
if (typeof Uint8Array.prototype.subarray === 'undefined') {
Uint8Array.prototype.subarray = function subarray(start, end) {
return new Uint8Array(this.slice(start, end));
};
Float32Array.prototype.subarray = function subarray(start, end) {
return new Float32Array(this.slice(start, end));
};
}
if (typeof Float64Array === 'undefined') {
globalScope.Float64Array = Float32Array;
}
return;
}
function subarray(start, end) {
return new TypedArray(this.slice(start, end));
}
function setArrayOffset(array, offset) {
if (arguments.length < 2) {
offset = 0;
}
for (var i = 0, n = array.length; i < n; ++i, ++offset) {
this[offset] = array[i] & 0xFF;
}
}
function Uint32ArrayView(buffer, length) {
this.buffer = buffer;
this.byteLength = buffer.length;
this.length = length;
ensureUint32ArrayViewProps(this.length);
}
Uint32ArrayView.prototype = Object.create(null);
var uint32ArrayViewSetters = 0;
function createUint32ArrayProp(index) {
return {
get: function get() {
var buffer = this.buffer,
offset = index << 2;
return (buffer[offset] | buffer[offset + 1] << 8 | buffer[offset + 2] << 16 | buffer[offset + 3] << 24) >>> 0;
},
set: function set(value) {
var buffer = this.buffer,
offset = index << 2;
buffer[offset] = value & 255;
buffer[offset + 1] = value >> 8 & 255;
buffer[offset + 2] = value >> 16 & 255;
buffer[offset + 3] = value >>> 24 & 255;
}
};
}
function ensureUint32ArrayViewProps(length) {
while (uint32ArrayViewSetters < length) {
Object.defineProperty(Uint32ArrayView.prototype, uint32ArrayViewSetters, createUint32ArrayProp(uint32ArrayViewSetters));
uint32ArrayViewSetters++;
}
}
function TypedArray(arg1) {
var result, i, n;
if (typeof arg1 === 'number') {
result = [];
for (i = 0; i < arg1; ++i) {
result[i] = 0;
}
} else if ('slice' in arg1) {
result = arg1.slice(0);
} else {
result = [];
for (i = 0, n = arg1.length; i < n; ++i) {
result[i] = arg1[i];
}
}
result.subarray = subarray;
result.buffer = result;
result.byteLength = result.length;
result.set = setArrayOffset;
if ((typeof arg1 === 'undefined' ? 'undefined' : _typeof(arg1)) === 'object' && arg1.buffer) {
result.buffer = arg1.buffer;
}
return result;
}
globalScope.Uint8Array = TypedArray;
globalScope.Int8Array = TypedArray;
globalScope.Int32Array = TypedArray;
globalScope.Uint16Array = TypedArray;
globalScope.Float32Array = TypedArray;
globalScope.Float64Array = TypedArray;
globalScope.Uint32Array = function () {
if (arguments.length === 3) {
if (arguments[1] !== 0) {
throw new Error('offset !== 0 is not supported');
}
return new Uint32ArrayView(arguments[0], arguments[2]);
}
return TypedArray.apply(this, arguments);
};
})();
(function canvasPixelArrayBuffer() {
if (!hasDOM || !window.CanvasPixelArray) {
return;
}
var cpaProto = window.CanvasPixelArray.prototype;
if ('buffer' in cpaProto) {
return;
}
Object.defineProperty(cpaProto, 'buffer', {
get: function get() {
return this;
},
enumerable: false,
configurable: true
});
Object.defineProperty(cpaProto, 'byteLength', {
get: function get() {
return this.length;
},
enumerable: false,
configurable: true
});
})();
(function normalizeURLObject() {
if (!globalScope.URL) {
globalScope.URL = globalScope.webkitURL;

2
package.json

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

Loading…
Cancel
Save