mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1285418 - Update pdf.js to version 1.5.322. r=bdahl
This commit is contained in:
parent
2c7f0d073f
commit
10be699e00
@ -1,3 +1,3 @@
|
||||
This is the pdf.js project output, https://github.com/mozilla/pdf.js
|
||||
|
||||
Current extension version is: 1.5.305
|
||||
Current extension version is: 1.5.322
|
||||
|
@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
|
||||
// Use strict in our context only - users might not want it
|
||||
'use strict';
|
||||
|
||||
var pdfjsVersion = '1.5.305';
|
||||
var pdfjsBuild = '546e223';
|
||||
var pdfjsVersion = '1.5.322';
|
||||
var pdfjsBuild = 'b6826a4';
|
||||
|
||||
var pdfjsFilePath =
|
||||
typeof document !== 'undefined' && document.currentScript ?
|
||||
|
@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
|
||||
// Use strict in our context only - users might not want it
|
||||
'use strict';
|
||||
|
||||
var pdfjsVersion = '1.5.305';
|
||||
var pdfjsBuild = '546e223';
|
||||
var pdfjsVersion = '1.5.322';
|
||||
var pdfjsBuild = 'b6826a4';
|
||||
|
||||
var pdfjsFilePath =
|
||||
typeof document !== 'undefined' && document.currentScript ?
|
||||
@ -27021,6 +27021,25 @@ function getFontType(type, subtype) {
|
||||
}
|
||||
}
|
||||
|
||||
// Some bad PDF generators, e.g. Scribus PDF, include glyph names
|
||||
// in a 'uniXXXX' format -- attempting to recover proper ones.
|
||||
function recoverGlyphName(name, glyphsUnicodeMap) {
|
||||
if (glyphsUnicodeMap[name] !== undefined) {
|
||||
return name;
|
||||
}
|
||||
// The glyph name is non-standard, trying to recover.
|
||||
var unicode = getUnicodeForGlyph(name, glyphsUnicodeMap);
|
||||
if (unicode !== -1) {
|
||||
for (var key in glyphsUnicodeMap) {
|
||||
if (glyphsUnicodeMap[key] === unicode) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
warn('Unable to recover a standard glyph name for: ' + name);
|
||||
return name;
|
||||
}
|
||||
|
||||
var Glyph = (function GlyphClosure() {
|
||||
function Glyph(fontChar, unicode, accent, width, vmetric, operatorListId,
|
||||
isSpace, isInFont) {
|
||||
@ -27280,6 +27299,7 @@ var ProblematicCharRanges = new Int32Array([
|
||||
0x2028, 0x2030,
|
||||
0x205F, 0x2070,
|
||||
0x25CC, 0x25CD,
|
||||
0x3000, 0x3001,
|
||||
// Chars that is used in complex-script shaping.
|
||||
0xAA60, 0xAA80,
|
||||
// Specials Unicode block.
|
||||
@ -29101,26 +29121,6 @@ var Font = (function FontClosure() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Some bad PDF generators, e.g. Scribus PDF, include glyph names
|
||||
// in a 'uniXXXX' format -- attempting to recover proper ones.
|
||||
function recoverGlyphName(name, glyphsUnicodeMap) {
|
||||
if (glyphsUnicodeMap[name] !== undefined) {
|
||||
return name;
|
||||
}
|
||||
// The glyph name is non-standard, trying to recover.
|
||||
var unicode = getUnicodeForGlyph(name, glyphsUnicodeMap);
|
||||
if (unicode !== -1) {
|
||||
for (var key in glyphsUnicodeMap) {
|
||||
if (glyphsUnicodeMap[key] === unicode) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
}
|
||||
warn('Unable to recover a standard glyph name for: ' + name);
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
if (properties.type === 'CIDFontType2') {
|
||||
var cidToGidMap = properties.cidToGidMap || [];
|
||||
var isCidToGidMapEmpty = cidToGidMap.length === 0;
|
||||
@ -29485,7 +29485,7 @@ var Font = (function FontClosure() {
|
||||
}
|
||||
|
||||
// trying to estimate space character width
|
||||
var possibleSpaceReplacements = ['space', 'minus', 'one', 'i'];
|
||||
var possibleSpaceReplacements = ['space', 'minus', 'one', 'i', 'I'];
|
||||
var width;
|
||||
for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
|
||||
var glyphName = possibleSpaceReplacements[i];
|
||||
@ -29694,11 +29694,21 @@ function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
|
||||
}
|
||||
|
||||
// Lastly, merge in the differences.
|
||||
var differences = properties.differences;
|
||||
var differences = properties.differences, glyphsUnicodeMap;
|
||||
if (differences) {
|
||||
for (charCode in differences) {
|
||||
var glyphName = differences[charCode];
|
||||
glyphId = glyphNames.indexOf(glyphName);
|
||||
|
||||
if (glyphId === -1) {
|
||||
if (!glyphsUnicodeMap) {
|
||||
glyphsUnicodeMap = getGlyphsUnicode();
|
||||
}
|
||||
var standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap);
|
||||
if (standardGlyphName !== glyphName) {
|
||||
glyphId = glyphNames.indexOf(standardGlyphName);
|
||||
}
|
||||
}
|
||||
if (glyphId >= 0) {
|
||||
charCodeToGlyphId[charCode] = glyphId;
|
||||
} else {
|
||||
@ -39735,6 +39745,7 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
|
||||
WidgetAnnotation.call(this, params);
|
||||
|
||||
this.data.textAlignment = Util.getInheritableProperty(params.dict, 'Q');
|
||||
this.data.maxLen = Util.getInheritableProperty(params.dict, 'MaxLen');
|
||||
}
|
||||
|
||||
Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
|
||||
|
@ -7372,7 +7372,8 @@ var PDFViewerApplication = {
|
||||
},
|
||||
|
||||
get supportsFullscreen() {
|
||||
var support = document.fullscreenEnabled === true;
|
||||
var support = document.fullscreenEnabled === true ||
|
||||
document.mozFullScreenEnabled === true;
|
||||
if (support && pdfjsLib.PDFJS.disableFullscreen === true) {
|
||||
support = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user