Browse Source

PDF.js version 1.7.370 - See mozilla/pdf.js@3ff872b7968c299f1c4743193056b4eabfe29489

master v1.7.370
pdfjsbot 8 years ago
parent
commit
f4e91e52b8
  1. 2
      bower.json
  2. 56
      build/pdf.combined.js
  3. 52
      build/pdf.js
  4. 6
      build/pdf.min.js
  5. 48
      build/pdf.worker.js
  6. 2
      build/pdf.worker.min.js
  7. 2
      lib/core/evaluator.js
  8. 2
      lib/core/jpx.js
  9. 4
      lib/display/api.js
  10. 4
      lib/display/global.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 40
      lib/shared/compatibility.js
  14. 2
      package.json
  15. 40
      web/compatibility.js

2
bower.json

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

56
build/pdf.combined.js

@ -20022,8 +20022,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -20022,8 +20022,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}
};
}();
exports.version = '1.7.368';
exports.build = 'da326a31';
exports.version = '1.7.370';
exports.build = '3ff872b7';
exports.getDocument = getDocument;
exports.PDFDataRangeTransport = PDFDataRangeTransport;
exports.PDFWorker = PDFWorker;
@ -29736,7 +29736,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { @@ -29736,7 +29736,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
assert(isStream(xobj), 'XObject should be a stream');
var type = xobj.dict.get('Subtype');
assert(isName(type), 'XObject should have a Name subtype');
if ('Form' !== type.name) {
if (type.name !== 'Form') {
xobjsCache.key = name;
xobjsCache.texts = null;
break;
@ -31497,7 +31497,7 @@ var JpxImage = function JpxImageClosure() { @@ -31497,7 +31497,7 @@ var JpxImage = function JpxImageClosure() {
this.parseCodestream(data, position, position + dataLength);
break;
case 0x6A502020:
if (0x0d0a870a !== readUint32(data, position)) {
if (readUint32(data, position) !== 0x0d0a870a) {
warn('Invalid JP2 signature');
}
break;
@ -38777,8 +38777,8 @@ if (!globalScope.PDFJS) { @@ -38777,8 +38777,8 @@ if (!globalScope.PDFJS) {
globalScope.PDFJS = {};
}
var PDFJS = globalScope.PDFJS;
PDFJS.version = '1.7.368';
PDFJS.build = 'da326a31';
PDFJS.version = '1.7.370';
PDFJS.build = '3ff872b7';
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
sharedUtil.setVerbosityLevel(PDFJS.verbosity);
@ -57441,7 +57441,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57441,7 +57441,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
cursor = 0;
state = 'no scheme';
continue;
} else if (EOF === c) {
} else if (c === EOF) {
break loop;
} else {
err('Code point not allowed in scheme: ' + c);
@ -57456,7 +57456,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57456,7 +57456,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
} else {
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._schemeData += percentEscape(c);
}
}
@ -57481,10 +57481,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57481,10 +57481,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'relative':
this._isRelative = true;
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._scheme = base._scheme;
}
if (EOF === c) {
if (c === EOF) {
this._host = base._host;
this._port = base._port;
this._path = base._path.slice();
@ -57517,7 +57517,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57517,7 +57517,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
} else {
var nextC = input[cursor + 1];
var nextNextC = input[cursor + 2];
if ('file' !== this._scheme || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC && '?' !== nextNextC && '#' !== nextNextC) {
if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -57540,7 +57540,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57540,7 +57540,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
state = 'authority ignore slashes';
}
} else {
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -57561,13 +57561,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57561,13 +57561,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'authority second slash':
state = 'authority ignore slashes';
if ('/' !== c) {
if (c !== '/') {
err('Expected \'/\', got: ' + c);
continue;
}
break;
case 'authority ignore slashes':
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
state = 'authority';
continue;
} else {
@ -57592,7 +57592,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57592,7 +57592,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
continue;
}
var tempC = percentEscape(cp);
if (null !== this._password) {
if (this._password !== null) {
this._password += tempC;
} else {
this._username += tempC;
@ -57643,7 +57643,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57643,7 +57643,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break loop;
}
continue;
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
if (c === '[') {
seenBracket = true;
} else if (c === ']') {
@ -57658,7 +57658,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57658,7 +57658,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (/[0-9]/.test(c)) {
buffer += c;
} else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) {
if ('' !== buffer) {
if (buffer !== '') {
var temp = parseInt(buffer, 10);
if (temp !== relative[this._scheme]) {
this._port = temp + '';
@ -57681,7 +57681,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57681,7 +57681,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
err('\'\\\' not allowed in path.');
}
state = 'relative path';
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
continue;
}
break;
@ -57696,12 +57696,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57696,12 +57696,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
}
if (buffer === '..') {
this._path.pop();
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
this._path.push('');
}
} else if (buffer === '.' && '/' !== c && '\\' !== c) {
} else if (buffer === '.' && c !== '/' && c !== '\\') {
this._path.push('');
} else if ('.' !== buffer) {
} else if (buffer !== '.') {
if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') {
buffer = buffer[0] + ':';
}
@ -57715,7 +57715,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57715,7 +57715,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
}
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
buffer += percentEscape(c);
}
break;
@ -57723,12 +57723,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57723,12 +57723,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (!stateOverride && c === '#') {
this._fragment = '#';
state = 'fragment';
} else if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._query += percentEscapeQuery(c);
}
break;
case 'fragment':
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._fragment += c;
}
break;
@ -57767,8 +57767,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57767,8 +57767,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
return this._url;
}
var authority = '';
if ('' !== this._username || null !== this._password) {
authority = this._username + (null !== this._password ? ':' + this._password : '') + '@';
if (this._username !== '' || this._password !== null) {
authority = this._username + (this._password !== null ? ':' + this._password : '') + '@';
}
return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment;
},
@ -57887,8 +57887,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -57887,8 +57887,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
"use strict";
var pdfjsVersion = '1.7.368';
var pdfjsBuild = 'da326a31';
var pdfjsVersion = '1.7.370';
var pdfjsBuild = '3ff872b7';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(26);
var pdfjsDisplayAPI = __w_pdfjs_require__(10);

52
build/pdf.js

@ -3735,8 +3735,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -3735,8 +3735,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}
};
}();
exports.version = '1.7.368';
exports.build = 'da326a31';
exports.version = '1.7.370';
exports.build = '3ff872b7';
exports.getDocument = getDocument;
exports.PDFDataRangeTransport = PDFDataRangeTransport;
exports.PDFWorker = PDFWorker;
@ -5768,8 +5768,8 @@ if (!globalScope.PDFJS) { @@ -5768,8 +5768,8 @@ if (!globalScope.PDFJS) {
globalScope.PDFJS = {};
}
var PDFJS = globalScope.PDFJS;
PDFJS.version = '1.7.368';
PDFJS.build = 'da326a31';
PDFJS.version = '1.7.370';
PDFJS.build = '3ff872b7';
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
sharedUtil.setVerbosityLevel(PDFJS.verbosity);
@ -9409,7 +9409,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9409,7 +9409,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
cursor = 0;
state = 'no scheme';
continue;
} else if (EOF === c) {
} else if (c === EOF) {
break loop;
} else {
err('Code point not allowed in scheme: ' + c);
@ -9424,7 +9424,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9424,7 +9424,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
} else {
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._schemeData += percentEscape(c);
}
}
@ -9449,10 +9449,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9449,10 +9449,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'relative':
this._isRelative = true;
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._scheme = base._scheme;
}
if (EOF === c) {
if (c === EOF) {
this._host = base._host;
this._port = base._port;
this._path = base._path.slice();
@ -9485,7 +9485,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9485,7 +9485,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
} else {
var nextC = input[cursor + 1];
var nextNextC = input[cursor + 2];
if ('file' !== this._scheme || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC && '?' !== nextNextC && '#' !== nextNextC) {
if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -9508,7 +9508,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9508,7 +9508,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
state = 'authority ignore slashes';
}
} else {
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -9529,13 +9529,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9529,13 +9529,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'authority second slash':
state = 'authority ignore slashes';
if ('/' !== c) {
if (c !== '/') {
err('Expected \'/\', got: ' + c);
continue;
}
break;
case 'authority ignore slashes':
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
state = 'authority';
continue;
} else {
@ -9560,7 +9560,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9560,7 +9560,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
continue;
}
var tempC = percentEscape(cp);
if (null !== this._password) {
if (this._password !== null) {
this._password += tempC;
} else {
this._username += tempC;
@ -9611,7 +9611,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9611,7 +9611,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break loop;
}
continue;
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
if (c === '[') {
seenBracket = true;
} else if (c === ']') {
@ -9626,7 +9626,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9626,7 +9626,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (/[0-9]/.test(c)) {
buffer += c;
} else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) {
if ('' !== buffer) {
if (buffer !== '') {
var temp = parseInt(buffer, 10);
if (temp !== relative[this._scheme]) {
this._port = temp + '';
@ -9649,7 +9649,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9649,7 +9649,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
err('\'\\\' not allowed in path.');
}
state = 'relative path';
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
continue;
}
break;
@ -9664,12 +9664,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9664,12 +9664,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
}
if (buffer === '..') {
this._path.pop();
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
this._path.push('');
}
} else if (buffer === '.' && '/' !== c && '\\' !== c) {
} else if (buffer === '.' && c !== '/' && c !== '\\') {
this._path.push('');
} else if ('.' !== buffer) {
} else if (buffer !== '.') {
if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') {
buffer = buffer[0] + ':';
}
@ -9683,7 +9683,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9683,7 +9683,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
}
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
buffer += percentEscape(c);
}
break;
@ -9691,12 +9691,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9691,12 +9691,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (!stateOverride && c === '#') {
this._fragment = '#';
state = 'fragment';
} else if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._query += percentEscapeQuery(c);
}
break;
case 'fragment':
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._fragment += c;
}
break;
@ -9735,8 +9735,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9735,8 +9735,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
return this._url;
}
var authority = '';
if ('' !== this._username || null !== this._password) {
authority = this._username + (null !== this._password ? ':' + this._password : '') + '@';
if (this._username !== '' || this._password !== null) {
authority = this._username + (this._password !== null ? ':' + this._password : '') + '@';
}
return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment;
},
@ -9855,8 +9855,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -9855,8 +9855,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
"use strict";
var pdfjsVersion = '1.7.368';
var pdfjsBuild = 'da326a31';
var pdfjsVersion = '1.7.370';
var pdfjsBuild = '3ff872b7';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(9);
var pdfjsDisplayAPI = __w_pdfjs_require__(3);

6
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

48
build/pdf.worker.js vendored

@ -26753,7 +26753,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { @@ -26753,7 +26753,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
assert(isStream(xobj), 'XObject should be a stream');
var type = xobj.dict.get('Subtype');
assert(isName(type), 'XObject should have a Name subtype');
if ('Form' !== type.name) {
if (type.name !== 'Form') {
xobjsCache.key = name;
xobjsCache.texts = null;
break;
@ -28514,7 +28514,7 @@ var JpxImage = function JpxImageClosure() { @@ -28514,7 +28514,7 @@ var JpxImage = function JpxImageClosure() {
this.parseCodestream(data, position, position + dataLength);
break;
case 0x6A502020:
if (0x0d0a870a !== readUint32(data, position)) {
if (readUint32(data, position) !== 0x0d0a870a) {
warn('Invalid JP2 signature');
}
break;
@ -50629,7 +50629,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50629,7 +50629,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
cursor = 0;
state = 'no scheme';
continue;
} else if (EOF === c) {
} else if (c === EOF) {
break loop;
} else {
err('Code point not allowed in scheme: ' + c);
@ -50644,7 +50644,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50644,7 +50644,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
} else {
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._schemeData += percentEscape(c);
}
}
@ -50669,10 +50669,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50669,10 +50669,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'relative':
this._isRelative = true;
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._scheme = base._scheme;
}
if (EOF === c) {
if (c === EOF) {
this._host = base._host;
this._port = base._port;
this._path = base._path.slice();
@ -50705,7 +50705,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50705,7 +50705,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
} else {
var nextC = input[cursor + 1];
var nextNextC = input[cursor + 2];
if ('file' !== this._scheme || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC && '?' !== nextNextC && '#' !== nextNextC) {
if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -50728,7 +50728,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50728,7 +50728,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
state = 'authority ignore slashes';
}
} else {
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -50749,13 +50749,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50749,13 +50749,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'authority second slash':
state = 'authority ignore slashes';
if ('/' !== c) {
if (c !== '/') {
err('Expected \'/\', got: ' + c);
continue;
}
break;
case 'authority ignore slashes':
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
state = 'authority';
continue;
} else {
@ -50780,7 +50780,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50780,7 +50780,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
continue;
}
var tempC = percentEscape(cp);
if (null !== this._password) {
if (this._password !== null) {
this._password += tempC;
} else {
this._username += tempC;
@ -50831,7 +50831,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50831,7 +50831,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break loop;
}
continue;
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
if (c === '[') {
seenBracket = true;
} else if (c === ']') {
@ -50846,7 +50846,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50846,7 +50846,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (/[0-9]/.test(c)) {
buffer += c;
} else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) {
if ('' !== buffer) {
if (buffer !== '') {
var temp = parseInt(buffer, 10);
if (temp !== relative[this._scheme]) {
this._port = temp + '';
@ -50869,7 +50869,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50869,7 +50869,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
err('\'\\\' not allowed in path.');
}
state = 'relative path';
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
continue;
}
break;
@ -50884,12 +50884,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50884,12 +50884,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
}
if (buffer === '..') {
this._path.pop();
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
this._path.push('');
}
} else if (buffer === '.' && '/' !== c && '\\' !== c) {
} else if (buffer === '.' && c !== '/' && c !== '\\') {
this._path.push('');
} else if ('.' !== buffer) {
} else if (buffer !== '.') {
if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') {
buffer = buffer[0] + ':';
}
@ -50903,7 +50903,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50903,7 +50903,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
}
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
buffer += percentEscape(c);
}
break;
@ -50911,12 +50911,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50911,12 +50911,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (!stateOverride && c === '#') {
this._fragment = '#';
state = 'fragment';
} else if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._query += percentEscapeQuery(c);
}
break;
case 'fragment':
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._fragment += c;
}
break;
@ -50955,8 +50955,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -50955,8 +50955,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
return this._url;
}
var authority = '';
if ('' !== this._username || null !== this._password) {
authority = this._username + (null !== this._password ? ':' + this._password : '') + '@';
if (this._username !== '' || this._password !== null) {
authority = this._username + (this._password !== null ? ':' + this._password : '') + '@';
}
return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment;
},
@ -51075,8 +51075,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -51075,8 +51075,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
"use strict";
var pdfjsVersion = '1.7.368';
var pdfjsBuild = 'da326a31';
var pdfjsVersion = '1.7.370';
var pdfjsBuild = '3ff872b7';
var pdfjsCoreWorker = __w_pdfjs_require__(8);
{
__w_pdfjs_require__(19);

2
build/pdf.worker.min.js vendored

File diff suppressed because one or more lines are too long

2
lib/core/evaluator.js

@ -1299,7 +1299,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() { @@ -1299,7 +1299,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
assert(isStream(xobj), 'XObject should be a stream');
var type = xobj.dict.get('Subtype');
assert(isName(type), 'XObject should have a Name subtype');
if ('Form' !== type.name) {
if (type.name !== 'Form') {
xobjsCache.key = name;
xobjsCache.texts = null;
break;

2
lib/core/jpx.js

@ -83,7 +83,7 @@ var JpxImage = function JpxImageClosure() { @@ -83,7 +83,7 @@ var JpxImage = function JpxImageClosure() {
this.parseCodestream(data, position, position + dataLength);
break;
case 0x6A502020:
if (0x0d0a870a !== readUint32(data, position)) {
if (readUint32(data, position) !== 0x0d0a870a) {
warn('Invalid JP2 signature');
}
break;

4
lib/display/api.js

@ -1374,8 +1374,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -1374,8 +1374,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}
};
}();
exports.version = '1.7.368';
exports.build = 'da326a31';
exports.version = '1.7.370';
exports.build = '3ff872b7';
exports.getDocument = getDocument;
exports.PDFDataRangeTransport = PDFDataRangeTransport;
exports.PDFWorker = PDFWorker;

4
lib/display/global.js

@ -30,8 +30,8 @@ if (!globalScope.PDFJS) { @@ -30,8 +30,8 @@ if (!globalScope.PDFJS) {
globalScope.PDFJS = {};
}
var PDFJS = globalScope.PDFJS;
PDFJS.version = '1.7.368';
PDFJS.build = 'da326a31';
PDFJS.version = '1.7.370';
PDFJS.build = '3ff872b7';
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
sharedUtil.setVerbosityLevel(PDFJS.verbosity);

4
lib/pdf.js

@ -13,8 +13,8 @@ @@ -13,8 +13,8 @@
* limitations under the License.
*/
'use strict';
var pdfjsVersion = '1.7.368';
var pdfjsBuild = 'da326a31';
var pdfjsVersion = '1.7.370';
var pdfjsBuild = '3ff872b7';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -13,8 +13,8 @@ @@ -13,8 +13,8 @@
* limitations under the License.
*/
'use strict';
var pdfjsVersion = '1.7.368';
var pdfjsBuild = 'da326a31';
var pdfjsVersion = '1.7.370';
var pdfjsBuild = '3ff872b7';
var pdfjsCoreWorker = require('./core/worker.js');
{
require('./core/network.js');

40
lib/shared/compatibility.js

@ -986,7 +986,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -986,7 +986,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
cursor = 0;
state = 'no scheme';
continue;
} else if (EOF === c) {
} else if (c === EOF) {
break loop;
} else {
err('Code point not allowed in scheme: ' + c);
@ -1001,7 +1001,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1001,7 +1001,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
} else {
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._schemeData += percentEscape(c);
}
}
@ -1026,10 +1026,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1026,10 +1026,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'relative':
this._isRelative = true;
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._scheme = base._scheme;
}
if (EOF === c) {
if (c === EOF) {
this._host = base._host;
this._port = base._port;
this._path = base._path.slice();
@ -1062,7 +1062,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1062,7 +1062,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
} else {
var nextC = input[cursor + 1];
var nextNextC = input[cursor + 2];
if ('file' !== this._scheme || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC && '?' !== nextNextC && '#' !== nextNextC) {
if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -1085,7 +1085,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1085,7 +1085,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
state = 'authority ignore slashes';
}
} else {
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -1106,13 +1106,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1106,13 +1106,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'authority second slash':
state = 'authority ignore slashes';
if ('/' !== c) {
if (c !== '/') {
err('Expected \'/\', got: ' + c);
continue;
}
break;
case 'authority ignore slashes':
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
state = 'authority';
continue;
} else {
@ -1137,7 +1137,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1137,7 +1137,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
continue;
}
var tempC = percentEscape(cp);
if (null !== this._password) {
if (this._password !== null) {
this._password += tempC;
} else {
this._username += tempC;
@ -1188,7 +1188,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1188,7 +1188,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break loop;
}
continue;
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
if (c === '[') {
seenBracket = true;
} else if (c === ']') {
@ -1203,7 +1203,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1203,7 +1203,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (/[0-9]/.test(c)) {
buffer += c;
} else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) {
if ('' !== buffer) {
if (buffer !== '') {
var temp = parseInt(buffer, 10);
if (temp !== relative[this._scheme]) {
this._port = temp + '';
@ -1226,7 +1226,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1226,7 +1226,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
err('\'\\\' not allowed in path.');
}
state = 'relative path';
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
continue;
}
break;
@ -1241,12 +1241,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1241,12 +1241,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
}
if (buffer === '..') {
this._path.pop();
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
this._path.push('');
}
} else if (buffer === '.' && '/' !== c && '\\' !== c) {
} else if (buffer === '.' && c !== '/' && c !== '\\') {
this._path.push('');
} else if ('.' !== buffer) {
} else if (buffer !== '.') {
if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') {
buffer = buffer[0] + ':';
}
@ -1260,7 +1260,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1260,7 +1260,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
}
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
buffer += percentEscape(c);
}
break;
@ -1268,12 +1268,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1268,12 +1268,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (!stateOverride && c === '#') {
this._fragment = '#';
state = 'fragment';
} else if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._query += percentEscapeQuery(c);
}
break;
case 'fragment':
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._fragment += c;
}
break;
@ -1312,8 +1312,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1312,8 +1312,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
return this._url;
}
var authority = '';
if ('' !== this._username || null !== this._password) {
authority = this._username + (null !== this._password ? ':' + this._password : '') + '@';
if (this._username !== '' || this._password !== null) {
authority = this._username + (this._password !== null ? ':' + this._password : '') + '@';
}
return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment;
},

2
package.json

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

40
web/compatibility.js

@ -1070,7 +1070,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1070,7 +1070,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
cursor = 0;
state = 'no scheme';
continue;
} else if (EOF === c) {
} else if (c === EOF) {
break loop;
} else {
err('Code point not allowed in scheme: ' + c);
@ -1085,7 +1085,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1085,7 +1085,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
} else {
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._schemeData += percentEscape(c);
}
}
@ -1110,10 +1110,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1110,10 +1110,10 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'relative':
this._isRelative = true;
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._scheme = base._scheme;
}
if (EOF === c) {
if (c === EOF) {
this._host = base._host;
this._port = base._port;
this._path = base._path.slice();
@ -1146,7 +1146,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1146,7 +1146,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
} else {
var nextC = input[cursor + 1];
var nextNextC = input[cursor + 2];
if ('file' !== this._scheme || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC && '?' !== nextNextC && '#' !== nextNextC) {
if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -1169,7 +1169,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1169,7 +1169,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
state = 'authority ignore slashes';
}
} else {
if ('file' !== this._scheme) {
if (this._scheme !== 'file') {
this._host = base._host;
this._port = base._port;
this._username = base._username;
@ -1190,13 +1190,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1190,13 +1190,13 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break;
case 'authority second slash':
state = 'authority ignore slashes';
if ('/' !== c) {
if (c !== '/') {
err('Expected \'/\', got: ' + c);
continue;
}
break;
case 'authority ignore slashes':
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
state = 'authority';
continue;
} else {
@ -1221,7 +1221,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1221,7 +1221,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
continue;
}
var tempC = percentEscape(cp);
if (null !== this._password) {
if (this._password !== null) {
this._password += tempC;
} else {
this._username += tempC;
@ -1272,7 +1272,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1272,7 +1272,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
break loop;
}
continue;
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
if (c === '[') {
seenBracket = true;
} else if (c === ']') {
@ -1287,7 +1287,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1287,7 +1287,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (/[0-9]/.test(c)) {
buffer += c;
} else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) {
if ('' !== buffer) {
if (buffer !== '') {
var temp = parseInt(buffer, 10);
if (temp !== relative[this._scheme]) {
this._port = temp + '';
@ -1310,7 +1310,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1310,7 +1310,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
err('\'\\\' not allowed in path.');
}
state = 'relative path';
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
continue;
}
break;
@ -1325,12 +1325,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1325,12 +1325,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
}
if (buffer === '..') {
this._path.pop();
if ('/' !== c && '\\' !== c) {
if (c !== '/' && c !== '\\') {
this._path.push('');
}
} else if (buffer === '.' && '/' !== c && '\\' !== c) {
} else if (buffer === '.' && c !== '/' && c !== '\\') {
this._path.push('');
} else if ('.' !== buffer) {
} else if (buffer !== '.') {
if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') {
buffer = buffer[0] + ':';
}
@ -1344,7 +1344,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1344,7 +1344,7 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
this._fragment = '#';
state = 'fragment';
}
} else if ('\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== '\t' && c !== '\n' && c !== '\r') {
buffer += percentEscape(c);
}
break;
@ -1352,12 +1352,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1352,12 +1352,12 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
if (!stateOverride && c === '#') {
this._fragment = '#';
state = 'fragment';
} else if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
} else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._query += percentEscapeQuery(c);
}
break;
case 'fragment':
if (EOF !== c && '\t' !== c && '\n' !== c && '\r' !== c) {
if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
this._fragment += c;
}
break;
@ -1396,8 +1396,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) { @@ -1396,8 +1396,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
return this._url;
}
var authority = '';
if ('' !== this._username || null !== this._password) {
authority = this._username + (null !== this._password ? ':' + this._password : '') + '@';
if (this._username !== '' || this._password !== null) {
authority = this._username + (this._password !== null ? ':' + this._password : '') + '@';
}
return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment;
},

Loading…
Cancel
Save