mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Remove variable shadowing from the JavaScript files in the src/core/
folder
*This is part of a series of patches that will try to split PR 11566 into smaller chunks, to make reviewing more feasible.* Once all the code has been fixed, we'll be able to eventually enable the ESLint no-shadow rule; see https://eslint.org/docs/rules/no-shadow
This commit is contained in:
parent
b86df97725
commit
216cbca16c
11 changed files with 135 additions and 140 deletions
|
@ -345,12 +345,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
}
|
||||
}
|
||||
|
||||
function compileCharString(code, cmds, font, glyphId) {
|
||||
var stack = [];
|
||||
var x = 0,
|
||||
y = 0;
|
||||
var stems = 0;
|
||||
|
||||
function compileCharString(charStringCode, cmds, font, glyphId) {
|
||||
function moveTo(x, y) {
|
||||
cmds.push({ cmd: "moveTo", args: [x, y] });
|
||||
}
|
||||
|
@ -361,6 +356,11 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
cmds.push({ cmd: "bezierCurveTo", args: [x1, y1, x2, y2, x, y] });
|
||||
}
|
||||
|
||||
var stack = [];
|
||||
var x = 0,
|
||||
y = 0;
|
||||
var stems = 0;
|
||||
|
||||
function parse(code) {
|
||||
var i = 0;
|
||||
while (i < code.length) {
|
||||
|
@ -719,7 +719,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
|||
}
|
||||
}
|
||||
}
|
||||
parse(code);
|
||||
parse(charStringCode);
|
||||
}
|
||||
|
||||
const NOOP = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue