Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Apr 1, 2018
1 parent 2f63ca0 commit ea2850e
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion examples/learning/prevnext.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h1>'Previous/Next' example</h1>

//
// In cases when the pdf.worker.js is located at the different folder than the
// pdf.js's one, or the pdf.js is executed via eval(), the workerSrc property
// PDF.js's one, or the PDF.js is executed via eval(), the workerSrc property
// shall be specified.
//
pdfjsLib.GlobalWorkerOptions.workerSrc =
Expand Down
2 changes: 1 addition & 1 deletion extensions/firefox/tools/l10n.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

// Small subset of the webL10n API by Fabien Cazenave for pdf.js extension.
// Small subset of the webL10n API by Fabien Cazenave for PDF.js extension.
(function(window) {
var gLanguage = "";
var gExternalLocalizerServices = null;
Expand Down
2 changes: 1 addition & 1 deletion external/builder/preprocessor2.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function postprocessNode(ctx, node) {
if (node.callee.type === 'MemberExpression' &&
isPDFJSPreprocessor(node.callee.object) &&
node.callee.property.type === 'Identifier') {
// PDFJSDev.xxxx(arg1, arg2, ...) => tranform
// PDFJSDev.xxxx(arg1, arg2, ...) => transform
var action = node.callee.property.name;
return handlePreprocessorAction(ctx, action,
node.arguments, node.loc);
Expand Down
4 changes: 2 additions & 2 deletions external/cmapscompress/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Quick notes about binary CMap format (bcmap)

The format is designed to package some information from the CMap files located at external/cmap. Please notice for size optimization reasons, the original information blocks can be changed (split or joined) and items in the blocks can be swaped.
The format is designed to package some information from the CMap files located at external/cmap. Please notice for size optimization reasons, the original information blocks can be changed (split or joined) and items in the blocks can be swapped.

The data stored in binary format in network byte order (big-endian).

Expand Down Expand Up @@ -34,7 +34,7 @@ Then records follow. The records starts from the record header encoded as B, whe
## Metadata record

The metadata record header bit 4-0 contain id of the metadata:
- 0 – comment, body of the record is encoded comment string (S)
- 0 – comment, body of the record is encoded comment string (S)
- 1 – UseCMap, body of the record is usecmap id string (S)

## Data records
Expand Down
4 changes: 2 additions & 2 deletions external/webL10n/l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ document.webL10n = (function(window, document, undefined) {
* locale (language) to parse. Must be a lowercase string.
*
* @param {Function} successCallback
* triggered when the l10n resource has been successully parsed.
* triggered when the l10n resource has been successfully parsed.
*
* @param {Function} failureCallback
* triggered when the an error has occured.
* triggered when the an error has occurred.
*
* @return {void}
* uses the following global variables: gL10nData, gTextData, gTextProp.
Expand Down
10 changes: 5 additions & 5 deletions src/core/cmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ var CMapFactory = (function CMapFactoryClosure() {

function parseCMap(cMap, lexer, fetchBuiltInCMap, useCMap) {
var previous;
var embededUseCMap;
var embeddedUseCMap;
objLoop: while (true) {
try {
var obj = lexer.getObj();
Expand All @@ -872,7 +872,7 @@ var CMapFactory = (function CMapFactoryClosure() {
break objLoop;
case 'usecmap':
if (isName(previous)) {
embededUseCMap = previous.name;
embeddedUseCMap = previous.name;
}
break;
case 'begincodespacerange':
Expand Down Expand Up @@ -901,10 +901,10 @@ var CMapFactory = (function CMapFactoryClosure() {
}
}

if (!useCMap && embededUseCMap) {
// Load the usecmap definition from the file only if there wasn't one
if (!useCMap && embeddedUseCMap) {
// Load the useCMap definition from the file only if there wasn't one
// specified.
useCMap = embededUseCMap;
useCMap = embeddedUseCMap;
}
if (useCMap) {
return extendCMap(cMap, fetchBuiltInCMap, useCMap);
Expand Down
6 changes: 3 additions & 3 deletions src/core/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var SKIP_PRIVATE_USE_RANGE_F000_TO_F01F = false;
// except for Type 3 fonts
var PDF_GLYPH_SPACE_UNITS = 1000;

// Accented charactars are not displayed properly on Windows, using this flag
// Accented characters are not displayed properly on Windows, using this flag
// to control analysis of seac charstrings.
var SEAC_ANALYSIS_ENABLED = false;

Expand Down Expand Up @@ -2107,7 +2107,7 @@ var Font = (function FontClosure() {
}
} else if (op === 0x2B && !tooComplexToFollowFunctions) { // CALL
if (!inFDEF && !inELSE) {
// collecting inforamtion about which functions are used
// collecting information about which functions are used
funcId = stack[stack.length - 1];
ttContext.functionsUsed[funcId] = true;
if (funcId in ttContext.functionsStackDeltas) {
Expand All @@ -2132,7 +2132,7 @@ var Font = (function FontClosure() {
tooComplexToFollowFunctions = true;
}
inFDEF = true;
// collecting inforamtion about which functions are defined
// collecting information about which functions are defined
lastDeff = i;
funcId = stack.pop();
ttContext.functionsDefined[funcId] = { data, i, };
Expand Down
6 changes: 3 additions & 3 deletions src/core/jpx.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ var JpxImage = (function JpxImageClosure() {
cod.selectiveArithmeticCodingBypass = !!(blockStyle & 1);
cod.resetContextProbabilities = !!(blockStyle & 2);
cod.terminationOnEachCodingPass = !!(blockStyle & 4);
cod.verticalyStripe = !!(blockStyle & 8);
cod.verticallyStripe = !!(blockStyle & 8);
cod.predictableTermination = !!(blockStyle & 16);
cod.segmentationSymbolUsed = !!(blockStyle & 32);
cod.reversibleTransformation = data[j++];
Expand All @@ -338,8 +338,8 @@ var JpxImage = (function JpxImageClosure() {
if (cod.terminationOnEachCodingPass) {
unsupported.push('terminationOnEachCodingPass');
}
if (cod.verticalyStripe) {
unsupported.push('verticalyStripe');
if (cod.verticallyStripe) {
unsupported.push('verticallyStripe');
}
if (cod.predictableTermination) {
unsupported.push('predictableTermination');
Expand Down
2 changes: 1 addition & 1 deletion src/core/obj.js
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ var XRef = (function XRefClosure() {
if (endobjRegExp.test(tokenStr)) {
break;
} else {
// Check if an "obj" occurance is actually a new object,
// Check if an "obj" occurrence is actually a new object,
// i.e. the current object is missing the 'endobj' operator.
let objToken = nestedObjRegExp.exec(tokenStr);

Expand Down
6 changes: 3 additions & 3 deletions src/core/operator_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,15 +444,15 @@ var QueueOptimizer = (function QueueOptimizerClosure() {
let match = this.match;
if (!state && !match && (i + 1 === ii) && !InitialState[fnArray[i]]) {
// Micro-optimization for the common case: last item is not
// optimazable, just skipping it.
// optimizable, just skipping it.
this.lastProcessed = ii;
return;
}

const context = this.context;
while (i < ii) {
if (match) {
// Already find a block of potetially optimizable items, iterating...
// Already find a block of potentially optimizable items, iterating...
const iterate = (0, match.iterateFn)(context, i);
if (iterate) {
i++;
Expand All @@ -467,7 +467,7 @@ var QueueOptimizer = (function QueueOptimizerClosure() {
break;
}
}
// Find the potetially optimizable items.
// Find the potentially optimizable items.
state = (state || InitialState)[fnArray[i]];
if (!state || Array.isArray(state)) {
i++;
Expand Down
2 changes: 1 addition & 1 deletion src/core/pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Shadings.RadialAxial = (function RadialAxialClosure() {

var colorStops = this.colorStops = [];

// Protect against bad domains so we don't end up in an infinte loop below.
// Protect against bad domains so we don't end up in an infinite loop below.
if (t0 >= t1 || step <= 0) {
// Acrobat doesn't seem to handle these cases so we'll ignore for
// now.
Expand Down
2 changes: 1 addition & 1 deletion src/display/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function compileType3Glyph(imgData) {
}
}

// finding iteresting points: every point is located between mask pixels,
// finding interesting points: every point is located between mask pixels,
// so there will be points of the (width + 1)x(height + 1) grid. Every point
// will have flags assigned based on neighboring mask pixels:
// 4 | 8
Expand Down
2 changes: 1 addition & 1 deletion src/display/content_disposition.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function getFilenameFromContentDispositionHeader(contentDisposition) {
// Decodes "ext-value" from RFC 5987.
let encodingend = extvalue.indexOf('\'');
if (encodingend === -1) {
// Some servers send "filename*=" without encoding'language' prefix,
// Some servers send "filename*=" without encoding 'language' prefix,
// e.g. in https://github.com/Rob--W/open-in-browser/issues/26
// Let's accept the value like Firefox (57) (Chrome 62 rejects it).
return extvalue;
Expand Down
4 changes: 2 additions & 2 deletions src/display/text_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
return !NonWhitespaceRegexp.test(str);
}

// Text layers may contain many thousand div's, and using `styleBuf` avoids
// Text layers may contain many thousands of divs, and using `styleBuf` avoids
// creating many intermediate strings when building their 'style' properties.
var styleBuf = ['left: ', 0, 'px; top: ', 0, 'px; font-size: ', 0,
'px; font-family: ', '', ';'];
Expand Down Expand Up @@ -340,7 +340,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
var xNew;
if (affectedBoundary.x2 > boundary.x1) {
// In the middle of the previous element, new x shall be at the
// boundary start. Extending if further if the affected bondary
// boundary start. Extending if further if the affected boundary
// placed on top of the current one.
xNew = affectedBoundary.index > boundary.index ?
affectedBoundary.x1New : boundary.x1;
Expand Down
2 changes: 1 addition & 1 deletion web/pdf_presentation_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const SWIPE_ANGLE_THRESHOLD = Math.PI / 6;
* @property {HTMLDivElement} viewer - (optional) The viewer element.
* @property {PDFViewer} pdfViewer - The document viewer.
* @property {EventBus} eventBus - The application event bus.
* @property {Array} contextMenuItems - (optional) The menuitems that are added
* @property {Array} contextMenuItems - (optional) The menu items that are added
* to the context menu in Presentation Mode.
*/

Expand Down
4 changes: 2 additions & 2 deletions web/ui_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function formatL10nValue(text, args) {
}

/**
* No-op implemetation of the localization service.
* No-op implementation of the localization service.
* @implements {IL10n}
*/
let NullL10n = {
Expand Down Expand Up @@ -483,7 +483,7 @@ function waitOnEventOrTimeout({ target, name, delay = 0, }) {
if (typeof target !== 'object' || !(name && typeof name === 'string') ||
!(Number.isInteger(delay) && delay >= 0)) {
return Promise.reject(
new Error('waitOnEventOrTimeout - invalid paramaters.'));
new Error('waitOnEventOrTimeout - invalid parameters.'));
}
let capability = createPromiseCapability();

Expand Down

0 comments on commit ea2850e

Please sign in to comment.