Browse Source

PDF.js version 2.0.352 - See mozilla/pdf.js@368a91b57705aa69a02e4992896560c4603b729d

master v2.0.352
pdfjsbot 7 years ago
parent
commit
3b95c5b531
  1. 2
      bower.json
  2. 14
      build/pdf.js
  3. 2
      build/pdf.js.map
  4. 2
      build/pdf.min.js
  5. 6
      build/pdf.worker.js
  6. 2
      build/pdf.worker.js.map
  7. 2
      build/pdf.worker.min.js
  8. 2
      lib/core/worker.js
  9. 6
      lib/display/api.js
  10. 4
      lib/display/global.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 2
      lib/web/app.js
  14. 4
      lib/web/debugger.js
  15. 4
      lib/web/download_manager.js
  16. 4
      lib/web/pdf_link_service.js
  17. 4
      lib/web/pdf_print_service.js
  18. 2
      lib/web/ui_utils.js
  19. 2
      package.json
  20. 10
      web/pdf_viewer.js
  21. 2
      web/pdf_viewer.js.map

2
bower.json

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

14
build/pdf.js

@ -3299,7 +3299,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -3299,7 +3299,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.349';
var apiVersion = '2.0.352';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -4698,8 +4698,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -4698,8 +4698,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.349';
exports.build = build = '9767b8a9';
exports.version = version = '2.0.352';
exports.build = build = '368a91b5';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -7457,8 +7457,8 @@ exports.SVGGraphics = SVGGraphics; @@ -7457,8 +7457,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '2.0.349';
var pdfjsBuild = '9767b8a9';
var pdfjsVersion = '2.0.352';
var pdfjsBuild = '368a91b5';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(120);
var pdfjsDisplayAPI = __w_pdfjs_require__(58);
@ -12743,8 +12743,8 @@ if (!_global_scope2.default.PDFJS) { @@ -12743,8 +12743,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.349';
PDFJS.build = '9767b8a9';
PDFJS.version = '2.0.352';
PDFJS.build = '368a91b5';
}
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

6
build/pdf.worker.js vendored

@ -22295,8 +22295,8 @@ exports.PostScriptCompiler = PostScriptCompiler; @@ -22295,8 +22295,8 @@ exports.PostScriptCompiler = PostScriptCompiler;
"use strict";
var pdfjsVersion = '2.0.349';
var pdfjsBuild = '9767b8a9';
var pdfjsVersion = '2.0.352';
var pdfjsBuild = '368a91b5';
var pdfjsCoreWorker = __w_pdfjs_require__(74);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -22509,7 +22509,7 @@ var WorkerMessageHandler = { @@ -22509,7 +22509,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.349';
var workerVersion = '2.0.352';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}

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

2
lib/core/worker.js

@ -223,7 +223,7 @@ var WorkerMessageHandler = { @@ -223,7 +223,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.0.349';
var workerVersion = '2.0.352';
if (apiVersion !== null && apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}

6
lib/display/api.js

@ -178,7 +178,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { @@ -178,7 +178,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
if (worker.destroyed) {
return Promise.reject(new Error('Worker was destroyed'));
}
var apiVersion = '2.0.349';
var apiVersion = '2.0.352';
source.disableRange = (0, _dom_utils.getDefaultSetting)('disableRange');
source.disableAutoFetch = (0, _dom_utils.getDefaultSetting)('disableAutoFetch');
source.disableStream = (0, _dom_utils.getDefaultSetting)('disableStream');
@ -1577,8 +1577,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() { @@ -1577,8 +1577,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.0.349';
exports.build = build = '9767b8a9';
exports.version = version = '2.0.352';
exports.build = build = '368a91b5';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -51,8 +51,8 @@ if (!_global_scope2.default.PDFJS) { @@ -51,8 +51,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '2.0.349';
PDFJS.build = '9767b8a9';
PDFJS.version = '2.0.352';
PDFJS.build = '368a91b5';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -21,8 +21,8 @@ @@ -21,8 +21,8 @@
*/
'use strict';
var pdfjsVersion = '2.0.349';
var pdfjsBuild = '9767b8a9';
var pdfjsVersion = '2.0.352';
var pdfjsBuild = '368a91b5';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
*/
'use strict';
var pdfjsVersion = '2.0.349';
var pdfjsBuild = '9767b8a9';
var pdfjsVersion = '2.0.352';
var pdfjsBuild = '368a91b5';
var pdfjsCoreWorker = require('./core/worker.js');
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

2
lib/web/app.js

@ -1094,7 +1094,7 @@ var validateFileURL = void 0; @@ -1094,7 +1094,7 @@ var validateFileURL = void 0;
}
try {
var viewerOrigin = new URL(window.location.href).origin || 'null';
if (HOSTED_VIEWER_ORIGINS.indexOf(viewerOrigin) >= 0) {
if (HOSTED_VIEWER_ORIGINS.includes(viewerOrigin)) {
return;
}
var fileOrigin = new URL(file, window.location.href).origin;

4
lib/web/debugger.js

@ -324,7 +324,7 @@ var Stepper = function StepperClosure() { @@ -324,7 +324,7 @@ var Stepper = function StepperClosure() {
line.className = 'line';
line.dataset.idx = i;
chunk.appendChild(line);
var checked = this.breakPoints.indexOf(i) !== -1;
var checked = this.breakPoints.includes(i);
var args = operatorList.argsArray[i] || [];
var breakCell = c('td');
var cbox = c('input');
@ -500,7 +500,7 @@ window.PDFBug = function PDFBugClosure() { @@ -500,7 +500,7 @@ window.PDFBug = function PDFBugClosure() {
}
for (var i = 0; i < tools.length; ++i) {
var tool = tools[i];
if (all || ids.indexOf(tool.id) !== -1) {
if (all || ids.includes(tool.id)) {
tool.enabled = true;
}
}

4
lib/web/download_manager.js

@ -43,10 +43,10 @@ function _download(blobUrl, filename) { @@ -43,10 +43,10 @@ function _download(blobUrl, filename) {
}
(document.body || document.documentElement).appendChild(a);
a.click();
a.parentNode.removeChild(a);
a.remove();
} else {
if (window.top === window && blobUrl.split('#')[0] === window.location.href.split('#')[0]) {
var padCharacter = blobUrl.indexOf('?') === -1 ? '?' : '&';
var padCharacter = blobUrl.includes('?') ? '&' : '?';
blobUrl = blobUrl.replace(/#|$/, padCharacter + '$&');
}
window.open(blobUrl, '_parent');

4
lib/web/pdf_link_service.js

@ -160,7 +160,7 @@ var PDFLinkService = function () { @@ -160,7 +160,7 @@ var PDFLinkService = function () {
value: function setHash(hash) {
var pageNumber = void 0,
dest = void 0;
if (hash.indexOf('=') >= 0) {
if (hash.includes('=')) {
var params = (0, _ui_utils.parseQueryString)(hash);
if ('search' in params) {
this.eventBus.dispatch('findfromurlhash', {
@ -180,7 +180,7 @@ var PDFLinkService = function () { @@ -180,7 +180,7 @@ var PDFLinkService = function () {
var zoomArgs = params.zoom.split(',');
var zoomArg = zoomArgs[0];
var zoomArgNumber = parseFloat(zoomArg);
if (zoomArg.indexOf('Fit') === -1) {
if (!zoomArg.includes('Fit')) {
dest = [null, { name: 'XYZ' }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null, zoomArgs.length > 2 ? zoomArgs[2] | 0 : null, zoomArgNumber ? zoomArgNumber / 100 : zoomArg];
} else {
if (zoomArg === 'Fit' || zoomArg === 'FitB') {

4
lib/web/pdf_print_service.js

@ -91,8 +91,8 @@ PDFPrintService.prototype = { @@ -91,8 +91,8 @@ PDFPrintService.prototype = {
return;
}
this.printContainer.textContent = '';
if (this.pageStyleSheet && this.pageStyleSheet.parentNode) {
this.pageStyleSheet.parentNode.removeChild(this.pageStyleSheet);
if (this.pageStyleSheet) {
this.pageStyleSheet.remove();
this.pageStyleSheet = null;
}
this.scratchCanvas.width = this.scratchCanvas.height = 0;

2
lib/web/ui_utils.js

@ -315,7 +315,7 @@ function getPDFFileNameFromURL(url) { @@ -315,7 +315,7 @@ function getPDFFileNameFromURL(url) {
var suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]);
if (suggestedFilename) {
suggestedFilename = suggestedFilename[0];
if (suggestedFilename.indexOf('%') !== -1) {
if (suggestedFilename.includes('%')) {
try {
suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0];
} catch (ex) {}

2
package.json

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

10
web/pdf_viewer.js

@ -411,7 +411,7 @@ function getPDFFileNameFromURL(url) { @@ -411,7 +411,7 @@ function getPDFFileNameFromURL(url) {
var suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]);
if (suggestedFilename) {
suggestedFilename = suggestedFilename[0];
if (suggestedFilename.indexOf('%') !== -1) {
if (suggestedFilename.includes('%')) {
try {
suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0];
} catch (ex) {}
@ -917,7 +917,7 @@ var PDFLinkService = function () { @@ -917,7 +917,7 @@ var PDFLinkService = function () {
value: function setHash(hash) {
var pageNumber = void 0,
dest = void 0;
if (hash.indexOf('=') >= 0) {
if (hash.includes('=')) {
var params = (0, _ui_utils.parseQueryString)(hash);
if ('search' in params) {
this.eventBus.dispatch('findfromurlhash', {
@ -937,7 +937,7 @@ var PDFLinkService = function () { @@ -937,7 +937,7 @@ var PDFLinkService = function () {
var zoomArgs = params.zoom.split(',');
var zoomArg = zoomArgs[0];
var zoomArgNumber = parseFloat(zoomArg);
if (zoomArg.indexOf('Fit') === -1) {
if (!zoomArg.includes('Fit')) {
dest = [null, { name: 'XYZ' }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null, zoomArgs.length > 2 ? zoomArgs[2] | 0 : null, zoomArgNumber ? zoomArgNumber / 100 : zoomArg];
} else {
if (zoomArg === 'Fit' || zoomArg === 'FitB') {
@ -3202,10 +3202,10 @@ function _download(blobUrl, filename) { @@ -3202,10 +3202,10 @@ function _download(blobUrl, filename) {
}
(document.body || document.documentElement).appendChild(a);
a.click();
a.parentNode.removeChild(a);
a.remove();
} else {
if (window.top === window && blobUrl.split('#')[0] === window.location.href.split('#')[0]) {
var padCharacter = blobUrl.indexOf('?') === -1 ? '?' : '&';
var padCharacter = blobUrl.includes('?') ? '&' : '?';
blobUrl = blobUrl.replace(/#|$/, padCharacter + '$&');
}
window.open(blobUrl, '_parent');

2
web/pdf_viewer.js.map

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