Bug 1516969 - Update pdf.js to version 2.1.145. r=bdahl

This commit is contained in:
Ryan VanderMeulen 2018-12-31 08:33:37 -05:00
Родитель d03099b507
Коммит e990c18296
5 изменённых файлов: 584 добавлений и 558 удалений

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

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 2.1.132 Current extension version is: 2.1.145
Taken from upstream commit: d3868e1b Taken from upstream commit: d8f201ea

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

@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict"; "use strict";
var pdfjsVersion = '2.1.132'; var pdfjsVersion = '2.1.145';
var pdfjsBuild = 'd3868e1b'; var pdfjsBuild = 'd8f201ea';
var pdfjsSharedUtil = __w_pdfjs_require__(1); var pdfjsSharedUtil = __w_pdfjs_require__(1);
@ -235,7 +235,7 @@ Object.defineProperty(exports, "URL", {
return _url_polyfill.URL; return _url_polyfill.URL;
} }
}); });
exports.createObjectURL = exports.FormatError = exports.XRefParseException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = void 0; exports.createObjectURL = exports.FormatError = exports.XRefParseException = exports.XRefEntryException = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = void 0;
__w_pdfjs_require__(2); __w_pdfjs_require__(2);
@ -695,6 +695,19 @@ var MissingDataException = function MissingDataExceptionClosure() {
exports.MissingDataException = MissingDataException; exports.MissingDataException = MissingDataException;
const XRefEntryException = function XRefEntryExceptionClosure() {
function XRefEntryException(msg) {
this.message = msg;
}
XRefEntryException.prototype = new Error();
XRefEntryException.prototype.name = 'XRefEntryException';
XRefEntryException.constructor = XRefEntryException;
return XRefEntryException;
}();
exports.XRefEntryException = XRefEntryException;
var XRefParseException = function XRefParseExceptionClosure() { var XRefParseException = function XRefParseExceptionClosure() {
function XRefParseException(msg) { function XRefParseException(msg) {
this.message = msg; this.message = msg;
@ -5141,7 +5154,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
return worker.messageHandler.sendWithPromise('GetDocRequest', { return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId, docId,
apiVersion: '2.1.132', apiVersion: '2.1.145',
source: { source: {
data: source.data, data: source.data,
url: source.url, url: source.url,
@ -6872,9 +6885,9 @@ const InternalRenderTask = function InternalRenderTaskClosure() {
return InternalRenderTask; return InternalRenderTask;
}(); }();
const version = '2.1.132'; const version = '2.1.145';
exports.version = version; exports.version = version;
const build = 'd3868e1b'; const build = 'd8f201ea';
exports.build = build; exports.build = build;
/***/ }), /***/ }),
@ -8784,11 +8797,10 @@ var CanvasGraphics = function CanvasGraphicsClosure() {
var name = fontObj.loadedName || 'sans-serif'; var name = fontObj.loadedName || 'sans-serif';
var bold = fontObj.black ? '900' : fontObj.bold ? 'bold' : 'normal'; var bold = fontObj.black ? '900' : fontObj.bold ? 'bold' : 'normal';
var italic = fontObj.italic ? 'italic' : 'normal'; var italic = fontObj.italic ? 'italic' : 'normal';
var typeface = '"' + name + '", ' + fontObj.fallbackName; var typeface = `"${name}", ${fontObj.fallbackName}`;
var browserFontSize = size < MIN_FONT_SIZE ? MIN_FONT_SIZE : size > MAX_FONT_SIZE ? MAX_FONT_SIZE : size; var browserFontSize = size < MIN_FONT_SIZE ? MIN_FONT_SIZE : size > MAX_FONT_SIZE ? MAX_FONT_SIZE : size;
this.current.fontSizeScale = size / browserFontSize; this.current.fontSizeScale = size / browserFontSize;
var rule = italic + ' ' + bold + ' ' + browserFontSize + 'px ' + typeface; this.ctx.font = `${italic} ${bold} ${browserFontSize}px ${typeface}`;
this.ctx.font = rule;
}, },
setTextRenderingMode: function CanvasGraphics_setTextRenderingMode(mode) { setTextRenderingMode: function CanvasGraphics_setTextRenderingMode(mode) {
this.current.textRenderingMode = mode; this.current.textRenderingMode = mode;
@ -12344,14 +12356,14 @@ var renderTextLayer = function renderTextLayerClosure() {
if (textDivProperties.canvasWidth !== 0 && width > 0) { if (textDivProperties.canvasWidth !== 0 && width > 0) {
textDivProperties.scale = textDivProperties.canvasWidth / width; textDivProperties.scale = textDivProperties.canvasWidth / width;
transform = 'scaleX(' + textDivProperties.scale + ')'; transform = `scaleX(${textDivProperties.scale})`;
} }
if (textDivProperties.angle !== 0) { if (textDivProperties.angle !== 0) {
transform = 'rotate(' + textDivProperties.angle + 'deg) ' + transform; transform = `rotate(${textDivProperties.angle}deg) ${transform}`;
} }
if (transform !== '') { if (transform.length > 0) {
textDivProperties.originalTransform = transform; textDivProperties.originalTransform = transform;
textDiv.style.transform = transform; textDiv.style.transform = transform;
} }

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -56,6 +56,8 @@
background-color: rgb(0, 100, 0); background-color: rgb(0, 100, 0);
} }
.textLayer ::-moz-selection { background: rgb(0,0,255); }
.textLayer ::selection { background: rgb(0,0,255); } .textLayer ::selection { background: rgb(0,0,255); }
.textLayer .endOfContent { .textLayer .endOfContent {
@ -1675,6 +1677,7 @@ html[dir='rtl'] .outlineItemToggler::before {
/* TODO: file FF bug to support ::-moz-selection:window-inactive /* TODO: file FF bug to support ::-moz-selection:window-inactive
so we can override the opaque grey background when the window is inactive; so we can override the opaque grey background when the window is inactive;
see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */ see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */
::-moz-selection { background: rgba(0,0,255,0.3); }
::selection { background: rgba(0,0,255,0.3); } ::selection { background: rgba(0,0,255,0.3); }
#errorWrapper { #errorWrapper {

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

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