Bug 1348416 - Update pdf.js to version 1.7.367. r=bdahl

--HG--
extra : rebase_source : 134ce90313211f4ff94807aa263f4d9fe887f0d3
This commit is contained in:
Ryan VanderMeulen 2017-03-17 18:15:26 -04:00
parent 093aa14344
commit 92937b757e
7 changed files with 26 additions and 21 deletions

View File

@ -1,3 +1,3 @@
This is the pdf.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 1.7.359
Current extension version is: 1.7.367

View File

@ -93,7 +93,7 @@ function getIntPref(pref, def) {
function getStringPref(pref, def) {
try {
return Services.prefs.getStringPref(pref);
return Services.prefs.getComplexValue(pref, Ci.nsISupportsString).data;
} catch (ex) {
return def;
}

View File

@ -290,7 +290,10 @@ var PdfjsChromeUtils = {
_setStringPref(aPrefName, aPrefValue) {
this._ensurePreferenceAllowed(aPrefName);
Services.prefs.setStringPref(aPrefName, aPrefValue);
let str = Cc["@mozilla.org/supports-string;1"]
.createInstance(Ci.nsISupportsString);
str.data = aPrefValue;
Services.prefs.setComplexValue(aPrefName, Ci.nsISupportsString, str);
},
/*

View File

@ -3667,8 +3667,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}
};
}();
exports.version = '1.7.359';
exports.build = 'd471e356';
exports.version = '1.7.367';
exports.build = 'f0c45f03';
exports.getDocument = getDocument;
exports.PDFDataRangeTransport = PDFDataRangeTransport;
exports.PDFWorker = PDFWorker;
@ -4685,8 +4685,8 @@ if (!globalScope.PDFJS) {
globalScope.PDFJS = {};
}
var PDFJS = globalScope.PDFJS;
PDFJS.version = '1.7.359';
PDFJS.build = 'd471e356';
PDFJS.version = '1.7.367';
PDFJS.build = 'f0c45f03';
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
sharedUtil.setVerbosityLevel(PDFJS.verbosity);
@ -7051,7 +7051,7 @@ var TilingPattern = function TilingPatternClosure() {
0,
0
];
this.bbox = IR[4];
this.bbox = Util.normalizeRect(IR[4]);
this.xstep = IR[5];
this.ystep = IR[6];
this.paintType = IR[7];
@ -7135,7 +7135,7 @@ var TilingPattern = function TilingPatternClosure() {
this.ctx.scale(1 / scale[0], 1 / scale[1]);
},
clipBbox: function clipBbox(graphics, bbox, x0, y0, x1, y1) {
if (bbox && isArray(bbox) && bbox.length === 4) {
if (isArray(bbox) && bbox.length === 4) {
var bboxWidth = x1 - x0;
var bboxHeight = y1 - y0;
graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);
@ -7186,8 +7186,8 @@ exports.TilingPattern = TilingPattern;
"use strict";
var pdfjsVersion = '1.7.359';
var pdfjsBuild = 'd471e356';
var pdfjsVersion = '1.7.367';
var pdfjsBuild = 'f0c45f03';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(8);
var pdfjsDisplayAPI = __w_pdfjs_require__(3);

View File

@ -19175,7 +19175,7 @@ var CFFParser = function CFFParserClosure() {
return cffDict;
},
parseCharString: function CFFParser_parseCharString(state, data, localSubrIndex, globalSubrIndex) {
if (state.callDepth > MAX_SUBR_NESTING) {
if (!data || state.callDepth > MAX_SUBR_NESTING) {
return false;
}
var stackSize = state.stackSize;
@ -19241,7 +19241,7 @@ var CFFParser = function CFFParserClosure() {
bias = 1131;
}
var subrNumber = stack[--stackSize] + bias;
if (subrNumber < 0 || subrNumber >= subrsIndex.count) {
if (subrNumber < 0 || subrNumber >= subrsIndex.count || isNaN(subrNumber)) {
validationCommand = CharstringValidationData[value];
warn('Out of bounds subrIndex for ' + validationCommand.id);
return false;
@ -49132,8 +49132,8 @@ exports.Type1Parser = Type1Parser;
"use strict";
var pdfjsVersion = '1.7.359';
var pdfjsBuild = 'd471e356';
var pdfjsVersion = '1.7.367';
var pdfjsBuild = 'f0c45f03';
var pdfjsCoreWorker = __w_pdfjs_require__(17);
;
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

View File

@ -72,13 +72,13 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="mainContainer">
<div class="findbar hidden doorHanger" id="findbar">
<div id="findbarInputContainer">
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document" tabindex="91" data-l10n-id="find_input">
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document" tabindex="91" data-l10n-id="find_input">
<div class="splitToolbarButton">
<button class="toolbarButton findPrevious" title="" id="findPrevious" tabindex="92" data-l10n-id="find_previous">
<button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
<span data-l10n-id="find_previous_label">Previous</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton findNext" title="" id="findNext" tabindex="93" data-l10n-id="find_next">
<button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
<span data-l10n-id="find_next_label">Next</span>
</button>
</div>
@ -160,7 +160,7 @@ See https://github.com/adobe-type-tools/cmap-resources
</button>
<div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
<span data-l10n-id="findbar_label">Find</span>
<span data-l10n-id="findbar_label">Find</span>
</button>
<div class="splitToolbarButton hiddenSmallView">
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">

View File

@ -504,10 +504,12 @@ exports.localized = localized;
{
var pdfjsLib;
if (typeof __pdfjsdev_webpack__ === 'undefined') {
if (typeof require === 'function') {
if (typeof window !== 'undefined' && window['pdfjs-dist/build/pdf']) {
pdfjsLib = window['pdfjs-dist/build/pdf'];
} else if (typeof require === 'function') {
pdfjsLib = require('../build/pdf.js');
} else {
pdfjsLib = window['pdfjs-dist/build/pdf'];
throw new Error('Neither `require` nor `window` found');
}
}
module.exports = pdfjsLib;