1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #5059 from timvandermeij/unused-code

Removing unused code and enforcing additional JSHint options
This commit is contained in:
Yury Delendik 2014-07-29 15:04:43 -05:00
commit 7026543663
15 changed files with 37 additions and 89 deletions

View file

@ -100,7 +100,7 @@ var AnnotationUtils = (function AnnotationUtilsClosure() {
return element;
}
function getHtmlElementForTextAnnotation(item, commonObjs) {
function getHtmlElementForTextAnnotation(item) {
var rect = item.rect;
// sanity check because of OOo-generated PDFs
@ -217,8 +217,7 @@ var AnnotationUtils = (function AnnotationUtilsClosure() {
return container;
}
function getHtmlElementForLinkAnnotation(item, commonObjs) {
function getHtmlElementForLinkAnnotation(item) {
var container = initContainer(item);
container.className = 'annotLink';
@ -238,9 +237,9 @@ var AnnotationUtils = (function AnnotationUtilsClosure() {
case AnnotationType.WIDGET:
return getHtmlElementForTextWidgetAnnotation(data, objs);
case AnnotationType.TEXT:
return getHtmlElementForTextAnnotation(data, objs);
return getHtmlElementForTextAnnotation(data);
case AnnotationType.LINK:
return getHtmlElementForLinkAnnotation(data, objs);
return getHtmlElementForLinkAnnotation(data);
default:
throw new Error('Unsupported annotationType: ' + data.annotationType);
}

View file

@ -16,7 +16,7 @@
*/
/* globals error, PDFJS, assert, info, shadow, TextRenderingMode,
FONT_IDENTITY_MATRIX, Uint32ArrayView, IDENTITY_MATRIX, ImageData,
ImageKind, isArray, isNum, TilingPattern, OPS, Promise, Util, warn,
ImageKind, isArray, isNum, TilingPattern, OPS, Util, warn,
getShadingPatternFromIR, WebGLUtils */
'use strict';

View file

@ -15,6 +15,7 @@
* limitations under the License.
*/
/*jshint globalstrict: false */
/* globals PDFJS */
// Initializing PDFJS global object (if still undefined)
if (typeof PDFJS === 'undefined') {

View file

@ -384,7 +384,7 @@ var Type2Parser = function type2Parser(aFilePath) {
error('Need to support CFFExpertSubsetCharset');
} else {
aStream.pos = charsetEntry;
var charset = readCharset(aStream, charStrings);
readCharset(aStream, charStrings);
}
};
};