Merge pull request #708 from kkujala/master

Fix js strict warning in worker.js.
This commit is contained in:
vingtetun 2011-10-27 12:32:35 -07:00
commit 21a6467b23
18 changed files with 31 additions and 7 deletions

View File

@ -1,8 +1,11 @@
// <canvas> contexts store most of the state we need natively. /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
// However, PDF needs a bit more state, which we store here. /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
'use strict'; 'use strict';
// <canvas> contexts store most of the state we need natively.
// However, PDF needs a bit more state, which we store here.
var CanvasExtraState = (function canvasExtraState() { var CanvasExtraState = (function canvasExtraState() {
function constructor(old) { function constructor(old) {
// Are soft masks and alpha values shapes or opacities? // Are soft masks and alpha values shapes or opacities?
@ -838,3 +841,4 @@ var CanvasGraphics = (function canvasGraphics() {
return constructor; return constructor;
})(); })();

View File

@ -6930,3 +6930,4 @@ var CIDToUnicodeMaps = {
{f: 39, c: 19576}, {f: 111, c: 19620}, {f: 148, c: 19738}, {f: 39, c: 19576}, {f: 111, c: 19620}, {f: 148, c: 19738},
{f: 7, c: 19887}] {f: 7, c: 19887}]
}; };

View File

@ -397,5 +397,7 @@ var DeviceCmykCS = (function deviceCmykCS() {
return rgbBuf; return rgbBuf;
} }
}; };
return constructor; return constructor;
})(); })();

View File

@ -608,4 +608,6 @@ var PDFDoc = (function() {
return constructor; return constructor;
})(); })();
globalScope.PDFJS.PDFDoc = PDFDoc; globalScope.PDFJS.PDFDoc = PDFDoc;

View File

@ -595,3 +595,4 @@ var CipherTransformFactory = (function cipherTransformFactory() {
return constructor; return constructor;
})(); })();

View File

@ -918,3 +918,4 @@ var EvalState = (function evalState() {
}; };
return constructor; return constructor;
})(); })();

View File

@ -3272,3 +3272,4 @@ var Type2CFF = (function type2CFF() {
return constructor; return constructor;
})(); })();

View File

@ -304,3 +304,4 @@ var PDFFunction = (function() {
} }
}; };
})(); })();

View File

@ -254,3 +254,4 @@ var JpegImage = (function() {
return JpegImage; return JpegImage;
})(); })();

View File

@ -2941,3 +2941,4 @@ var Metrics = {
'a191': 918 'a191': 918
} }
}; };

View File

@ -739,3 +739,4 @@ var PDFObjects = (function() {
}; };
return PDFObjects; return PDFObjects;
})(); })();

View File

@ -633,3 +633,4 @@ var Linearization = (function linearizationLinearization() {
return constructor; return constructor;
})(); })();

View File

@ -287,3 +287,4 @@ var TilingPattern = (function tilingPattern() {
return TilingPattern; return TilingPattern;
})(); })();

View File

@ -12,3 +12,4 @@ var PDFJS = {};
/* PDFJSSCRIPT_INCLUDE_ALL */ /* PDFJSSCRIPT_INCLUDE_ALL */
})(); })();

View File

@ -2073,3 +2073,4 @@ var LZWStream = (function lzwStream() {
return constructor; return constructor;
})(); })();

View File

@ -281,5 +281,7 @@ var Promise = (function() {
} }
} }
}; };
return Promise; return Promise;
})(); })();

View File

@ -122,11 +122,11 @@ var WorkerProcessorHandler = {
var obj = new Font(font.name, font.file, font.properties); var obj = new Font(font.name, font.file, font.properties);
var str = ''; var str = '';
var data = obj.data; var objData = obj.data;
if (data) { if (objData) {
var length = data.length; var length = objData.length;
for (var j = 0; j < length; j++) for (var j = 0; j < length; ++j)
str += String.fromCharCode(data[j]); str += String.fromCharCode(objData[j]);
} }
obj.str = str; obj.str = str;
@ -180,3 +180,4 @@ if (typeof window === 'undefined') {
var handler = new MessageHandler('worker_processor', globalScope); var handler = new MessageHandler('worker_processor', globalScope);
WorkerProcessorHandler.setup(handler); WorkerProcessorHandler.setup(handler);
} }

View File

@ -21,3 +21,4 @@ importScripts('../src/parser.js');
importScripts('../src/pattern.js'); importScripts('../src/pattern.js');
importScripts('../src/stream.js'); importScripts('../src/stream.js');
importScripts('../src/worker.js'); importScripts('../src/worker.js');