Bug 1667280 - Update pdf.js to version 2.7.81. r=bdahl

Differential Revision: https://phabricator.services.mozilla.com/D91374
This commit is contained in:
Ryan VanderMeulen 2020-09-25 01:37:07 +00:00
Родитель fd92b1e73e
Коммит 90f75c7d32
4 изменённых файлов: 46 добавлений и 23 удалений

Просмотреть файл

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 2.7.69
Current extension version is: 2.7.81
Taken from upstream commit: 26ae7ba2a
Taken from upstream commit: 120c5c226

Просмотреть файл

@ -335,8 +335,8 @@ var _text_layer = __w_pdfjs_require__(20);
var _svg = __w_pdfjs_require__(21);
const pdfjsVersion = '2.7.69';
const pdfjsBuild = '26ae7ba2a';
const pdfjsVersion = '2.7.81';
const pdfjsBuild = '120c5c226';
;
/***/ }),
@ -1972,7 +1972,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
return worker.messageHandler.sendWithPromise("GetDocRequest", {
docId,
apiVersion: '2.7.69',
apiVersion: '2.7.81',
source: {
data: source.data,
url: source.url,
@ -3897,9 +3897,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
return InternalRenderTask;
}();
const version = '2.7.69';
const version = '2.7.81';
exports.version = version;
const build = '26ae7ba2a';
const build = '120c5c226';
exports.build = build;
/***/ }),
@ -9268,7 +9268,7 @@ class AnnotationElement {
const rect = _util.Util.normalizeRect([data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1]]);
container.style.transform = `matrix(${viewport.transform.join(",")})`;
container.style.transformOrigin = `-${rect[0]}px -${rect[1]}px`;
container.style.transformOrigin = `${-rect[0]}px ${-rect[1]}px`;
if (!ignoreBorder && data.borderStyle.width > 0) {
container.style.borderWidth = `${data.borderStyle.width}px`;
@ -9689,10 +9689,12 @@ class PopupAnnotationElement extends AnnotationElement {
modificationDate: this.data.modificationDate,
contents: this.data.contents
});
const parentLeft = parseFloat(parentElement.style.left);
const parentWidth = parseFloat(parentElement.style.width);
this.container.style.transformOrigin = `-${parentLeft + parentWidth}px -${parentElement.style.top}`;
this.container.style.left = `${parentLeft + parentWidth}px`;
const parentTop = parseFloat(parentElement.style.top),
parentLeft = parseFloat(parentElement.style.left),
parentWidth = parseFloat(parentElement.style.width);
const popupLeft = parentLeft + parentWidth;
this.container.style.transformOrigin = `${-popupLeft}px ${-parentTop}px`;
this.container.style.left = `${popupLeft}px`;
this.container.appendChild(popup.render());
return this.container;
}

Просмотреть файл

@ -135,8 +135,8 @@ Object.defineProperty(exports, "WorkerMessageHandler", {
var _worker = __w_pdfjs_require__(1);
const pdfjsVersion = '2.7.69';
const pdfjsBuild = '26ae7ba2a';
const pdfjsVersion = '2.7.81';
const pdfjsBuild = '120c5c226';
/***/ }),
/* 1 */
@ -231,7 +231,7 @@ class WorkerMessageHandler {
var WorkerTasks = [];
const verbosity = (0, _util.getVerbosityLevel)();
const apiVersion = docParams.apiVersion;
const workerVersion = '2.7.69';
const workerVersion = '2.7.81';
if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
@ -20474,6 +20474,12 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
this.data.exportValue = exportValues[0] === "Off" ? exportValues[1] : exportValues[0];
this.checkedAppearance = normalAppearance.get(this.data.exportValue);
this.uncheckedAppearance = normalAppearance.get("Off") || null;
this._streams.push(this.checkedAppearance);
if (this.uncheckedAppearance) {
this._streams.push(this.uncheckedAppearance);
}
}
_processRadioButton(params) {
@ -20510,6 +20516,12 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
this.checkedAppearance = normalAppearance.get(this.data.buttonValue);
this.uncheckedAppearance = normalAppearance.get("Off") || null;
this._streams.push(this.checkedAppearance);
if (this.uncheckedAppearance) {
this._streams.push(this.uncheckedAppearance);
}
}
_processPushButton(params) {
@ -20693,8 +20705,12 @@ class PolylineAnnotation extends MarkupAnnotation {
constructor(parameters) {
super(parameters);
this.data.annotationType = _util.AnnotationType.POLYLINE;
const rawVertices = parameters.dict.getArray("Vertices");
this.data.vertices = [];
const rawVertices = parameters.dict.getArray("Vertices");
if (!Array.isArray(rawVertices)) {
return;
}
for (let i = 0, ii = rawVertices.length; i < ii; i += 2) {
this.data.vertices.push({
@ -20726,17 +20742,22 @@ class InkAnnotation extends MarkupAnnotation {
constructor(parameters) {
super(parameters);
this.data.annotationType = _util.AnnotationType.INK;
const xref = parameters.xref;
const originalInkLists = parameters.dict.getArray("InkList");
this.data.inkLists = [];
const rawInkLists = parameters.dict.getArray("InkList");
for (let i = 0, ii = originalInkLists.length; i < ii; ++i) {
if (!Array.isArray(rawInkLists)) {
return;
}
const xref = parameters.xref;
for (let i = 0, ii = rawInkLists.length; i < ii; ++i) {
this.data.inkLists.push([]);
for (let j = 0, jj = originalInkLists[i].length; j < jj; j += 2) {
for (let j = 0, jj = rawInkLists[i].length; j < jj; j += 2) {
this.data.inkLists[i].push({
x: xref.fetchIfRef(originalInkLists[i][j]),
y: xref.fetchIfRef(originalInkLists[i][j + 1])
x: xref.fetchIfRef(rawInkLists[i][j]),
y: xref.fetchIfRef(rawInkLists[i][j + 1])
});
}
}

Просмотреть файл

@ -20,7 +20,7 @@ origin:
# Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS"
release: version 2.7.69
release: version 2.7.81
# The package's license, where possible using the mnemonic from
# https://spdx.org/licenses/