зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1565440 - Update pdf.js to version 2.3.13. r=bdahl
This commit is contained in:
Родитель
a32cbbf294
Коммит
8d5d37e98c
|
@ -1,5 +1,5 @@
|
|||
This is the PDF.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 2.2.224
|
||||
Current extension version is: 2.3.13
|
||||
|
||||
Taken from upstream commit: a98ce9cb
|
||||
Taken from upstream commit: 28326165
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
var pdfjsVersion = '2.2.224';
|
||||
var pdfjsBuild = 'a98ce9cb';
|
||||
var pdfjsVersion = '2.3.13';
|
||||
var pdfjsBuild = '28326165';
|
||||
|
||||
var pdfjsSharedUtil = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -1304,7 +1304,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
|
|||
|
||||
return worker.messageHandler.sendWithPromise('GetDocRequest', {
|
||||
docId,
|
||||
apiVersion: '2.2.224',
|
||||
apiVersion: '2.3.13',
|
||||
source: {
|
||||
data: source.data,
|
||||
url: source.url,
|
||||
|
@ -1633,7 +1633,6 @@ class PDFPageProxy {
|
|||
const intentState = this.intentStates[renderingIntent];
|
||||
|
||||
if (!intentState.displayReadyCapability) {
|
||||
intentState.receivingOperatorList = true;
|
||||
intentState.displayReadyCapability = (0, _util.createPromiseCapability)();
|
||||
intentState.operatorList = {
|
||||
fnArray: [],
|
||||
|
@ -1734,7 +1733,6 @@ class PDFPageProxy {
|
|||
if (!intentState.opListReadCapability) {
|
||||
opListTask = {};
|
||||
opListTask.operatorListChanged = operatorListChanged;
|
||||
intentState.receivingOperatorList = true;
|
||||
intentState.opListReadCapability = (0, _util.createPromiseCapability)();
|
||||
intentState.renderTasks = [];
|
||||
intentState.renderTasks.push(opListTask);
|
||||
|
@ -1833,7 +1831,7 @@ class PDFPageProxy {
|
|||
_tryCleanup(resetStats = false) {
|
||||
if (!this.pendingCleanup || Object.keys(this.intentStates).some(function (intent) {
|
||||
const intentState = this.intentStates[intent];
|
||||
return intentState.renderTasks.length !== 0 || intentState.receivingOperatorList;
|
||||
return intentState.renderTasks.length !== 0 || !intentState.operatorList.lastChunk;
|
||||
}, this)) {
|
||||
return;
|
||||
}
|
||||
|
@ -1874,8 +1872,6 @@ class PDFPageProxy {
|
|||
}
|
||||
|
||||
if (operatorListChunk.lastChunk) {
|
||||
intentState.receivingOperatorList = false;
|
||||
|
||||
this._tryCleanup();
|
||||
}
|
||||
}
|
||||
|
@ -2612,18 +2608,20 @@ class WorkerTransport {
|
|||
const page = this.pageCache[data.pageIndex];
|
||||
const intentState = page.intentStates[data.intent];
|
||||
|
||||
if (intentState.displayReadyCapability) {
|
||||
intentState.displayReadyCapability.reject(new Error(data.error));
|
||||
} else {
|
||||
throw new Error(data.error);
|
||||
}
|
||||
|
||||
if (intentState.operatorList) {
|
||||
intentState.operatorList.lastChunk = true;
|
||||
|
||||
for (let i = 0; i < intentState.renderTasks.length; i++) {
|
||||
intentState.renderTasks[i].operatorListChanged();
|
||||
}
|
||||
|
||||
page._tryCleanup();
|
||||
}
|
||||
|
||||
if (intentState.displayReadyCapability) {
|
||||
intentState.displayReadyCapability.reject(new Error(data.error));
|
||||
} else {
|
||||
throw new Error(data.error);
|
||||
}
|
||||
}, this);
|
||||
messageHandler.on('UnsupportedFeature', this._onUnsupportedFeature, this);
|
||||
|
@ -3100,9 +3098,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
|
|||
return InternalRenderTask;
|
||||
}();
|
||||
|
||||
const version = '2.2.224';
|
||||
const version = '2.3.13';
|
||||
exports.version = version;
|
||||
const build = 'a98ce9cb';
|
||||
const build = '28326165';
|
||||
exports.build = build;
|
||||
|
||||
/***/ }),
|
||||
|
@ -8642,7 +8640,7 @@ var renderTextLayer = function renderTextLayerClosure() {
|
|||
this._layoutTextCtx.canvas.height = 0;
|
||||
this._layoutTextCtx = null;
|
||||
}
|
||||
});
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
TextLayerRenderTask.prototype = {
|
||||
|
|
|
@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
"use strict";
|
||||
|
||||
|
||||
const pdfjsVersion = '2.2.224';
|
||||
const pdfjsBuild = 'a98ce9cb';
|
||||
const pdfjsVersion = '2.3.13';
|
||||
const pdfjsBuild = '28326165';
|
||||
|
||||
const pdfjsCoreWorker = __w_pdfjs_require__(1);
|
||||
|
||||
|
@ -240,7 +240,7 @@ var WorkerMessageHandler = {
|
|||
var WorkerTasks = [];
|
||||
const verbosity = (0, _util.getVerbosityLevel)();
|
||||
let apiVersion = docParams.apiVersion;
|
||||
let workerVersion = '2.2.224';
|
||||
let workerVersion = '2.3.13';
|
||||
|
||||
if (apiVersion !== workerVersion) {
|
||||
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
|
||||
|
@ -3176,22 +3176,9 @@ exports.Page = Page;
|
|||
const FINGERPRINT_FIRST_BYTES = 1024;
|
||||
const EMPTY_FINGERPRINT = '\x00\x00\x00\x00\x00\x00\x00' + '\x00\x00\x00\x00\x00\x00\x00\x00\x00';
|
||||
|
||||
function find(stream, needle, limit, backwards) {
|
||||
const pos = stream.pos;
|
||||
const end = stream.end;
|
||||
|
||||
if (pos + limit > end) {
|
||||
limit = end - pos;
|
||||
}
|
||||
|
||||
const strBuf = [];
|
||||
|
||||
for (let i = 0; i < limit; ++i) {
|
||||
strBuf.push(String.fromCharCode(stream.getByte()));
|
||||
}
|
||||
|
||||
const str = strBuf.join('');
|
||||
stream.pos = pos;
|
||||
function find(stream, needle, limit, backwards = false) {
|
||||
(0, _util.assert)(limit > 0, 'The "limit" must be a positive integer.');
|
||||
const str = (0, _util.bytesToString)(stream.peekBytes(limit));
|
||||
const index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle);
|
||||
|
||||
if (index === -1) {
|
||||
|
|
|
@ -622,6 +622,10 @@ let PDFViewerApplication = {
|
|||
},
|
||||
|
||||
zoomIn(ticks) {
|
||||
if (this.pdfViewer.isInPresentationMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
let newScale = this.pdfViewer.currentScale;
|
||||
|
||||
do {
|
||||
|
@ -634,6 +638,10 @@ let PDFViewerApplication = {
|
|||
},
|
||||
|
||||
zoomOut(ticks) {
|
||||
if (this.pdfViewer.isInPresentationMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
let newScale = this.pdfViewer.currentScale;
|
||||
|
||||
do {
|
||||
|
@ -8655,6 +8663,10 @@ class BaseViewer {
|
|||
}
|
||||
|
||||
onePageRenderedCapability.promise.then(() => {
|
||||
if (this.findController) {
|
||||
this.findController.setDocument(pdfDocument);
|
||||
}
|
||||
|
||||
if (pdfDocument.loadingParams['disableAutoFetch']) {
|
||||
pagesCapability.resolve();
|
||||
return;
|
||||
|
@ -8688,10 +8700,6 @@ class BaseViewer {
|
|||
source: this
|
||||
});
|
||||
|
||||
if (this.findController) {
|
||||
this.findController.setDocument(pdfDocument);
|
||||
}
|
||||
|
||||
if (this.defaultRenderingQueue) {
|
||||
this.update();
|
||||
}
|
||||
|
@ -11834,18 +11842,23 @@ function FirefoxPrintService(pdfDocument, pagesOverview, printContainer) {
|
|||
|
||||
FirefoxPrintService.prototype = {
|
||||
layout() {
|
||||
let pdfDocument = this.pdfDocument;
|
||||
let printContainer = this.printContainer;
|
||||
let body = document.querySelector('body');
|
||||
const {
|
||||
pdfDocument,
|
||||
pagesOverview,
|
||||
printContainer
|
||||
} = this;
|
||||
const body = document.querySelector('body');
|
||||
body.setAttribute('data-pdfjsprinting', true);
|
||||
|
||||
for (let i = 0, ii = this.pagesOverview.length; i < ii; ++i) {
|
||||
composePage(pdfDocument, i + 1, this.pagesOverview[i], printContainer);
|
||||
for (let i = 0, ii = pagesOverview.length; i < ii; ++i) {
|
||||
composePage(pdfDocument, i + 1, pagesOverview[i], printContainer);
|
||||
}
|
||||
},
|
||||
|
||||
destroy() {
|
||||
this.printContainer.textContent = '';
|
||||
const body = document.querySelector('body');
|
||||
body.removeAttribute('data-pdfjsprinting');
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ origin:
|
|||
|
||||
# Human-readable identifier for this version/release
|
||||
# Generally "version NNN", "tag SSS", "bookmark SSS"
|
||||
release: version 2.2.224
|
||||
release: version 2.3.13
|
||||
|
||||
# The package's license, where possible using the mnemonic from
|
||||
# https://spdx.org/licenses/
|
||||
|
|
Загрузка…
Ссылка в новой задаче