Bug 1559134 - Update pdf.js to version 2.2.207. r=bdahl

This commit is contained in:
Ryan VanderMeulen 2019-06-13 09:39:05 -04:00
Родитель 3334a54347
Коммит 0dc7a79c05
5 изменённых файлов: 31 добавлений и 21 удалений

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

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 2.2.199
Current extension version is: 2.2.207
Taken from upstream commit: 63014eb8
Taken from upstream commit: 73482750

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

@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";
var pdfjsVersion = '2.2.199';
var pdfjsBuild = '63014eb8';
var pdfjsVersion = '2.2.207';
var pdfjsBuild = '73482750';
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.199',
apiVersion: '2.2.207',
source: {
data: source.data,
url: source.url,
@ -1656,7 +1656,7 @@ class PDFPageProxy {
intentState.renderTasks.splice(i, 1);
}
if (this.cleanupAfterRender) {
if (this.cleanupAfterRender || renderingIntent === 'print') {
this.pendingCleanup = true;
}
@ -3100,9 +3100,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
return InternalRenderTask;
}();
const version = '2.2.199';
const version = '2.2.207';
exports.version = version;
const build = '63014eb8';
const build = '73482750';
exports.build = build;
/***/ }),

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

@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";
const pdfjsVersion = '2.2.199';
const pdfjsBuild = '63014eb8';
const pdfjsVersion = '2.2.207';
const pdfjsBuild = '73482750';
const pdfjsCoreWorker = __w_pdfjs_require__(1);
@ -378,7 +378,7 @@ var WorkerMessageHandler = {
var WorkerTasks = [];
const verbosity = (0, _util.getVerbosityLevel)();
let apiVersion = docParams.apiVersion;
let workerVersion = '2.2.199';
let workerVersion = '2.2.207';
if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
@ -3830,6 +3830,7 @@ class Catalog {
const title = outlineDict.get('Title');
const flags = outlineDict.get('F') || 0;
const color = outlineDict.getArray('C');
const count = outlineDict.get('Count');
let rgbColor = blackColor;
if (Array.isArray(color) && color.length === 3 && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) {
@ -3843,7 +3844,7 @@ class Catalog {
newWindow: data.newWindow,
title: (0, _util.stringToPDFString)(title),
color: rgbColor,
count: outlineDict.get('Count'),
count: Number.isInteger(count) ? count : undefined,
bold: !!(flags & 2),
italic: !!(flags & 1),
items: []

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

@ -5278,8 +5278,8 @@ class PDFFindController {
const pageNumber = this._selected.pageIdx + 1;
const linkService = this._linkService;
if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && linkService.page !== pageNumber && linkService.isPageVisible && !linkService.isPageVisible(pageNumber)) {
break;
if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && pageNumber !== linkService.page && !linkService.isPageVisible(pageNumber)) {
return true;
}
return false;
@ -6893,10 +6893,17 @@ class PDFOutlineViewer {
}
}
_addToggleButton(div) {
_addToggleButton(div, {
count,
items
}) {
let toggler = document.createElement('div');
toggler.className = 'outlineItemToggler';
if (count < 0 && Math.abs(count) === items.length) {
toggler.classList.add('outlineItemsHidden');
}
toggler.onclick = evt => {
evt.stopPropagation();
toggler.classList.toggle('outlineItemsHidden');
@ -6952,10 +6959,9 @@ class PDFOutlineViewer {
let hasAnyNesting = false;
while (queue.length > 0) {
let levelData = queue.shift();
const levelData = queue.shift();
for (let i = 0, len = levelData.items.length; i < len; i++) {
let item = levelData.items[i];
for (const item of levelData.items) {
let div = document.createElement('div');
div.className = 'outlineItem';
let element = document.createElement('a');
@ -6970,7 +6976,7 @@ class PDFOutlineViewer {
if (item.items.length > 0) {
hasAnyNesting = true;
this._addToggleButton(div);
this._addToggleButton(div, item);
let itemsDiv = document.createElement('div');
itemsDiv.className = 'outlineItems';
@ -6988,6 +6994,7 @@ class PDFOutlineViewer {
if (hasAnyNesting) {
this.container.classList.add('outlineWithDeepNesting');
this.lastToggleIsShow = fragment.querySelectorAll('.outlineItemsHidden').length === 0;
}
this.container.appendChild(fragment);
@ -11768,6 +11775,8 @@ Object.defineProperty(exports, "__esModule", {
});
exports.FirefoxPrintService = FirefoxPrintService;
var _app_options = __webpack_require__(3);
var _ui_utils = __webpack_require__(2);
var _app = __webpack_require__(1);
@ -11776,7 +11785,7 @@ var _pdfjsLib = __webpack_require__(4);
function composePage(pdfDocument, pageNumber, size, printContainer) {
let canvas = document.createElement('canvas');
const PRINT_RESOLUTION = 150;
const PRINT_RESOLUTION = _app_options.AppOptions.get('printResolution') || 150;
const PRINT_UNITS = PRINT_RESOLUTION / 72.0;
canvas.width = Math.floor(size.width * PRINT_UNITS);
canvas.height = Math.floor(size.height * PRINT_UNITS);

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

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