зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1475878 - Update pdf.js to version 2.0.688. r=bdahl
This commit is contained in:
Родитель
048a40d18e
Коммит
93541b3381
|
@ -1,5 +1,5 @@
|
|||
This is the PDF.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 2.0.673
|
||||
Current extension version is: 2.0.688
|
||||
|
||||
Taken from upstream commit: 31012570
|
||||
Taken from upstream commit: 61db85ab
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.0.673';
|
||||
var pdfjsBuild = '31012570';
|
||||
var pdfjsVersion = '2.0.688';
|
||||
var pdfjsBuild = '61db85ab';
|
||||
var pdfjsSharedUtil = __w_pdfjs_require__(1);
|
||||
var pdfjsDisplayAPI = __w_pdfjs_require__(7);
|
||||
var pdfjsDisplayTextLayer = __w_pdfjs_require__(19);
|
||||
|
@ -178,7 +178,7 @@ exports.apiCompatibilityParams = pdfjsDisplayAPICompatibility.apiCompatibilityPa
|
|||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.URL = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.getInheritableProperty = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.NotImplementedException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
|
||||
exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.URL = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.getInheritableProperty = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.createBlob = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.toRomanNumerals = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PasswordResponses = exports.PasswordException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined;
|
||||
|
||||
__w_pdfjs_require__(2);
|
||||
|
||||
|
@ -554,15 +554,6 @@ var UnexpectedResponseException = function UnexpectedResponseExceptionClosure()
|
|||
UnexpectedResponseException.constructor = UnexpectedResponseException;
|
||||
return UnexpectedResponseException;
|
||||
}();
|
||||
var NotImplementedException = function NotImplementedExceptionClosure() {
|
||||
function NotImplementedException(msg) {
|
||||
this.message = msg;
|
||||
}
|
||||
NotImplementedException.prototype = new Error();
|
||||
NotImplementedException.prototype.name = 'NotImplementedException';
|
||||
NotImplementedException.constructor = NotImplementedException;
|
||||
return NotImplementedException;
|
||||
}();
|
||||
var MissingDataException = function MissingDataExceptionClosure() {
|
||||
function MissingDataException(begin, end) {
|
||||
this.begin = begin;
|
||||
|
@ -810,34 +801,27 @@ var Util = function UtilClosure() {
|
|||
}
|
||||
return result;
|
||||
};
|
||||
var ROMAN_NUMBER_MAP = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'];
|
||||
Util.toRoman = function Util_toRoman(number, lowerCase) {
|
||||
assert(Number.isInteger(number) && number > 0, 'The number should be a positive integer.');
|
||||
var pos,
|
||||
romanBuf = [];
|
||||
while (number >= 1000) {
|
||||
number -= 1000;
|
||||
romanBuf.push('M');
|
||||
}
|
||||
pos = number / 100 | 0;
|
||||
number %= 100;
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[pos]);
|
||||
pos = number / 10 | 0;
|
||||
number %= 10;
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]);
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[20 + number]);
|
||||
var romanStr = romanBuf.join('');
|
||||
return lowerCase ? romanStr.toLowerCase() : romanStr;
|
||||
};
|
||||
Util.inherit = function Util_inherit(sub, base, prototype) {
|
||||
sub.prototype = Object.create(base.prototype);
|
||||
sub.prototype.constructor = sub;
|
||||
for (var prop in prototype) {
|
||||
sub.prototype[prop] = prototype[prop];
|
||||
}
|
||||
};
|
||||
return Util;
|
||||
}();
|
||||
const ROMAN_NUMBER_MAP = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'];
|
||||
function toRomanNumerals(number, lowerCase = false) {
|
||||
assert(Number.isInteger(number) && number > 0, 'The number should be a positive integer.');
|
||||
let pos,
|
||||
romanBuf = [];
|
||||
while (number >= 1000) {
|
||||
number -= 1000;
|
||||
romanBuf.push('M');
|
||||
}
|
||||
pos = number / 100 | 0;
|
||||
number %= 100;
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[pos]);
|
||||
pos = number / 10 | 0;
|
||||
number %= 10;
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]);
|
||||
romanBuf.push(ROMAN_NUMBER_MAP[20 + number]);
|
||||
const romanStr = romanBuf.join('');
|
||||
return lowerCase ? romanStr.toLowerCase() : romanStr;
|
||||
}
|
||||
var PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160, 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC];
|
||||
function stringToPDFString(str) {
|
||||
var i,
|
||||
|
@ -934,7 +918,6 @@ exports.InvalidPDFException = InvalidPDFException;
|
|||
exports.MissingDataException = MissingDataException;
|
||||
exports.MissingPDFException = MissingPDFException;
|
||||
exports.NativeImageDecoding = NativeImageDecoding;
|
||||
exports.NotImplementedException = NotImplementedException;
|
||||
exports.PasswordException = PasswordException;
|
||||
exports.PasswordResponses = PasswordResponses;
|
||||
exports.StreamType = StreamType;
|
||||
|
@ -942,6 +925,7 @@ exports.TextRenderingMode = TextRenderingMode;
|
|||
exports.UnexpectedResponseException = UnexpectedResponseException;
|
||||
exports.UnknownErrorException = UnknownErrorException;
|
||||
exports.Util = Util;
|
||||
exports.toRomanNumerals = toRomanNumerals;
|
||||
exports.XRefParseException = XRefParseException;
|
||||
exports.FormatError = FormatError;
|
||||
exports.arrayByteLength = arrayByteLength;
|
||||
|
@ -4239,7 +4223,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
|
|||
}
|
||||
return worker.messageHandler.sendWithPromise('GetDocRequest', {
|
||||
docId,
|
||||
apiVersion: '2.0.673',
|
||||
apiVersion: '2.0.688',
|
||||
source: {
|
||||
data: source.data,
|
||||
url: source.url,
|
||||
|
@ -5579,8 +5563,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
|
|||
}();
|
||||
var version, build;
|
||||
{
|
||||
exports.version = version = '2.0.673';
|
||||
exports.build = build = '31012570';
|
||||
exports.version = version = '2.0.688';
|
||||
exports.build = build = '61db85ab';
|
||||
}
|
||||
exports.getDocument = getDocument;
|
||||
exports.LoopbackPort = LoopbackPort;
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -4654,7 +4654,7 @@ class PDFHistory {
|
|||
if (!this.initialized) {
|
||||
return;
|
||||
}
|
||||
if (namedDest && typeof namedDest !== 'string' || !(explicitDest instanceof Array) || !(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.linkService.pagesCount)) {
|
||||
if (namedDest && typeof namedDest !== 'string' || !Array.isArray(explicitDest) || !(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.linkService.pagesCount)) {
|
||||
console.error('PDFHistory.push: Invalid parameters.');
|
||||
return;
|
||||
}
|
||||
|
@ -4891,7 +4891,7 @@ function isDestArraysEqual(firstDest, secondDest) {
|
|||
if (typeof first !== typeof second) {
|
||||
return false;
|
||||
}
|
||||
if (first instanceof Array || second instanceof Array) {
|
||||
if (Array.isArray(first) || Array.isArray(second)) {
|
||||
return false;
|
||||
}
|
||||
if (first !== null && typeof first === 'object' && second !== null) {
|
||||
|
@ -4907,7 +4907,7 @@ function isDestArraysEqual(firstDest, secondDest) {
|
|||
}
|
||||
return first === second || Number.isNaN(first) && Number.isNaN(second);
|
||||
}
|
||||
if (!(firstDest instanceof Array && secondDest instanceof Array)) {
|
||||
if (!(Array.isArray(firstDest) && Array.isArray(secondDest))) {
|
||||
return false;
|
||||
}
|
||||
if (firstDest.length !== secondDest.length) {
|
||||
|
@ -5033,7 +5033,7 @@ class PDFLinkService {
|
|||
explicitDest: dest
|
||||
});
|
||||
}).then(data => {
|
||||
if (!(data.explicitDest instanceof Array)) {
|
||||
if (!Array.isArray(data.explicitDest)) {
|
||||
console.error(`PDFLinkService.navigateTo: "${data.explicitDest}" is` + ` not a valid destination array, for dest="${dest}".`);
|
||||
return;
|
||||
}
|
||||
|
@ -5044,7 +5044,7 @@ class PDFLinkService {
|
|||
if (typeof dest === 'string') {
|
||||
return this.getAnchorUrl('#' + escape(dest));
|
||||
}
|
||||
if (dest instanceof Array) {
|
||||
if (Array.isArray(dest)) {
|
||||
let str = JSON.stringify(dest);
|
||||
return this.getAnchorUrl('#' + escape(str));
|
||||
}
|
||||
|
@ -5112,7 +5112,7 @@ class PDFLinkService {
|
|||
dest = unescape(hash);
|
||||
try {
|
||||
dest = JSON.parse(dest);
|
||||
if (!(dest instanceof Array)) {
|
||||
if (!Array.isArray(dest)) {
|
||||
dest = dest.toString();
|
||||
}
|
||||
} catch (ex) {}
|
||||
|
@ -5180,7 +5180,7 @@ class PDFLinkService {
|
|||
}
|
||||
}
|
||||
function isValidExplicitDestination(dest) {
|
||||
if (!(dest instanceof Array)) {
|
||||
if (!Array.isArray(dest)) {
|
||||
return false;
|
||||
}
|
||||
let destLength = dest.length,
|
||||
|
@ -5981,7 +5981,7 @@ class PDFThumbnailViewer {
|
|||
}
|
||||
if (!labels) {
|
||||
this._pageLabels = null;
|
||||
} else if (!(labels instanceof Array && this.pdfDocument.numPages === labels.length)) {
|
||||
} else if (!(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)) {
|
||||
this._pageLabels = null;
|
||||
console.error('PDFThumbnailViewer_setPageLabels: Invalid page labels.');
|
||||
} else {
|
||||
|
@ -6755,7 +6755,7 @@ class BaseViewer {
|
|||
}
|
||||
if (!labels) {
|
||||
this._pageLabels = null;
|
||||
} else if (!(labels instanceof Array && this.pdfDocument.numPages === labels.length)) {
|
||||
} else if (!(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)) {
|
||||
this._pageLabels = null;
|
||||
console.error(`${this._name}.setPageLabels: Invalid page labels.`);
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче