mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
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:
parent
fc0c35cd6b
commit
9a02070479
@ -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
|
||||
|
@ -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;
|
||||
|
||||
/***/ }),
|
||||
|
@ -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,15 +20498,26 @@ 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');
|
||||
return errorFont();
|
||||
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)) {
|
||||
|
@ -67,8 +67,7 @@
|
||||
bottom: 0px;
|
||||
z-index: -1;
|
||||
cursor: default;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.textLayer .endOfContent.active {
|
||||
@ -425,8 +424,7 @@ select {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
cursor: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.pdfPresentationMode:fullscreen a:not(.internalLink) {
|
||||
@ -481,8 +479,7 @@ 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;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#outerContainer.sidebarMoving #sidebarContainer,
|
||||
@ -708,8 +705,7 @@ html[dir='rtl'] .findbar {
|
||||
}
|
||||
|
||||
.findbar label {
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#findInput {
|
||||
@ -980,8 +976,7 @@ html[dir='rtl'] .splitToolbarButtonSeparator {
|
||||
color: hsla(0,0%,100%,.8);
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
/* Opera does not support user-select, use <... unselectable="on"> instead */
|
||||
cursor: default;
|
||||
transition-property: background-color, border-color, box-shadow;
|
||||
@ -1436,8 +1431,7 @@ html[dir='rtl'] .verticalToolbarSeparator {
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
text-align: left;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@ -1530,8 +1524,7 @@ a:focus > .thumbnail > .thumbnailSelectionRing,
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#outlineView {
|
||||
@ -1564,8 +1557,7 @@ html[dir='rtl'] .outlineItem > .outlineItems {
|
||||
color: hsla(0,0%,100%,.8);
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
user-select: none;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
|
@ -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/
|
||||
|
Loading…
Reference in New Issue
Block a user