Tim van der Meij
5194e68134
Lint: correct code style violations
...
Manual observations and working with other linting tools found these.
9 years ago
klemens
6f03f62327
trivial spelling fixes
9 years ago
Jonas Jenwald
6111c17c8a
Use `Dict_getArray` in more places in `src/core/` to avoid issues when Arrays contain indirect objects
...
As evident from e.g. PRs 6485 and 7118, some bad PDF generators unfortunately create Arrays where *some* elements are indirect objects (i.e. `Ref`s). This seems to mostly affect Arrays that contain numbers, such as e.g. `Matrix/FontMatrix/BBox/FontBBox/Rect/Color/...`, and has manifested itself in PDF files that fail to render correctly (some elements are missing).
The problem in both the cases above, besides broken rendering, was that there were *no* errors/warnings that indicated what the problem was, making it difficult to pinpoint the issue.
Hence this patch, where I've audited all usages of `Dict_get` in `src/core/` files, and replaced it with `Dict_getArray` where appropriate to try and prevent unnecessary future bugs.
9 years ago
Yury Delendik
2edf2792dc
Replaces literal {} created lookup tables with Object.create
9 years ago
Tim van der Meij
df81b832bb
Remove unused variables
9 years ago
Yury Delendik
6b60c8f4db
Adds UMD headers to core, display and shared files.
9 years ago
Manas
a2ba1b8189
Uses editorconfig to maintain consistent coding styles
...
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
10 years ago
Jonas Jenwald
60fbb5ef69
Ensure that the result of |constructStichedFromIRResult| is a number (issue 6113)
...
Fixes 6113.
10 years ago
Jonas Jenwald
1abad5f290
Fix typed array assignment in the |constructPostScriptFromIRResult| function (issue 5470)
11 years ago
Nicholas Nethercote
bcc31b666f
Right-size the array in getSampleArray().
...
This allows the JS engine to do a better job of allocating the right
number of elements for the array, avoiding some resizings. For the PDF
in #2504 , this avoids 100s of MiBs of allocations in Firefox.
11 years ago
Yury Delendik
f750e35224
Optimizes functions to not create arrays
11 years ago
Yury Delendik
cb81bd6be6
Compiles some of the FunctionType 4
11 years ago
Jonas Jenwald
8f5894d81a
Add strict equalities in src/core/function.js
11 years ago
Yury Delendik
fcc4dfd9b5
Moves shared/function.js to core/
11 years ago
p01
95fda4fcdc
Optimized function.js / 2x Faster PDFFunction_constructPostScriptFromIR
11 years ago
Tim van der Meij
4caf5b694e
Completes unit tests for PostScript evaluator and fixes two bugs in the evaluator itself
11 years ago
Rob Wu
2e97c0d085
Remove some unused variables from src/
...
Only obviously useless, local variables have been removed.
11 years ago
Tim van der Meij
10f80bda23
Fixes lint warning W004 in src/shared
11 years ago
Tim van der Meij
99b0231343
Fixes typo in function.js
11 years ago
Jonas Jenwald
e8a68f12df
Add braces to single line statements in src/shared/function.js
11 years ago
Yury Delendik
e9327050c3
Basic function.js split
11 years ago
Brendan Dahl
2228343f77
Only trigger warning bar on certain unsupported features.
11 years ago
Brendan Dahl
5ecce4996b
Split files into worker and main thread pieces.
12 years ago
Yury Delendik
19e8f2f059
lookChar refactoring
12 years ago
Jon Buckley
9ddb4eca95
Issue #2008 - Fix lint errors for src/function.js
12 years ago
Ben Browitt
19faf4b9eb
Fix closure compiler warnings.
13 years ago
Brendan Dahl
332ae4ce41
Change to the Apache v2 license.
13 years ago
Pimm Hogeling
438e3c8f6d
Fixes for subtile bugs that were introduced in 59283bdf6d
and 99440ab691
, among others.
13 years ago
Yury Delendik
5e3882ab69
Changing cubic spline interpolation error to TODO
13 years ago
Brendan Dahl
6ab7584ba4
Fix to lowercase.
13 years ago
Brendan Dahl
e5732f489d
Handle junk at the end of postscript functions.
13 years ago
Kalervo Kujala
99440ab691
Refactor class method names.
...
Also move functionality to more logical place in canvas.js and jpx.js.
13 years ago
Brendan Dahl
8a45177be0
Make Dict handle all the fetching of Refs.
13 years ago
Kalervo Kujala
8e060bdbca
Use [] instead of new Array(...).
13 years ago
notmasteryet
5fba376a33
Fixing interpolation (continuation of #1143 )
13 years ago
Andreas Gal
59283bdf6d
implement sampled functions based on the PDF spec
13 years ago
Brendan Dahl
df1e22f2e4
Switch to push instead of slice. Faster on jsperf, but doesn't seem to be faster testing locally.
14 years ago
Brendan Dahl
acd64d75f3
Switch to conditional operator.
14 years ago
Brendan Dahl
9de52f375d
Fix idiv and cvi. Add test case for idiv.
14 years ago
Brendan Dahl
6afb49c6c6
Address Yury's PR comments.
14 years ago
notmasteryet
baab676b00
Fix stitching function
14 years ago
Brendan Dahl
20dace0513
Switch to a single "code stack".
14 years ago
Brendan Dahl
27b0d0c941
Switch to two arrays for instructions.
14 years ago
Brendan Dahl
971f35d165
Add unit files to lint, fix lint errors.
14 years ago
Brendan Dahl
1089c30b56
Adding type4 postscript function support.
14 years ago
Kalervo Kujala
1ef4c94de2
Name all constructors.
14 years ago
Brendan Dahl
0e0527be81
Address Yury's comment.
14 years ago
Brendan Dahl
543e3377de
Adding multi dimensional interpolation and test file.
14 years ago
Artur Adib
249385b4bb
Progress
14 years ago
Kalervo Kujala
dc15019248
Name anonymous funtions in function.js.
14 years ago