Browse Source

Merge pull request #6765 from timvandermeij/unused

Remove unused variables
Yury Delendik 9 years ago
parent
commit
65de3d6268
  1. 1
      external/builder/test.js
  2. 3
      external/umdutils/verifier.js
  3. 9
      make.js
  4. 2
      src/core/annotation.js
  5. 2
      src/core/function.js
  6. 2
      src/core/jbig2.js
  7. 7
      src/core/jpg.js
  8. 2
      src/core/jpx.js
  9. 10
      src/display/canvas.js
  10. 2
      src/shared/global.js
  11. 1
      web/overlay_manager.js
  12. 2
      web/pdf_document_properties.js
  13. 1
      web/view_history.js
  14. 2
      web/viewer.js

1
external/builder/test.js vendored

@ -6,7 +6,6 @@ require('shelljs/make');
var builder = require('./builder'); var builder = require('./builder');
var fs = require('fs'); var fs = require('fs');
var path = require('path');
var errors = 0; var errors = 0;

3
external/umdutils/verifier.js vendored

@ -418,7 +418,8 @@ function validateDependencies(context) {
if (!(i in nonRoots)) { if (!(i in nonRoots)) {
context.infoCallback('Root module: ' + i); context.infoCallback('Root module: ' + i);
} }
}} }
}
/** /**
* Validates all modules/files in the specified path. The modules must be * Validates all modules/files in the specified path. The modules must be

9
make.js

@ -446,7 +446,7 @@ target.locale = function() {
// Compresses cmap files. Ensure that Adobe cmap download and uncompressed at // Compresses cmap files. Ensure that Adobe cmap download and uncompressed at
// ./external/cmaps location. // ./external/cmaps location.
// //
target.cmaps = function (args) { target.cmaps = function () {
var CMAP_INPUT = 'external/cmaps'; var CMAP_INPUT = 'external/cmaps';
var VIEWER_CMAP_OUTPUT = 'external/bcmaps'; var VIEWER_CMAP_OUTPUT = 'external/bcmaps';
@ -607,7 +607,7 @@ target.singlefile = function() {
}; };
function stripCommentHeaders(content, filename) { function stripCommentHeaders(content) {
var notEndOfComment = '(?:[^*]|\\*(?!/))+'; var notEndOfComment = '(?:[^*]|\\*(?!/))+';
var reg = new RegExp( var reg = new RegExp(
'\n/\\* Copyright' + notEndOfComment + '\\*/\\s*' + '\n/\\* Copyright' + notEndOfComment + '\\*/\\s*' +
@ -628,7 +628,7 @@ function stripUMDHeaders(content) {
function cleanupJSSource(file) { function cleanupJSSource(file) {
var content = cat(file); var content = cat(file);
content = stripCommentHeaders(content, file); content = stripCommentHeaders(content);
content.to(file); content.to(file);
} }
@ -1295,8 +1295,7 @@ target.botmakeref = function() {
echo(); echo();
echo('### Creating reference images'); echo('### Creating reference images');
var PDF_TEST = env['PDF_TEST'] || 'test_manifest.json', var PDF_BROWSERS = env['PDF_BROWSERS'] ||
PDF_BROWSERS = env['PDF_BROWSERS'] ||
'resources/browser_manifests/browser_manifest.json'; 'resources/browser_manifests/browser_manifest.json';
if (!test('-f', 'test/' + PDF_BROWSERS)) { if (!test('-f', 'test/' + PDF_BROWSERS)) {

2
src/core/annotation.js

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals PDFJS */
'use strict'; 'use strict';
@ -46,7 +45,6 @@ var stringToPDFString = sharedUtil.stringToPDFString;
var stringToUTF8String = sharedUtil.stringToUTF8String; var stringToUTF8String = sharedUtil.stringToUTF8String;
var warn = sharedUtil.warn; var warn = sharedUtil.warn;
var Dict = corePrimitives.Dict; var Dict = corePrimitives.Dict;
var Name = corePrimitives.Name;
var isDict = corePrimitives.isDict; var isDict = corePrimitives.isDict;
var isName = corePrimitives.isName; var isName = corePrimitives.isName;
var Stream = coreStream.Stream; var Stream = coreStream.Stream;

2
src/core/function.js

@ -987,7 +987,7 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
var instructions = []; var instructions = [];
var inputSize = domain.length >> 1, outputSize = range.length >> 1; var inputSize = domain.length >> 1, outputSize = range.length >> 1;
var lastRegister = 0; var lastRegister = 0;
var n, j, min, max; var n, j;
var num1, num2, ast1, ast2, tmpVar, item; var num1, num2, ast1, ast2, tmpVar, item;
for (i = 0; i < inputSize; i++) { for (i = 0; i < inputSize; i++) {
stack.push(new AstArgument(i, domain[i * 2], domain[i * 2 + 1])); stack.push(new AstArgument(i, domain[i * 2], domain[i * 2 + 1]));

2
src/core/jbig2.js

@ -889,7 +889,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
delete pageInfo.height; delete pageInfo.height;
} }
var pageSegmentFlags = data[position + 16]; var pageSegmentFlags = data[position + 16];
var pageStripingInformatiom = readUint16(data, position + 17); var pageStripingInformation = readUint16(data, position + 17);
pageInfo.lossless = !!(pageSegmentFlags & 1); pageInfo.lossless = !!(pageSegmentFlags & 1);
pageInfo.refinement = !!(pageSegmentFlags & 2); pageInfo.refinement = !!(pageSegmentFlags & 2);
pageInfo.defaultPixelValue = (pageSegmentFlags >> 2) & 1; pageInfo.defaultPixelValue = (pageSegmentFlags >> 2) & 1;

7
src/core/jpg.js

@ -109,12 +109,8 @@ var JpegImage = (function jpegImage() {
function decodeScan(data, offset, frame, components, resetInterval, function decodeScan(data, offset, frame, components, resetInterval,
spectralStart, spectralEnd, successivePrev, successive) { spectralStart, spectralEnd, successivePrev, successive) {
var precision = frame.precision;
var samplesPerLine = frame.samplesPerLine;
var scanLines = frame.scanLines;
var mcusPerLine = frame.mcusPerLine; var mcusPerLine = frame.mcusPerLine;
var progressive = frame.progressive; var progressive = frame.progressive;
var maxH = frame.maxH, maxV = frame.maxV;
var startOffset = offset, bitsData = 0, bitsCount = 0; var startOffset = offset, bitsData = 0, bitsCount = 0;
@ -622,10 +618,9 @@ var JpegImage = (function jpegImage() {
frame.mcusPerColumn = mcusPerColumn; frame.mcusPerColumn = mcusPerColumn;
} }
var offset = 0, length = data.length; var offset = 0;
var jfif = null; var jfif = null;
var adobe = null; var adobe = null;
var pixels = null;
var frame, resetInterval; var frame, resetInterval;
var quantizationTables = []; var quantizationTables = [];
var huffmanTablesAC = [], huffmanTablesDC = []; var huffmanTablesAC = [], huffmanTablesDC = [];

2
src/core/jpx.js

@ -85,8 +85,6 @@ var JpxImage = (function JpxImageClosure() {
case 0x636F6C72: // 'colr' case 0x636F6C72: // 'colr'
// Colorspaces are not used, the CS from the PDF is used. // Colorspaces are not used, the CS from the PDF is used.
var method = data[position]; var method = data[position];
var precedence = data[position + 1];
var approximation = data[position + 2];
if (method === 1) { if (method === 1) {
// enumerated colorspace // enumerated colorspace
var colorspace = readUint32(data, position + 3); var colorspace = readUint32(data, position + 3);

10
src/display/canvas.js

@ -2201,11 +2201,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
return this.cachedGetSinglePixelWidth; return this.cachedGetSinglePixelWidth;
}, },
getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) { getCanvasPosition: function CanvasGraphics_getCanvasPosition(x, y) {
var transform = this.ctx.mozCurrentTransform; var transform = this.ctx.mozCurrentTransform;
return [ return [
transform[0] * x + transform[2] * y + transform[4], transform[0] * x + transform[2] * y + transform[4],
transform[1] * x + transform[3] * y + transform[5] transform[1] * x + transform[3] * y + transform[5]
]; ];
} }
}; };

2
src/shared/global.js

@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals PDFJS, global */ /* globals global */
'use strict'; 'use strict';

1
web/overlay_manager.js

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals Promise */
'use strict'; 'use strict';

2
web/pdf_document_properties.js

@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals Promise, mozL10n, getPDFFileNameFromURL, OverlayManager */ /* globals mozL10n, getPDFFileNameFromURL, OverlayManager */
'use strict'; 'use strict';

1
web/view_history.js

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals PDFJS, Promise */
'use strict'; 'use strict';

2
web/viewer.js

@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals PDFJS, PDFBug, FirefoxCom, Stats, Cache, ProgressBar, /* globals PDFJS, PDFBug, FirefoxCom, Stats, ProgressBar,
DownloadManager, getFileName, getPDFFileNameFromURL, DownloadManager, getFileName, getPDFFileNameFromURL,
PDFHistory, Preferences, SidebarView, ViewHistory, Stats, PDFHistory, Preferences, SidebarView, ViewHistory, Stats,
PDFThumbnailViewer, URL, noContextMenuHandler, SecondaryToolbar, PDFThumbnailViewer, URL, noContextMenuHandler, SecondaryToolbar,

Loading…
Cancel
Save