Bug 1588527 - Update pdf.js to version 2.4.43. r=bdahl

Differential Revision: https://phabricator.services.mozilla.com/D49165

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ryan VanderMeulen 2019-10-14 21:09:52 +00:00
parent fc0c35cd6b
commit 9a02070479
5 changed files with 66 additions and 49 deletions

View File

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 2.4.15
Current extension version is: 2.4.43
Taken from upstream commit: cead77ef
Taken from upstream commit: 16ae7c69

View File

@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";
var pdfjsVersion = '2.4.15';
var pdfjsBuild = 'cead77ef';
var pdfjsVersion = '2.4.43';
var pdfjsBuild = '16ae7c69';
var pdfjsSharedUtil = __w_pdfjs_require__(1);
@ -1271,7 +1271,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId,
apiVersion: '2.4.15',
apiVersion: '2.4.43',
source: {
data: source.data,
url: source.url,
@ -1331,8 +1331,7 @@ const PDFDocumentLoadingTask = function PDFDocumentLoadingTaskClosure() {
}
then(onFulfilled, onRejected) {
(0, _display_utils.deprecated)('PDFDocumentLoadingTask.then method, ' + 'use the `promise` getter instead.');
return this.promise.then.apply(this.promise, arguments);
throw new Error('Removed API method: ' + 'PDFDocumentLoadingTask.then, use the `promise` getter instead.');
}
}
@ -3004,8 +3003,7 @@ class RenderTask {
}
then(onFulfilled, onRejected) {
(0, _display_utils.deprecated)('RenderTask.then method, use the `promise` getter instead.');
return this.promise.then.apply(this.promise, arguments);
throw new Error('Removed API method: ' + 'RenderTask.then, use the `promise` getter instead.');
}
}
@ -3176,9 +3174,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
return InternalRenderTask;
}();
const version = '2.4.15';
const version = '2.4.43';
exports.version = version;
const build = 'cead77ef';
const build = '16ae7c69';
exports.build = build;
/***/ }),

View File

@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";
const pdfjsVersion = '2.4.15';
const pdfjsBuild = 'cead77ef';
const pdfjsVersion = '2.4.43';
const pdfjsBuild = '16ae7c69';
const pdfjsCoreWorker = __w_pdfjs_require__(1);
@ -225,7 +225,7 @@ var WorkerMessageHandler = {
var WorkerTasks = [];
const verbosity = (0, _util.getVerbosityLevel)();
const apiVersion = docParams.apiVersion;
const workerVersion = '2.4.15';
const workerVersion = '2.4.43';
if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
@ -19969,7 +19969,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
},
hasBlendModes: function PartialEvaluator_hasBlendModes(resources) {
if (!(0, _primitives.isDict)(resources)) {
if (!(resources instanceof _primitives.Dict)) {
return false;
}
@ -19983,19 +19983,35 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
xref = this.xref;
while (nodes.length) {
var key, i, ii;
var node = nodes.shift();
var graphicStates = node.get('ExtGState');
if ((0, _primitives.isDict)(graphicStates)) {
if (graphicStates instanceof _primitives.Dict) {
var graphicStatesKeys = graphicStates.getKeys();
for (i = 0, ii = graphicStatesKeys.length; i < ii; i++) {
key = graphicStatesKeys[i];
var graphicState = graphicStates.get(key);
for (let i = 0, ii = graphicStatesKeys.length; i < ii; i++) {
const key = graphicStatesKeys[i];
let graphicState = graphicStates.getRaw(key);
if (graphicState instanceof _primitives.Ref) {
if (processed[graphicState.toString()]) {
continue;
}
graphicState = xref.fetch(graphicState);
}
if (!(graphicState instanceof _primitives.Dict)) {
continue;
}
if (graphicState.objId) {
processed[graphicState.objId] = true;
}
var bm = graphicState.get('BM');
if ((0, _primitives.isName)(bm) && bm.name !== 'Normal') {
if (bm instanceof _primitives.Name && bm.name !== 'Normal') {
return true;
}
}
@ -20003,17 +20019,17 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
var xObjects = node.get('XObject');
if (!(0, _primitives.isDict)(xObjects)) {
if (!(xObjects instanceof _primitives.Dict)) {
continue;
}
var xObjectsKeys = xObjects.getKeys();
for (i = 0, ii = xObjectsKeys.length; i < ii; i++) {
key = xObjectsKeys[i];
for (let i = 0, ii = xObjectsKeys.length; i < ii; i++) {
const key = xObjectsKeys[i];
var xObject = xObjects.getRaw(key);
if ((0, _primitives.isRef)(xObject)) {
if (xObject instanceof _primitives.Ref) {
if (processed[xObject.toString()]) {
continue;
}
@ -20035,7 +20051,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
var xResources = xObject.dict.get('Resources');
if ((0, _primitives.isDict)(xResources) && (!xResources.objId || !processed[xResources.objId])) {
if (xResources instanceof _primitives.Dict && (!xResources.objId || !processed[xResources.objId])) {
nodes.push(xResources);
if (xResources.objId) {
@ -20473,7 +20489,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
if (font) {
if (!(0, _primitives.isRef)(font)) {
throw new Error('The "font" object should be a reference.');
throw new _util.FormatError('The "font" object should be a reference.');
}
fontRef = font;
@ -20482,17 +20498,28 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
if (fontRes) {
fontRef = fontRes.getRaw(fontName);
} else {
(0, _util.warn)('fontRes not available');
return errorFont();
}
}
if (!fontRef) {
(0, _util.warn)('fontRef not available');
const partialMsg = `Font "${fontName || font && font.toString()}" is not available`;
if (!this.options.ignoreErrors && !this.parsingType3Font) {
(0, _util.warn)(`${partialMsg}.`);
return errorFont();
}
this.handler.send('UnsupportedFeature', {
featureId: _util.UNSUPPORTED_FEATURES.font
});
(0, _util.warn)(`${partialMsg} -- attempting to fallback to a default font.`);
fontRef = new _primitives.Dict();
fontRef.set('BaseFont', _primitives.Name.get('PDFJS-FallbackFont'));
fontRef.set('Type', _primitives.Name.get('FallbackType'));
fontRef.set('Subtype', _primitives.Name.get('FallbackType'));
fontRef.set('Encoding', _primitives.Name.get('WinAnsiEncoding'));
}
if (this.fontCache.has(fontRef)) {
return this.fontCache.get(fontRef);
}

View File

@ -67,7 +67,6 @@
bottom: 0px;
z-index: -1;
cursor: default;
-moz-user-select: none;
user-select: none;
}
@ -425,7 +424,6 @@ select {
height: 100%;
overflow: hidden;
cursor: none;
-moz-user-select: none;
user-select: none;
}
@ -481,7 +479,6 @@ html[dir='rtl'] #sidebarContainer {
/* Improve responsiveness and avoid visual glitches when the sidebar is resized. */
transition-duration: 0s;
/* Prevent e.g. the thumbnails being selected when the sidebar is resized. */
-moz-user-select: none;
user-select: none;
}
@ -708,7 +705,6 @@ html[dir='rtl'] .findbar {
}
.findbar label {
-moz-user-select: none;
user-select: none;
}
@ -980,7 +976,6 @@ html[dir='rtl'] .splitToolbarButtonSeparator {
color: hsla(0,0%,100%,.8);
font-size: 12px;
line-height: 14px;
-moz-user-select: none;
user-select: none;
/* Opera does not support user-select, use <... unselectable="on"> instead */
cursor: default;
@ -1436,7 +1431,6 @@ html[dir='rtl'] .verticalToolbarSeparator {
font-size: 12px;
line-height: 14px;
text-align: left;
-moz-user-select: none;
user-select: none;
cursor: default;
}
@ -1530,7 +1524,6 @@ a:focus > .thumbnail > .thumbnailSelectionRing,
top: 0;
bottom: 0;
overflow: auto;
-moz-user-select: none;
user-select: none;
}
@ -1564,7 +1557,6 @@ html[dir='rtl'] .outlineItem > .outlineItems {
color: hsla(0,0%,100%,.8);
font-size: 13px;
line-height: 15px;
-moz-user-select: none;
user-select: none;
white-space: normal;
}

View File

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