Browse Source

PDF.js version 1.0.437

master v1.0.437
Yury Delendik 11 years ago
parent
commit
49c0898f83
  1. 2
      bower.json
  2. 4
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 4
      build/pdf.worker.js
  5. 2
      package.json
  6. 23
      web/compatibility.js

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.435", "version": "1.0.437",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",
"pdf", "pdf",

4
build/pdf.combined.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.435'; PDFJS.version = '1.0.437';
PDFJS.build = 'cd79ac8'; PDFJS.build = 'b482393';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

4
build/pdf.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.435'; PDFJS.version = '1.0.437';
PDFJS.build = 'cd79ac8'; PDFJS.build = 'b482393';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

4
build/pdf.worker.js vendored

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.435'; PDFJS.version = '1.0.437';
PDFJS.build = 'cd79ac8'; PDFJS.build = 'b482393';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.435", "version": "1.0.437",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",

23
web/compatibility.js

@ -481,9 +481,9 @@ if (typeof PDFJS === 'undefined') {
} }
})(); })();
// TODO CanvasPixelArray is deprecated; use Uint8ClampedArray // Support: IE<11, Chrome<21
// once it's supported.
(function checkSetPresenceInImageData() { (function checkSetPresenceInImageData() {
// IE < 11 will use window.CanvasPixelArray which lacks set function.
if (window.CanvasPixelArray) { if (window.CanvasPixelArray) {
if (typeof window.CanvasPixelArray.prototype.set !== 'function') { if (typeof window.CanvasPixelArray.prototype.set !== 'function') {
window.CanvasPixelArray.prototype.set = function(arr) { window.CanvasPixelArray.prototype.set = function(arr) {
@ -492,6 +492,25 @@ if (typeof PDFJS === 'undefined') {
} }
}; };
} }
} else {
// Chrome < 21 uses an inaccessible CanvasPixelArray prototype.
// Because we cannot feature detect it, we rely on user agent.
if (navigator.userAgent.indexOf('Chrom') >= 0) {
var versionMatch = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
if (versionMatch && parseInt(versionMatch[2]) < 21) {
var contextPrototype = window.CanvasRenderingContext2D.prototype;
contextPrototype._createImageData = contextPrototype.createImageData;
contextPrototype.createImageData = function(w, h) {
var imageData = this._createImageData(w, h);
imageData.data.set = function(arr) {
for (var i = 0, ii = this.length; i < ii; i++) {
this[i] = arr[i];
}
};
return imageData;
};
}
}
} }
})(); })();

Loading…
Cancel
Save