Browse Source

PDF.js version 1.9.537 - See mozilla/pdf.js@bd3f16bffdf4cea0b5325e9b154219afc6880f95

master v1.9.537
pdfjsbot 7 years ago
parent
commit
c3111f4c6d
  1. 2
      bower.json
  2. 26
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 14
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 2
      build/pdf.min.js
  7. 16
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 2
      build/pdf.worker.min.js
  10. 6
      lib/core/annotation.js
  11. 4
      lib/core/function.js
  12. 2
      lib/core/type1_parser.js
  13. 4
      lib/display/api.js
  14. 4
      lib/display/global.js
  15. 2
      lib/display/svg.js
  16. 4
      lib/pdf.js
  17. 4
      lib/pdf.worker.js
  18. 4
      lib/web/pdf_link_service.js
  19. 2
      lib/web/pdf_viewer.js
  20. 2
      lib/web/preferences.js
  21. 2
      package.json
  22. 6
      web/pdf_viewer.js
  23. 2
      web/pdf_viewer.js.map

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.534",
"version": "1.9.537",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

26
build/pdf.combined.js

@ -6919,7 +6919,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() { @@ -6919,7 +6919,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() {
return null;
}
n = num1.number;
if (n < 0 || (n | 0) !== n || stack.length < n) {
if (n < 0 || !Number.isInteger(n) || stack.length < n) {
return null;
}
ast1 = stack[stack.length - n - 1];
@ -6963,7 +6963,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() { @@ -6963,7 +6963,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() {
}
j = num2.number;
n = num1.number;
if (n <= 0 || (n | 0) !== n || (j | 0) !== j || stack.length < n) {
if (n <= 0 || !Number.isInteger(n) || !Number.isInteger(j) || stack.length < n) {
return null;
}
j = (j % n + n) % n;
@ -13443,8 +13443,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -13443,8 +13443,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.534';
exports.build = build = 'c8b5ba27';
exports.version = version = '1.9.537';
exports.build = build = 'bd3f16bf';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -28434,7 +28434,7 @@ var SVGGraphics = function SVGGraphics() { @@ -28434,7 +28434,7 @@ var SVGGraphics = function SVGGraphics() {
return opTree;
}
function pf(value) {
if (value === (value | 0)) {
if (Number.isInteger(value)) {
return value.toString();
}
var s = value.toFixed(10);
@ -29207,8 +29207,8 @@ exports.SVGGraphics = SVGGraphics; @@ -29207,8 +29207,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsVersion = '1.9.537';
var pdfjsBuild = 'bd3f16bf';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(98);
var pdfjsDisplayAPI = __w_pdfjs_require__(55);
@ -35070,8 +35070,8 @@ if (!_global_scope2.default.PDFJS) { @@ -35070,8 +35070,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.534';
PDFJS.build = 'c8b5ba27';
PDFJS.version = '1.9.537';
PDFJS.build = 'bd3f16bf';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -45662,7 +45662,7 @@ var Type1CharString = function Type1CharStringClosure() { @@ -45662,7 +45662,7 @@ var Type1CharString = function Type1CharStringClosure() {
var start = stackLength - howManyArgs;
for (var i = start; i < stackLength; i++) {
var value = this.stack[i];
if (value === (value | 0)) {
if (Number.isInteger(value)) {
this.output.push(28, value >> 8 & 0xff, value & 0xff);
} else {
value = 65536 * value | 0;
@ -50915,7 +50915,7 @@ var AnnotationBorderStyle = function () { @@ -50915,7 +50915,7 @@ var AnnotationBorderStyle = function () {
_createClass(AnnotationBorderStyle, [{
key: 'setWidth',
value: function setWidth(width) {
if (width === (width | 0)) {
if (Number.isInteger(width)) {
this.width = width;
}
}
@ -50973,14 +50973,14 @@ var AnnotationBorderStyle = function () { @@ -50973,14 +50973,14 @@ var AnnotationBorderStyle = function () {
}, {
key: 'setHorizontalCornerRadius',
value: function setHorizontalCornerRadius(radius) {
if (radius === (radius | 0)) {
if (Number.isInteger(radius)) {
this.horizontalCornerRadius = radius;
}
}
}, {
key: 'setVerticalCornerRadius',
value: function setVerticalCornerRadius(radius) {
if (radius === (radius | 0)) {
if (Number.isInteger(radius)) {
this.verticalCornerRadius = radius;
}
}

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

14
build/pdf.js

@ -4173,8 +4173,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -4173,8 +4173,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.534';
exports.build = build = 'c8b5ba27';
exports.version = version = '1.9.537';
exports.build = build = 'bd3f16bf';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -6279,7 +6279,7 @@ var SVGGraphics = function SVGGraphics() { @@ -6279,7 +6279,7 @@ var SVGGraphics = function SVGGraphics() {
return opTree;
}
function pf(value) {
if (value === (value | 0)) {
if (Number.isInteger(value)) {
return value.toString();
}
var s = value.toFixed(10);
@ -7052,8 +7052,8 @@ exports.SVGGraphics = SVGGraphics; @@ -7052,8 +7052,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsVersion = '1.9.537';
var pdfjsBuild = 'bd3f16bf';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(82);
var pdfjsDisplayAPI = __w_pdfjs_require__(48);
@ -12915,8 +12915,8 @@ if (!_global_scope2.default.PDFJS) { @@ -12915,8 +12915,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.534';
PDFJS.build = 'c8b5ba27';
PDFJS.version = '1.9.537';
PDFJS.build = 'bd3f16bf';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

2
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

16
build/pdf.worker.js vendored

@ -6616,7 +6616,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() { @@ -6616,7 +6616,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() {
return null;
}
n = num1.number;
if (n < 0 || (n | 0) !== n || stack.length < n) {
if (n < 0 || !Number.isInteger(n) || stack.length < n) {
return null;
}
ast1 = stack[stack.length - n - 1];
@ -6660,7 +6660,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() { @@ -6660,7 +6660,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() {
}
j = num2.number;
n = num1.number;
if (n <= 0 || (n | 0) !== n || (j | 0) !== j || stack.length < n) {
if (n <= 0 || !Number.isInteger(n) || !Number.isInteger(j) || stack.length < n) {
return null;
}
j = (j % n + n) % n;
@ -24512,8 +24512,8 @@ exports.getUnicodeForGlyph = getUnicodeForGlyph; @@ -24512,8 +24512,8 @@ exports.getUnicodeForGlyph = getUnicodeForGlyph;
"use strict";
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsVersion = '1.9.537';
var pdfjsBuild = 'bd3f16bf';
var pdfjsCoreWorker = __w_pdfjs_require__(62);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -38140,7 +38140,7 @@ var Type1CharString = function Type1CharStringClosure() { @@ -38140,7 +38140,7 @@ var Type1CharString = function Type1CharStringClosure() {
var start = stackLength - howManyArgs;
for (var i = start; i < stackLength; i++) {
var value = this.stack[i];
if (value === (value | 0)) {
if (Number.isInteger(value)) {
this.output.push(28, value >> 8 & 0xff, value & 0xff);
} else {
value = 65536 * value | 0;
@ -43393,7 +43393,7 @@ var AnnotationBorderStyle = function () { @@ -43393,7 +43393,7 @@ var AnnotationBorderStyle = function () {
_createClass(AnnotationBorderStyle, [{
key: 'setWidth',
value: function setWidth(width) {
if (width === (width | 0)) {
if (Number.isInteger(width)) {
this.width = width;
}
}
@ -43451,14 +43451,14 @@ var AnnotationBorderStyle = function () { @@ -43451,14 +43451,14 @@ var AnnotationBorderStyle = function () {
}, {
key: 'setHorizontalCornerRadius',
value: function setHorizontalCornerRadius(radius) {
if (radius === (radius | 0)) {
if (Number.isInteger(radius)) {
this.horizontalCornerRadius = radius;
}
}
}, {
key: 'setVerticalCornerRadius',
value: function setVerticalCornerRadius(radius) {
if (radius === (radius | 0)) {
if (Number.isInteger(radius)) {
this.verticalCornerRadius = radius;
}
}

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

2
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

6
lib/core/annotation.js

@ -346,7 +346,7 @@ var AnnotationBorderStyle = function () { @@ -346,7 +346,7 @@ var AnnotationBorderStyle = function () {
_createClass(AnnotationBorderStyle, [{
key: 'setWidth',
value: function setWidth(width) {
if (width === (width | 0)) {
if (Number.isInteger(width)) {
this.width = width;
}
}
@ -404,14 +404,14 @@ var AnnotationBorderStyle = function () { @@ -404,14 +404,14 @@ var AnnotationBorderStyle = function () {
}, {
key: 'setHorizontalCornerRadius',
value: function setHorizontalCornerRadius(radius) {
if (radius === (radius | 0)) {
if (Number.isInteger(radius)) {
this.horizontalCornerRadius = radius;
}
}
}, {
key: 'setVerticalCornerRadius',
value: function setVerticalCornerRadius(radius) {
if (radius === (radius | 0)) {
if (Number.isInteger(radius)) {
this.verticalCornerRadius = radius;
}
}

4
lib/core/function.js

@ -886,7 +886,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() { @@ -886,7 +886,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() {
return null;
}
n = num1.number;
if (n < 0 || (n | 0) !== n || stack.length < n) {
if (n < 0 || !Number.isInteger(n) || stack.length < n) {
return null;
}
ast1 = stack[stack.length - n - 1];
@ -930,7 +930,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() { @@ -930,7 +930,7 @@ var PostScriptCompiler = function PostScriptCompilerClosure() {
}
j = num2.number;
n = num1.number;
if (n <= 0 || (n | 0) !== n || (j | 0) !== j || stack.length < n) {
if (n <= 0 || !Number.isInteger(n) || !Number.isInteger(j) || stack.length < n) {
return null;
}
j = (j % n + n) % n;

2
lib/core/type1_parser.js

@ -247,7 +247,7 @@ var Type1CharString = function Type1CharStringClosure() { @@ -247,7 +247,7 @@ var Type1CharString = function Type1CharStringClosure() {
var start = stackLength - howManyArgs;
for (var i = start; i < stackLength; i++) {
var value = this.stack[i];
if (value === (value | 0)) {
if (Number.isInteger(value)) {
this.output.push(28, value >> 8 & 0xff, value & 0xff);
} else {
value = 65536 * value | 0;

4
lib/display/api.js

@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -1581,8 +1581,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.534';
exports.build = build = 'c8b5ba27';
exports.version = version = '1.9.537';
exports.build = build = 'bd3f16bf';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) { @@ -45,8 +45,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.534';
PDFJS.build = 'c8b5ba27';
PDFJS.version = '1.9.537';
PDFJS.build = 'bd3f16bf';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

2
lib/display/svg.js

@ -265,7 +265,7 @@ var SVGGraphics = function SVGGraphics() { @@ -265,7 +265,7 @@ var SVGGraphics = function SVGGraphics() {
return opTree;
}
function pf(value) {
if (value === (value | 0)) {
if (Number.isInteger(value)) {
return value.toString();
}
var s = value.toFixed(10);

4
lib/pdf.js

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsVersion = '1.9.537';
var pdfjsBuild = 'bd3f16bf';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
*/
'use strict';
var pdfjsVersion = '1.9.534';
var pdfjsBuild = 'c8b5ba27';
var pdfjsVersion = '1.9.537';
var pdfjsBuild = 'bd3f16bf';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

4
lib/web/pdf_link_service.js

@ -86,7 +86,7 @@ var PDFLinkService = function () { @@ -86,7 +86,7 @@ var PDFLinkService = function () {
});
return;
}
} else if ((destRef | 0) === destRef) {
} else if (Number.isInteger(destRef)) {
pageNumber = destRef + 1;
} else {
console.error('PDFLinkService.navigateTo: "' + destRef + '" is not ' + ('a valid destination reference, for dest="' + dest + '".'));
@ -317,7 +317,7 @@ function isValidExplicitDestination(dest) { @@ -317,7 +317,7 @@ function isValidExplicitDestination(dest) {
return false;
}
var page = dest[0];
if (!((typeof page === 'undefined' ? 'undefined' : _typeof(page)) === 'object' && typeof page.num === 'number' && (page.num | 0) === page.num && typeof page.gen === 'number' && (page.gen | 0) === page.gen) && !(typeof page === 'number' && (page | 0) === page && page >= 0)) {
if (!((typeof page === 'undefined' ? 'undefined' : _typeof(page)) === 'object' && Number.isInteger(page.num) && Number.isInteger(page.gen)) && !(Number.isInteger(page) && page >= 0)) {
return false;
}
var zoom = dest[1];

2
lib/web/pdf_viewer.js

@ -710,7 +710,7 @@ var PDFViewer = function () { @@ -710,7 +710,7 @@ var PDFViewer = function () {
return this._currentPageNumber;
},
set: function set(val) {
if ((val | 0) !== val) {
if (!Number.isInteger(val)) {
throw new Error('Invalid page number.');
}
if (!this.pdfDocument) {

2
lib/web/preferences.js

@ -135,7 +135,7 @@ var BasePreferences = function () { @@ -135,7 +135,7 @@ var BasePreferences = function () {
throw new Error("Set preference: \"" + value + "\" is a " + valueType + ", " + ("expected a " + defaultType + "."));
}
} else {
if (valueType === 'number' && (value | 0) !== value) {
if (valueType === 'number' && !Number.isInteger(value)) {
throw new Error("Set preference: \"" + value + "\" must be an integer.");
}
}

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.9.534",
"version": "1.9.537",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

6
web/pdf_viewer.js

@ -821,7 +821,7 @@ var PDFLinkService = function () { @@ -821,7 +821,7 @@ var PDFLinkService = function () {
});
return;
}
} else if ((destRef | 0) === destRef) {
} else if (Number.isInteger(destRef)) {
pageNumber = destRef + 1;
} else {
console.error('PDFLinkService.navigateTo: "' + destRef + '" is not ' + ('a valid destination reference, for dest="' + dest + '".'));
@ -1052,7 +1052,7 @@ function isValidExplicitDestination(dest) { @@ -1052,7 +1052,7 @@ function isValidExplicitDestination(dest) {
return false;
}
var page = dest[0];
if (!((typeof page === 'undefined' ? 'undefined' : _typeof(page)) === 'object' && typeof page.num === 'number' && (page.num | 0) === page.num && typeof page.gen === 'number' && (page.gen | 0) === page.gen) && !(typeof page === 'number' && (page | 0) === page && page >= 0)) {
if (!((typeof page === 'undefined' ? 'undefined' : _typeof(page)) === 'object' && Number.isInteger(page.num) && Number.isInteger(page.gen)) && !(Number.isInteger(page) && page >= 0)) {
return false;
}
var zoom = dest[1];
@ -3002,7 +3002,7 @@ var PDFViewer = function () { @@ -3002,7 +3002,7 @@ var PDFViewer = function () {
return this._currentPageNumber;
},
set: function set(val) {
if ((val | 0) !== val) {
if (!Number.isInteger(val)) {
throw new Error('Invalid page number.');
}
if (!this.pdfDocument) {

2
web/pdf_viewer.js.map

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save