From 7c65239bdf221b45088ca919c2259ce24afa5557 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:30:31 -0500 Subject: [PATCH] PDF.js version 1.0.551 --- bower.json | 2 +- build/pdf.combined.js | 79 ++++++++++++++++++++++--------------------- build/pdf.js | 4 +-- build/pdf.worker.js | 79 ++++++++++++++++++++++--------------------- package.json | 2 +- 5 files changed, 84 insertions(+), 82 deletions(-) diff --git a/bower.json b/bower.json index 7389b76a5..690739c51 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.544", + "version": "1.0.551", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 40a66f9be..62ac0c9cd 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.544'; -PDFJS.build = 'df0b821'; +PDFJS.version = '1.0.551'; +PDFJS.build = '00eea3d'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -7678,7 +7678,7 @@ var PDFDocument = (function PDFDocumentClosure() { var str = strBuf.join(''); stream.pos = pos; var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle); - if (index == -1) { + if (index === -1) { return false; /* not found */ } stream.pos += index; @@ -9900,7 +9900,7 @@ var WidgetAnnotation = (function WidgetAnnotationClosure() { var j, jj; for (j = 0, jj = kids.length; j < jj; j++) { var kidRef = kids[j]; - if (kidRef.num == ref.num && kidRef.gen == ref.gen) { + if (kidRef.num === ref.num && kidRef.gen === ref.gen) { break; } } @@ -10861,7 +10861,7 @@ var ColorSpace = (function ColorSpaceClosure() { var count = originalWidth * originalHeight; var rgbBuf = null; var numComponentColors = 1 << bpc; - var needsResizing = originalHeight != height || originalWidth != width; + var needsResizing = originalHeight !== height || originalWidth !== width; var i, ii; if (this.isPassthrough(bpc)) { @@ -11054,11 +11054,11 @@ var ColorSpace = (function ColorSpaceClosure() { var stream = xref.fetchIfRef(cs[1]); var dict = stream.dict; numComps = dict.get('N'); - if (numComps == 1) { + if (numComps === 1) { return 'DeviceGrayCS'; - } else if (numComps == 3) { + } else if (numComps === 3) { return 'DeviceRgbCS'; - } else if (numComps == 4) { + } else if (numComps === 4) { return 'DeviceCmykCS'; } break; @@ -11119,7 +11119,7 @@ var ColorSpace = (function ColorSpaceClosure() { return true; } for (var i = 0, ii = decode.length; i < ii; i += 2) { - if (decode[i] !== 0 || decode[i + 1] != 1) { + if (decode[i] !== 0 || decode[i + 1] !== 1) { return false; } } @@ -11384,7 +11384,7 @@ var DeviceRgbCS = (function DeviceRgbCSClosure() { return (inputLength * (3 + alpha01) / 3) | 0; }, isPassthrough: function DeviceRgbCS_isPassthrough(bits) { - return bits == 8; + return bits === 8; }, fillRgb: ColorSpace.prototype.fillRgb, isDefaultDecode: function DeviceRgbCS_isDefaultDecode(decodeMap) { @@ -15940,7 +15940,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { firstWidth = glyphWidth; continue; } - if (firstWidth != glyphWidth) { + if (firstWidth !== glyphWidth) { isMonospace = false; break; } @@ -37404,7 +37404,7 @@ var ArithmeticDecoder = (function ArithmeticDecoderClosure() { byteIn: function ArithmeticDecoder_byteIn() { var data = this.data; var bp = this.bp; - if (data[bp] == 0xFF) { + if (data[bp] === 0xFF) { var b1 = data[bp + 1]; if (b1 > 0x8F) { this.clow += 0xFF00; @@ -41479,7 +41479,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { function findUnequal(arr, start, value) { for (var j = start, jj = arr.length; j < jj; ++j) { - if (arr[j] != value) { + if (arr[j] !== value) { return j; } } @@ -41539,7 +41539,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { } else if (0x0700 <= charCode && charCode <= 0x08AC) { charType = 'AL'; } - if (charType == 'R' || charType == 'AL' || charType == 'AN') { + if (charType === 'R' || charType === 'AL' || charType === 'AN') { numBidi++; } types[i] = charType; @@ -41554,7 +41554,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { return createBidiText(str, isLTR); } - if (startLevel == -1) { + if (startLevel === -1) { if ((strLength / numBidi) < 0.3) { isLTR = true; startLevel = 0; @@ -41583,7 +41583,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { */ var lastType = sor; for (i = 0; i < strLength; ++i) { - if (types[i] == 'NSM') { + if (types[i] === 'NSM') { types[i] = lastType; } else { lastType = types[i]; @@ -41599,9 +41599,9 @@ var bidi = PDFJS.bidi = (function bidiClosure() { var t; for (i = 0; i < strLength; ++i) { t = types[i]; - if (t == 'EN') { - types[i] = (lastType == 'AL') ? 'AN' : 'EN'; - } else if (t == 'R' || t == 'L' || t == 'AL') { + if (t === 'EN') { + types[i] = (lastType === 'AL') ? 'AN' : 'EN'; + } else if (t === 'R' || t === 'L' || t === 'AL') { lastType = t; } } @@ -41611,7 +41611,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { */ for (i = 0; i < strLength; ++i) { t = types[i]; - if (t == 'AL') { + if (t === 'AL') { types[i] = 'R'; } } @@ -41622,11 +41622,12 @@ var bidi = PDFJS.bidi = (function bidiClosure() { type changes to that type: */ for (i = 1; i < strLength - 1; ++i) { - if (types[i] == 'ES' && types[i - 1] == 'EN' && types[i + 1] == 'EN') { + if (types[i] === 'ES' && types[i - 1] === 'EN' && types[i + 1] === 'EN') { types[i] = 'EN'; } - if (types[i] == 'CS' && (types[i - 1] == 'EN' || types[i - 1] == 'AN') && - types[i + 1] == types[i - 1]) { + if (types[i] === 'CS' && + (types[i - 1] === 'EN' || types[i - 1] === 'AN') && + types[i + 1] === types[i - 1]) { types[i] = types[i - 1]; } } @@ -41636,18 +41637,18 @@ var bidi = PDFJS.bidi = (function bidiClosure() { to all European numbers: */ for (i = 0; i < strLength; ++i) { - if (types[i] == 'EN') { + if (types[i] === 'EN') { // do before var j; for (j = i - 1; j >= 0; --j) { - if (types[j] != 'ET') { + if (types[j] !== 'ET') { break; } types[j] = 'EN'; } // do after for (j = i + 1; j < strLength; --j) { - if (types[j] != 'ET') { + if (types[j] !== 'ET') { break; } types[j] = 'EN'; @@ -41660,7 +41661,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { */ for (i = 0; i < strLength; ++i) { t = types[i]; - if (t == 'WS' || t == 'ES' || t == 'ET' || t == 'CS') { + if (t === 'WS' || t === 'ES' || t === 'ET' || t === 'CS') { types[i] = 'ON'; } } @@ -41673,9 +41674,9 @@ var bidi = PDFJS.bidi = (function bidiClosure() { lastType = sor; for (i = 0; i < strLength; ++i) { t = types[i]; - if (t == 'EN') { - types[i] = ((lastType == 'L') ? 'L' : 'EN'); - } else if (t == 'R' || t == 'L') { + if (t === 'EN') { + types[i] = ((lastType === 'L') ? 'L' : 'EN'); + } else if (t === 'R' || t === 'L') { lastType = t; } } @@ -41687,7 +41688,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { end-of-level-run (eor) are used at level run boundaries. */ for (i = 0; i < strLength; ++i) { - if (types[i] == 'ON') { + if (types[i] === 'ON') { var end = findUnequal(types, i + 1, 'ON'); var before = sor; if (i > 0) { @@ -41698,13 +41699,13 @@ var bidi = PDFJS.bidi = (function bidiClosure() { if (end + 1 < strLength) { after = types[end + 1]; } - if (before != 'L') { + if (before !== 'L') { before = 'R'; } - if (after != 'L') { + if (after !== 'L') { after = 'R'; } - if (before == after) { + if (before === after) { setValues(types, i, end, before); } i = end - 1; // reset to end (-1 so next iteration is ok) @@ -41715,7 +41716,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { N2. Any remaining neutrals take the embedding direction. */ for (i = 0; i < strLength; ++i) { - if (types[i] == 'ON') { + if (types[i] === 'ON') { types[i] = e; } } @@ -41730,13 +41731,13 @@ var bidi = PDFJS.bidi = (function bidiClosure() { for (i = 0; i < strLength; ++i) { t = types[i]; if (isEven(levels[i])) { - if (t == 'R') { + if (t === 'R') { levels[i] += 1; - } else if (t == 'AN' || t == 'EN') { + } else if (t === 'AN' || t === 'EN') { levels[i] += 2; } } else { // isOdd - if (t == 'L' || t == 'AN' || t == 'EN') { + if (t === 'L' || t === 'AN' || t === 'EN') { levels[i] += 1; } } @@ -41815,7 +41816,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { var result = ''; for (i = 0, ii = chars.length; i < ii; ++i) { var ch = chars[i]; - if (ch != '<' && ch != '>') { + if (ch !== '<' && ch !== '>') { result += ch; } } diff --git a/build/pdf.js b/build/pdf.js index f34bb2e77..4060d9cfe 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.544'; -PDFJS.build = 'df0b821'; +PDFJS.version = '1.0.551'; +PDFJS.build = '00eea3d'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 209f80687..b23bd49ab 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.544'; -PDFJS.build = 'df0b821'; +PDFJS.version = '1.0.551'; +PDFJS.build = '00eea3d'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -2821,7 +2821,7 @@ var PDFDocument = (function PDFDocumentClosure() { var str = strBuf.join(''); stream.pos = pos; var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle); - if (index == -1) { + if (index === -1) { return false; /* not found */ } stream.pos += index; @@ -5043,7 +5043,7 @@ var WidgetAnnotation = (function WidgetAnnotationClosure() { var j, jj; for (j = 0, jj = kids.length; j < jj; j++) { var kidRef = kids[j]; - if (kidRef.num == ref.num && kidRef.gen == ref.gen) { + if (kidRef.num === ref.num && kidRef.gen === ref.gen) { break; } } @@ -6004,7 +6004,7 @@ var ColorSpace = (function ColorSpaceClosure() { var count = originalWidth * originalHeight; var rgbBuf = null; var numComponentColors = 1 << bpc; - var needsResizing = originalHeight != height || originalWidth != width; + var needsResizing = originalHeight !== height || originalWidth !== width; var i, ii; if (this.isPassthrough(bpc)) { @@ -6197,11 +6197,11 @@ var ColorSpace = (function ColorSpaceClosure() { var stream = xref.fetchIfRef(cs[1]); var dict = stream.dict; numComps = dict.get('N'); - if (numComps == 1) { + if (numComps === 1) { return 'DeviceGrayCS'; - } else if (numComps == 3) { + } else if (numComps === 3) { return 'DeviceRgbCS'; - } else if (numComps == 4) { + } else if (numComps === 4) { return 'DeviceCmykCS'; } break; @@ -6262,7 +6262,7 @@ var ColorSpace = (function ColorSpaceClosure() { return true; } for (var i = 0, ii = decode.length; i < ii; i += 2) { - if (decode[i] !== 0 || decode[i + 1] != 1) { + if (decode[i] !== 0 || decode[i + 1] !== 1) { return false; } } @@ -6527,7 +6527,7 @@ var DeviceRgbCS = (function DeviceRgbCSClosure() { return (inputLength * (3 + alpha01) / 3) | 0; }, isPassthrough: function DeviceRgbCS_isPassthrough(bits) { - return bits == 8; + return bits === 8; }, fillRgb: ColorSpace.prototype.fillRgb, isDefaultDecode: function DeviceRgbCS_isDefaultDecode(decodeMap) { @@ -11083,7 +11083,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { firstWidth = glyphWidth; continue; } - if (firstWidth != glyphWidth) { + if (firstWidth !== glyphWidth) { isMonospace = false; break; } @@ -32547,7 +32547,7 @@ var ArithmeticDecoder = (function ArithmeticDecoderClosure() { byteIn: function ArithmeticDecoder_byteIn() { var data = this.data; var bp = this.bp; - if (data[bp] == 0xFF) { + if (data[bp] === 0xFF) { var b1 = data[bp + 1]; if (b1 > 0x8F) { this.clow += 0xFF00; @@ -36622,7 +36622,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { function findUnequal(arr, start, value) { for (var j = start, jj = arr.length; j < jj; ++j) { - if (arr[j] != value) { + if (arr[j] !== value) { return j; } } @@ -36682,7 +36682,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { } else if (0x0700 <= charCode && charCode <= 0x08AC) { charType = 'AL'; } - if (charType == 'R' || charType == 'AL' || charType == 'AN') { + if (charType === 'R' || charType === 'AL' || charType === 'AN') { numBidi++; } types[i] = charType; @@ -36697,7 +36697,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { return createBidiText(str, isLTR); } - if (startLevel == -1) { + if (startLevel === -1) { if ((strLength / numBidi) < 0.3) { isLTR = true; startLevel = 0; @@ -36726,7 +36726,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { */ var lastType = sor; for (i = 0; i < strLength; ++i) { - if (types[i] == 'NSM') { + if (types[i] === 'NSM') { types[i] = lastType; } else { lastType = types[i]; @@ -36742,9 +36742,9 @@ var bidi = PDFJS.bidi = (function bidiClosure() { var t; for (i = 0; i < strLength; ++i) { t = types[i]; - if (t == 'EN') { - types[i] = (lastType == 'AL') ? 'AN' : 'EN'; - } else if (t == 'R' || t == 'L' || t == 'AL') { + if (t === 'EN') { + types[i] = (lastType === 'AL') ? 'AN' : 'EN'; + } else if (t === 'R' || t === 'L' || t === 'AL') { lastType = t; } } @@ -36754,7 +36754,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { */ for (i = 0; i < strLength; ++i) { t = types[i]; - if (t == 'AL') { + if (t === 'AL') { types[i] = 'R'; } } @@ -36765,11 +36765,12 @@ var bidi = PDFJS.bidi = (function bidiClosure() { type changes to that type: */ for (i = 1; i < strLength - 1; ++i) { - if (types[i] == 'ES' && types[i - 1] == 'EN' && types[i + 1] == 'EN') { + if (types[i] === 'ES' && types[i - 1] === 'EN' && types[i + 1] === 'EN') { types[i] = 'EN'; } - if (types[i] == 'CS' && (types[i - 1] == 'EN' || types[i - 1] == 'AN') && - types[i + 1] == types[i - 1]) { + if (types[i] === 'CS' && + (types[i - 1] === 'EN' || types[i - 1] === 'AN') && + types[i + 1] === types[i - 1]) { types[i] = types[i - 1]; } } @@ -36779,18 +36780,18 @@ var bidi = PDFJS.bidi = (function bidiClosure() { to all European numbers: */ for (i = 0; i < strLength; ++i) { - if (types[i] == 'EN') { + if (types[i] === 'EN') { // do before var j; for (j = i - 1; j >= 0; --j) { - if (types[j] != 'ET') { + if (types[j] !== 'ET') { break; } types[j] = 'EN'; } // do after for (j = i + 1; j < strLength; --j) { - if (types[j] != 'ET') { + if (types[j] !== 'ET') { break; } types[j] = 'EN'; @@ -36803,7 +36804,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { */ for (i = 0; i < strLength; ++i) { t = types[i]; - if (t == 'WS' || t == 'ES' || t == 'ET' || t == 'CS') { + if (t === 'WS' || t === 'ES' || t === 'ET' || t === 'CS') { types[i] = 'ON'; } } @@ -36816,9 +36817,9 @@ var bidi = PDFJS.bidi = (function bidiClosure() { lastType = sor; for (i = 0; i < strLength; ++i) { t = types[i]; - if (t == 'EN') { - types[i] = ((lastType == 'L') ? 'L' : 'EN'); - } else if (t == 'R' || t == 'L') { + if (t === 'EN') { + types[i] = ((lastType === 'L') ? 'L' : 'EN'); + } else if (t === 'R' || t === 'L') { lastType = t; } } @@ -36830,7 +36831,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { end-of-level-run (eor) are used at level run boundaries. */ for (i = 0; i < strLength; ++i) { - if (types[i] == 'ON') { + if (types[i] === 'ON') { var end = findUnequal(types, i + 1, 'ON'); var before = sor; if (i > 0) { @@ -36841,13 +36842,13 @@ var bidi = PDFJS.bidi = (function bidiClosure() { if (end + 1 < strLength) { after = types[end + 1]; } - if (before != 'L') { + if (before !== 'L') { before = 'R'; } - if (after != 'L') { + if (after !== 'L') { after = 'R'; } - if (before == after) { + if (before === after) { setValues(types, i, end, before); } i = end - 1; // reset to end (-1 so next iteration is ok) @@ -36858,7 +36859,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { N2. Any remaining neutrals take the embedding direction. */ for (i = 0; i < strLength; ++i) { - if (types[i] == 'ON') { + if (types[i] === 'ON') { types[i] = e; } } @@ -36873,13 +36874,13 @@ var bidi = PDFJS.bidi = (function bidiClosure() { for (i = 0; i < strLength; ++i) { t = types[i]; if (isEven(levels[i])) { - if (t == 'R') { + if (t === 'R') { levels[i] += 1; - } else if (t == 'AN' || t == 'EN') { + } else if (t === 'AN' || t === 'EN') { levels[i] += 2; } } else { // isOdd - if (t == 'L' || t == 'AN' || t == 'EN') { + if (t === 'L' || t === 'AN' || t === 'EN') { levels[i] += 1; } } @@ -36958,7 +36959,7 @@ var bidi = PDFJS.bidi = (function bidiClosure() { var result = ''; for (i = 0, ii = chars.length; i < ii; ++i) { var ch = chars[i]; - if (ch != '<' && ch != '>') { + if (ch !== '<' && ch !== '>') { result += ch; } } diff --git a/package.json b/package.json index 9f36016e6..178f0f8ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.544", + "version": "1.0.551", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",