Bug 1778827 - Update pdf.js to version 2.15.244 r=pdfjs-reviewers,Snuffleupagus

Differential Revision: https://phabricator.services.mozilla.com/D151433
This commit is contained in:
Calixte 2022-07-09 16:26:30 +00:00
Родитель bef7b11ec0
Коммит d0845cb8cf
9 изменённых файлов: 160 добавлений и 99 удалений

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

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 2.15.224
Current extension version is: 2.15.244
Taken from upstream commit: bde46632d
Taken from upstream commit: 220f980e1

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

@ -33,6 +33,7 @@ var PdfJsDefaultPreferences = Object.freeze({
"externalLinkTarget": 0,
"historyUpdateUrl": false,
"ignoreDestinationZoom": false,
"forcePageColors": false,
"pageColorsBackground": "Canvas",
"pageColorsForeground": "CanvasText",
"pdfBugEnabled": false,

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

@ -1361,7 +1361,7 @@ async function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
const workerId = await worker.messageHandler.sendWithPromise("GetDocRequest", {
docId,
apiVersion: '2.15.224',
apiVersion: '2.15.244',
source: {
data: source.data,
url: source.url,
@ -3394,9 +3394,9 @@ class InternalRenderTask {
}
const version = '2.15.224';
const version = '2.15.244';
exports.version = version;
const build = 'bde46632d';
const build = '220f980e1';
exports.build = build;
/***/ }),
@ -4128,11 +4128,6 @@ class AnnotationEditorUIManager {
}
this.#allLayers.clear();
for (const editor of this.#allEditors.values()) {
editor.destroy();
}
this.#allEditors.clear();
this.#activeEditor = null;
this.#clipboardManager.destroy();
@ -10347,7 +10342,7 @@ class AnnotationEditorLayer {
#editors = new Map();
#uiManager;
static _initialized = false;
static _keyboardManager = new _tools.KeyboardManager([[["ctrl+a", "mac+meta+a"], AnnotationEditorLayer.prototype.selectAll], [["ctrl+c", "mac+meta+c"], AnnotationEditorLayer.prototype.copy], [["ctrl+v", "mac+meta+v"], AnnotationEditorLayer.prototype.paste], [["ctrl+x", "mac+meta+x"], AnnotationEditorLayer.prototype.cut], [["ctrl+z", "mac+meta+z"], AnnotationEditorLayer.prototype.undo], [["ctrl+y", "ctrl+shift+Z", "mac+meta+shift+Z"], AnnotationEditorLayer.prototype.redo], [["ctrl+Backspace", "mac+Backspace", "mac+ctrl+Backspace", "mac+alt+Backspace"], AnnotationEditorLayer.prototype.delete]]);
static _keyboardManager = new _tools.KeyboardManager([[["ctrl+a", "mac+meta+a"], AnnotationEditorLayer.prototype.selectAll], [["ctrl+c", "mac+meta+c"], AnnotationEditorLayer.prototype.copy], [["ctrl+v", "mac+meta+v"], AnnotationEditorLayer.prototype.paste], [["ctrl+x", "mac+meta+x"], AnnotationEditorLayer.prototype.cut], [["ctrl+z", "mac+meta+z"], AnnotationEditorLayer.prototype.undo], [["ctrl+y", "ctrl+shift+Z", "mac+meta+shift+Z"], AnnotationEditorLayer.prototype.redo], [["Backspace", "alt+Backspace", "ctrl+Backspace", "shift+Backspace", "mac+Backspace", "mac+alt+Backspace", "mac+ctrl+Backspace", "Delete", "ctrl+Delete", "shift+Delete"], AnnotationEditorLayer.prototype.delete]]);
constructor(options) {
if (!AnnotationEditorLayer._initialized) {
@ -11006,12 +11001,18 @@ Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.InkEditor = void 0;
Object.defineProperty(exports, "fitCurve", ({
enumerable: true,
get: function () {
return _pdfjsFitCurve.fitCurve;
}
}));
var _util = __w_pdfjs_require__(1);
var _editor = __w_pdfjs_require__(6);
var _fit_curve = __w_pdfjs_require__(24);
var _pdfjsFitCurve = __w_pdfjs_require__(24);
class InkEditor extends _editor.AnnotationEditor {
#aspectRatio = 0;
@ -11181,7 +11182,6 @@ class InkEditor extends _editor.AnnotationEditor {
}
super.enableEditMode();
this.canvas.style.cursor = "pointer";
this.div.draggable = false;
this.canvas.addEventListener("mousedown", this.#boundCanvasMousedown);
this.canvas.addEventListener("mouseup", this.#boundCanvasMouseup);
@ -11193,7 +11193,6 @@ class InkEditor extends _editor.AnnotationEditor {
}
super.disableEditMode();
this.canvas.style.cursor = "auto";
this.div.draggable = !this.isEmpty();
this.div.classList.remove("editing");
this.canvas.removeEventListener("mousedown", this.#boundCanvasMousedown);
@ -11259,7 +11258,7 @@ class InkEditor extends _editor.AnnotationEditor {
let bezier;
if (this.currentPath.length !== 2 || this.currentPath[0][0] !== x || this.currentPath[0][1] !== y) {
bezier = (0, _fit_curve.fitCurve)(this.currentPath, 30, null);
bezier = (0, _pdfjsFitCurve.fitCurve)(this.currentPath, 30, null);
} else {
const xy = [x, y];
bezier = [[xy, xy.slice(), xy.slice(), xy]];
@ -11446,7 +11445,7 @@ class InkEditor extends _editor.AnnotationEditor {
this.#realHeight = roundedHeight;
this.canvas.style.visibility = "hidden";
if (this.#aspectRatio) {
if (this.#aspectRatio && Math.abs(this.#aspectRatio - width / height) > 1e-2) {
height = Math.ceil(width / this.#aspectRatio);
this.setDims(width, height);
}
@ -11613,6 +11612,8 @@ class InkEditor extends _editor.AnnotationEditor {
this.translationY = -bbox[1];
this.#setCanvasDims();
this.#redraw();
this.#realWidth = width;
this.#realHeight = height;
this.setDims(width, height);
this.translate(prevTranslationX - this.translationX, prevTranslationY - this.translationY);
}
@ -11640,22 +11641,32 @@ exports.InkEditor = InkEditor;
/***/ }),
/* 24 */
/***/ ((__unused_webpack_module, exports) => {
/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.fitCurve = void 0;
const fitCurve = __w_pdfjs_require__(25);
exports.fitCurve = fitCurve;
/***/ }),
/* 25 */
/***/ ((module) => {
function fitCurve(points, maxError, progressCallback) {
if (!Array.isArray(points)) {
throw new TypeError("First argument should be an array");
}
points.forEach(point => {
if (!Array.isArray(point) || point.some(item => typeof item !== "number") || point.length !== points[0].length) {
if (!Array.isArray(point) || point.some(item => typeof item !== 'number') || point.length !== points[0].length) {
throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.");
}
});
@ -11673,7 +11684,7 @@ function fitCurve(points, maxError, progressCallback) {
function fitCubic(points, leftTangent, rightTangent, error, progressCallback) {
const MaxIterations = 20;
let bezCurve, uPrime, maxError, prevErr, splitPoint, prevSplit, centerVector, beziers, dist, i;
var bezCurve, u, uPrime, maxError, prevErr, splitPoint, prevSplit, centerVector, toCenterTangent, fromCenterTangent, beziers, dist, i;
if (points.length === 2) {
dist = maths.vectorLen(maths.subtract(points[0], points[1])) / 3.0;
@ -11681,7 +11692,7 @@ function fitCubic(points, leftTangent, rightTangent, error, progressCallback) {
return [bezCurve];
}
const u = chordLengthParameterize(points);
u = chordLengthParameterize(points);
[bezCurve, maxError, splitPoint] = generateAndReport(points, u, u, leftTangent, rightTangent, progressCallback);
if (maxError === 0 || maxError < error) {
@ -11700,9 +11711,9 @@ function fitCubic(points, leftTangent, rightTangent, error, progressCallback) {
if (maxError < error) {
return [bezCurve];
} else if (splitPoint === prevSplit) {
const errChange = maxError / prevErr;
let errChange = maxError / prevErr;
if (errChange > 0.9999 && errChange < 1.0001) {
if (errChange > .9999 && errChange < 1.0001) {
break;
}
}
@ -11720,21 +11731,24 @@ function fitCubic(points, leftTangent, rightTangent, error, progressCallback) {
[centerVector[0], centerVector[1]] = [-centerVector[1], centerVector[0]];
}
const toCenterTangent = maths.normalize(centerVector);
const fromCenterTangent = maths.mulItems(toCenterTangent, -1);
toCenterTangent = maths.normalize(centerVector);
fromCenterTangent = maths.mulItems(toCenterTangent, -1);
beziers = beziers.concat(fitCubic(points.slice(0, splitPoint + 1), leftTangent, toCenterTangent, error, progressCallback));
beziers = beziers.concat(fitCubic(points.slice(splitPoint), fromCenterTangent, rightTangent, error, progressCallback));
return beziers;
}
;
function generateAndReport(points, paramsOrig, paramsPrime, leftTangent, rightTangent, progressCallback) {
const bezCurve = generateBezier(points, paramsPrime, leftTangent, rightTangent);
const [maxError, splitPoint] = computeMaxError(points, bezCurve, paramsOrig);
var bezCurve, maxError, splitPoint;
bezCurve = generateBezier(points, paramsPrime, leftTangent, rightTangent, progressCallback);
[maxError, splitPoint] = computeMaxError(points, bezCurve, paramsOrig);
if (progressCallback) {
progressCallback({
bez: bezCurve,
points,
points: points,
params: paramsOrig,
maxErr: maxError,
maxPoint: splitPoint
@ -11745,13 +11759,29 @@ function generateAndReport(points, paramsOrig, paramsPrime, leftTangent, rightTa
}
function generateBezier(points, parameters, leftTangent, rightTangent) {
let a, tmp, u, ux;
const firstPoint = points[0];
const lastPoint = points.at(-1);
const bezCurve = [firstPoint, null, null, lastPoint];
const A = maths.zeros_Xx2x2(parameters.length);
var bezCurve,
A,
a,
C,
X,
det_C0_C1,
det_C0_X,
det_X_C1,
alpha_l,
alpha_r,
epsilon,
segLength,
i,
len,
tmp,
u,
ux,
firstPoint = points[0],
lastPoint = points[points.length - 1];
bezCurve = [firstPoint, null, null, lastPoint];
A = maths.zeros_Xx2x2(parameters.length);
for (let i = 0, len = parameters.length; i < len; i++) {
for (i = 0, len = parameters.length; i < len; i++) {
u = parameters[i];
ux = 1 - u;
a = A[i];
@ -11759,10 +11789,10 @@ function generateBezier(points, parameters, leftTangent, rightTangent) {
a[1] = maths.mulItems(rightTangent, 3 * ux * (u * u));
}
const C = [[0, 0], [0, 0]];
const X = [0, 0];
C = [[0, 0], [0, 0]];
X = [0, 0];
for (let i = 0, len = points.length; i < len; i++) {
for (i = 0, len = points.length; i < len; i++) {
u = parameters[i];
a = A[i];
C[0][0] += maths.dot(a[0], a[0]);
@ -11774,13 +11804,13 @@ function generateBezier(points, parameters, leftTangent, rightTangent) {
X[1] += maths.dot(a[1], tmp);
}
const det_C0_C1 = C[0][0] * C[1][1] - C[1][0] * C[0][1];
const det_C0_X = C[0][0] * X[1] - C[1][0] * X[0];
const det_X_C1 = X[0] * C[1][1] - X[1] * C[0][1];
const alpha_l = det_C0_C1 === 0 ? 0 : det_X_C1 / det_C0_C1;
const alpha_r = det_C0_C1 === 0 ? 0 : det_C0_X / det_C0_C1;
const segLength = maths.vectorLen(maths.subtract(firstPoint, lastPoint));
const epsilon = 1.0e-6 * segLength;
det_C0_C1 = C[0][0] * C[1][1] - C[1][0] * C[0][1];
det_C0_X = C[0][0] * X[1] - C[1][0] * X[0];
det_X_C1 = X[0] * C[1][1] - X[1] * C[0][1];
alpha_l = det_C0_C1 === 0 ? 0 : det_X_C1 / det_C0_C1;
alpha_r = det_C0_C1 === 0 ? 0 : det_C0_X / det_C0_C1;
segLength = maths.vectorLen(maths.subtract(firstPoint, lastPoint));
epsilon = 1.0e-6 * segLength;
if (alpha_l < epsilon || alpha_r < epsilon) {
bezCurve[1] = maths.addArrays(firstPoint, maths.mulItems(leftTangent, segLength / 3.0));
@ -11793,25 +11823,31 @@ function generateBezier(points, parameters, leftTangent, rightTangent) {
return bezCurve;
}
;
function reparameterize(bezier, points, parameters) {
return parameters.map((p, i) => newtonRaphsonRootFind(bezier, points[i], p));
}
;
function newtonRaphsonRootFind(bez, point, u) {
const d = maths.subtract(bezier.q(bez, u), point),
qprime = bezier.qprime(bez, u),
numerator = maths.mulMatrix(d, qprime),
denominator = maths.sum(maths.squareItems(qprime)) + 2 * maths.mulMatrix(d, bezier.qprimeprime(bez, u));
var d = maths.subtract(bezier.q(bez, u), point),
qprime = bezier.qprime(bez, u),
numerator = maths.mulMatrix(d, qprime),
denominator = maths.sum(maths.squareItems(qprime)) + 2 * maths.mulMatrix(d, bezier.qprimeprime(bez, u));
if (denominator === 0) {
return u;
} else {
return u - numerator / denominator;
}
return u - numerator / denominator;
}
;
function chordLengthParameterize(points) {
let u = [],
var u = [],
currU,
prevU,
prevP;
@ -11825,8 +11861,10 @@ function chordLengthParameterize(points) {
return u;
}
;
function computeMaxError(points, bez, parameters) {
let dist, maxDist, splitPoint, v, i, count, point, t;
var dist, maxDist, splitPoint, v, i, count, point, t;
maxDist = 0;
splitPoint = Math.floor(points.length / 2);
const t_distMap = mapTtoRelativeDistances(bez, 10);
@ -11846,13 +11884,15 @@ function computeMaxError(points, bez, parameters) {
return [maxDist, splitPoint];
}
function mapTtoRelativeDistances(bez, B_parts) {
let B_t_curr;
let B_t_dist = [0];
let B_t_prev = bez[0];
let sumLen = 0;
;
for (let i = 1; i <= B_parts; i++) {
var mapTtoRelativeDistances = function (bez, B_parts) {
var B_t_curr;
var B_t_dist = [0];
var B_t_prev = bez[0];
var sumLen = 0;
for (var i = 1; i <= B_parts; i++) {
B_t_curr = bezier.q(bez, i / B_parts);
sumLen += maths.vectorLen(maths.subtract(B_t_curr, B_t_prev));
B_t_dist.push(sumLen);
@ -11861,7 +11901,7 @@ function mapTtoRelativeDistances(bez, B_parts) {
B_t_dist = B_t_dist.map(x => x / sumLen);
return B_t_dist;
}
};
function find_t(bez, param, t_distMap, B_parts) {
if (param < 0) {
@ -11872,9 +11912,9 @@ function find_t(bez, param, t_distMap, B_parts) {
return 1;
}
let lenMax, lenMin, tMax, tMin, t;
var lenMax, lenMin, tMax, tMin, t;
for (let i = 1; i <= B_parts; i++) {
for (var i = 1; i <= B_parts; i++) {
if (param <= t_distMap[i]) {
tMin = (i - 1) / B_parts;
tMax = i / B_parts;
@ -11894,7 +11934,7 @@ function createTangent(pointA, pointB) {
class maths {
static zeros_Xx2x2(x) {
const zs = [];
var zs = [];
while (x--) {
zs.push([0, 0]);
@ -11951,19 +11991,19 @@ class maths {
class bezier {
static q(ctrlPoly, t) {
const tx = 1.0 - t;
const pA = maths.mulItems(ctrlPoly[0], tx * tx * tx),
pB = maths.mulItems(ctrlPoly[1], 3 * tx * tx * t),
pC = maths.mulItems(ctrlPoly[2], 3 * tx * t * t),
pD = maths.mulItems(ctrlPoly[3], t * t * t);
var tx = 1.0 - t;
var pA = maths.mulItems(ctrlPoly[0], tx * tx * tx),
pB = maths.mulItems(ctrlPoly[1], 3 * tx * tx * t),
pC = maths.mulItems(ctrlPoly[2], 3 * tx * t * t),
pD = maths.mulItems(ctrlPoly[3], t * t * t);
return maths.addArrays(maths.addArrays(pA, pB), maths.addArrays(pC, pD));
}
static qprime(ctrlPoly, t) {
const tx = 1.0 - t;
const pA = maths.mulItems(maths.subtract(ctrlPoly[1], ctrlPoly[0]), 3 * tx * tx),
pB = maths.mulItems(maths.subtract(ctrlPoly[2], ctrlPoly[1]), 6 * tx * t),
pC = maths.mulItems(maths.subtract(ctrlPoly[3], ctrlPoly[2]), 3 * t * t);
var tx = 1.0 - t;
var pA = maths.mulItems(maths.subtract(ctrlPoly[1], ctrlPoly[0]), 3 * tx * tx),
pB = maths.mulItems(maths.subtract(ctrlPoly[2], ctrlPoly[1]), 6 * tx * t),
pC = maths.mulItems(maths.subtract(ctrlPoly[3], ctrlPoly[2]), 3 * t * t);
return maths.addArrays(maths.addArrays(pA, pB), pC);
}
@ -11973,8 +12013,12 @@ class bezier {
}
module.exports = fitCurve;
module.exports.fitCubic = fitCubic;
module.exports.createTangent = createTangent;
/***/ }),
/* 25 */
/* 26 */
/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {
@ -11990,9 +12034,9 @@ var _display_utils = __w_pdfjs_require__(8);
var _annotation_storage = __w_pdfjs_require__(5);
var _scripting_utils = __w_pdfjs_require__(26);
var _scripting_utils = __w_pdfjs_require__(27);
var _xfa_layer = __w_pdfjs_require__(27);
var _xfa_layer = __w_pdfjs_require__(28);
const DEFAULT_TAB_INDEX = 1000;
const DEFAULT_FONT_SIZE = 9;
@ -13338,9 +13382,9 @@ class PushButtonWidgetAnnotationElement extends LinkAnnotationElement {
container.title = this.data.alternativeText;
}
if (this.enableScripting && this.hasJSActions) {
const linkElement = container.lastChild;
const linkElement = container.lastChild;
if (this.enableScripting && this.hasJSActions && linkElement) {
this._setDefaultPropertiesFromJS(linkElement);
linkElement.addEventListener("updatefromsandbox", jsEvent => {
@ -14342,7 +14386,7 @@ class AnnotationLayer {
exports.AnnotationLayer = AnnotationLayer;
/***/ }),
/* 26 */
/* 27 */
/***/ ((__unused_webpack_module, exports) => {
@ -14411,7 +14455,7 @@ class ColorConverters {
exports.ColorConverters = ColorConverters;
/***/ }),
/* 27 */
/* 28 */
/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {
@ -14659,7 +14703,7 @@ class XfaLayer {
exports.XfaLayer = XfaLayer;
/***/ }),
/* 28 */
/* 29 */
/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {
@ -14672,6 +14716,8 @@ exports.renderTextLayer = renderTextLayer;
var _util = __w_pdfjs_require__(1);
var _display_utils = __w_pdfjs_require__(8);
const MAX_TEXT_DIVS_TO_RENDER = 100000;
const DEFAULT_FONT_SIZE = 30;
const DEFAULT_FONT_ASCENT = 0.8;
@ -15160,6 +15206,10 @@ class TextLayerRenderTask {
textContentItemsStr,
enhanceTextSelection
}) {
if (enhanceTextSelection) {
(0, _display_utils.deprecated)("The `enhanceTextSelection` functionality will be removed in the future.");
}
this._textContent = textContent;
this._textContentStream = textContentStream;
this._container = container;
@ -15443,7 +15493,7 @@ function renderTextLayer(renderParameters) {
}
/***/ }),
/* 29 */
/* 30 */
/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {
@ -15738,20 +15788,20 @@ var _annotation_editor_layer = __w_pdfjs_require__(21);
var _tools = __w_pdfjs_require__(7);
var _annotation_layer = __w_pdfjs_require__(25);
var _annotation_layer = __w_pdfjs_require__(26);
var _worker_options = __w_pdfjs_require__(15);
var _is_node = __w_pdfjs_require__(3);
var _text_layer = __w_pdfjs_require__(28);
var _text_layer = __w_pdfjs_require__(29);
var _svg = __w_pdfjs_require__(29);
var _svg = __w_pdfjs_require__(30);
var _xfa_layer = __w_pdfjs_require__(27);
var _xfa_layer = __w_pdfjs_require__(28);
const pdfjsVersion = '2.15.224';
const pdfjsBuild = 'bde46632d';
const pdfjsVersion = '2.15.244';
const pdfjsBuild = '220f980e1';
;
})();

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

@ -5068,8 +5068,8 @@ Object.defineProperty(exports, "initSandbox", ({
var _initialization = __w_pdfjs_require__(1);
const pdfjsVersion = '2.15.224';
const pdfjsBuild = 'bde46632d';
const pdfjsVersion = '2.15.244';
const pdfjsBuild = '220f980e1';
})();
/******/ return __webpack_exports__;

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

@ -117,7 +117,7 @@ class WorkerMessageHandler {
const WorkerTasks = [];
const verbosity = (0, _util.getVerbosityLevel)();
const apiVersion = docParams.apiVersion;
const workerVersion = '2.15.224';
const workerVersion = '2.15.244';
if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
@ -3804,7 +3804,9 @@ class Page {
}
get resources() {
return (0, _util.shadow)(this, "resources", this._getInheritableProperty("Resources") || _primitives.Dict.empty);
const resources = this._getInheritableProperty("Resources");
return (0, _util.shadow)(this, "resources", resources instanceof _primitives.Dict ? resources : _primitives.Dict.empty);
}
_getBoundingBox(name) {
@ -63235,8 +63237,8 @@ Object.defineProperty(exports, "WorkerMessageHandler", ({
var _worker = __w_pdfjs_require__(1);
const pdfjsVersion = '2.15.224';
const pdfjsBuild = 'bde46632d';
const pdfjsVersion = '2.15.244';
const pdfjsBuild = '220f980e1';
})();
/******/ return __webpack_exports__;

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

@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 16 16">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" xmlns:xlink="http://www.w3.org/1999/xlink" enable-background="new 0 0 16 16">
<g>
<g transform="scale(0.03125)">
<path d="m455.1,137.9l-32.4,32.4-81-81.1 32.4-32.4c6.6-6.6 18.1-6.6 24.7,0l56.3,56.4c6.8,6.8 6.8,17.9 0,24.7zm-270.7,271l-81-81.1 209.4-209.7 81,81.1-209.4,209.7zm-99.7-42l60.6,60.7-84.4,23.8 23.8-84.5zm399.3-282.6l-56.3-56.4c-11-11-50.7-31.8-82.4,0l-285.3,285.5c-2.5,2.5-4.3,5.5-5.2,8.9l-43,153.1c-2,7.1 0.1,14.7 5.2,20 5.2,5.3 15.6,6.2 20,5.2l153-43.1c3.4-0.9 6.4-2.7 8.9-5.2l285.1-285.5c22.7-22.7 22.7-59.7 0-82.5z"/>

До

Ширина:  |  Высота:  |  Размер: 781 B

После

Ширина:  |  Высота:  |  Размер: 804 B

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

@ -690,6 +690,7 @@
--hover-outline: dashed 2px blue;
--freetext-line-height: 1.35;
--freetext-padding: 2px;
--editorInk-editing-cursor: url(images/toolbarButton-editorInk.svg) 0 16;
}
@media (forced-colors: active) {
@ -791,6 +792,7 @@
height: 100%;
z-index: 1;
transform-origin: 0 0;
cursor: auto;
}
.annotationEditorLayer .background {
@ -804,6 +806,7 @@
.annotationEditorLayer .inkEditor.editing {
resize: none;
cursor: var(--editorInk-editing-cursor), pointer;
}
.annotationEditorLayer .inkEditor .inkEditorCanvas {

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

@ -104,6 +104,10 @@ const defaultOptions = {
value: 16777216,
kind: OptionKind.VIEWER
},
forcePageColors: {
value: false,
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
},
pageColorsBackground: {
value: "Canvas",
kind: OptionKind.VIEWER + OptionKind.PREFERENCE
@ -678,10 +682,10 @@ const PDFViewerApplication = {
const annotationEditorMode = _app_options.AppOptions.get("annotationEditorMode");
const pageColors = {
const pageColors = _app_options.AppOptions.get("forcePageColors") || window.matchMedia("(forced-colors: active)").matches ? {
background: _app_options.AppOptions.get("pageColorsBackground"),
foreground: _app_options.AppOptions.get("pageColorsForeground")
};
} : null;
this.pdfViewer = new _pdf_viewer.PDFViewer({
container,
viewer,
@ -9747,7 +9751,7 @@ class BaseViewer {
throw new Error("Cannot initialize BaseViewer.");
}
const viewerVersion = '2.15.224';
const viewerVersion = '2.15.244';
if (_pdfjsLib.version !== viewerVersion) {
throw new Error(`The API version "${_pdfjsLib.version}" does not match the Viewer version "${viewerVersion}".`);
@ -14524,6 +14528,7 @@ class BasePreferences {
"externalLinkTarget": 0,
"historyUpdateUrl": false,
"ignoreDestinationZoom": false,
"forcePageColors": false,
"pageColorsBackground": "Canvas",
"pageColorsForeground": "CanvasText",
"pdfBugEnabled": false,
@ -14862,8 +14867,8 @@ var _app_options = __webpack_require__(1);
var _app = __webpack_require__(2);
const pdfjsVersion = '2.15.224';
const pdfjsBuild = 'bde46632d';
const pdfjsVersion = '2.15.244';
const pdfjsBuild = '220f980e1';
window.PDFViewerApplication = _app.PDFViewerApplication;
window.PDFViewerApplicationOptions = _app_options.AppOptions;
;

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

@ -20,8 +20,8 @@ origin:
# Human-readable identifier for this version/release
# Generally "version NNN", "tag SSS", "bookmark SSS"
release: bde46632d4b09f459acf38b761a882c9cb1ad95d (2022-07-06T08:10:22Z).
revision: bde46632d4b09f459acf38b761a882c9cb1ad95d
release: 220f980e12d1047d6b91facd15b74feaffbe520f (2022-07-09T03:01:22Z).
revision: 220f980e12d1047d6b91facd15b74feaffbe520f
# The package's license, where possible using the mnemonic from
# https://spdx.org/licenses/