Tim van der Meij
9c95d089de
Merge pull request #7281 from yurydelendik/static-warnings
...
Fixes some static analysis warnings and recommendations
2016-05-03 01:26:17 +02:00
Yury Delendik
32ce369d88
Fixes some static analysis warnings and recommendations
...
* Useless conditional
* Superfluous trailing arguments
* Useless assignment to local variable
* Misspelled identifier
* JSDoc tag for non-existent parameter
2016-05-02 17:34:58 -05:00
Yury Delendik
4cde9984f9
Fixes unneed conversion to array in CFF encodeInteger.
2016-05-02 15:24:16 -05:00
Yury Delendik
4016f9fd43
Fixes weird loop in the bidi.js.
...
Closes #7231 .
2016-04-27 16:14:33 -05:00
Yury Delendik
3d49879211
Merge pull request #7130 from nschloe/patch-1
...
Add element to text layer even if width === 0
2016-04-22 16:10:07 -05:00
Jonas Jenwald
9ceeb21741
Prevent accidentally overriding the error
function in the commonobj
messageHandler in api.js (issue 7232)
...
This naming issue has been present since PR 3529, but at least I cannot find any issues/bugs that seem to have been caused by it, which is good.
The patch also removes an unnecessary `else` branch, since an already existing `break` means that it's redundant.
Fixes 7232.
2016-04-22 10:12:12 +02:00
Jonas Jenwald
e281ef15db
Adjust incorrect first obj number of "free" xref entry in XRef_readXRefTable
(issue 7229)
...
Fixes 7229.
2016-04-21 16:36:32 +02:00
Jonas Jenwald
19e0599f74
Split the two paths in PDFImage.resize
into separate helper functions, placed in colorspace.js and image.js
...
Re: issue 6777.
2016-04-17 10:24:36 +02:00
Jonas Jenwald
f3f825cc71
Various improvements for GoToR
actions
...
- Add support for the 'NewWindow' property.
- Ensure that destinations are applied to the *remote* document, instead of the current one.
- Handle the `F` entry being a standard string, instead of a dictionary.
2016-04-15 22:55:05 +02:00
Jonas Jenwald
b63ef7a8b6
Refactor LinkAnnotation
slightly to add data.url
/data.dest
at the end
...
This patch also makes sure that all URLs are converted to the correct encoding.
2016-04-15 22:55:05 +02:00
Tim van der Meij
4a601ffc28
Merge pull request #7197 from prakashpalanisamy/remove-combineurl-test
...
Remove `combineUrl` and replace it with `new URL`. Issue #7183 , for reference.
2016-04-15 22:44:07 +02:00
Prakash Palanisamy
a25c29d98d
Remove combineUrl
and replace it with new URL
.
2016-04-15 21:33:10 +05:30
Jonas Jenwald
079b563e2d
Ensure that the params
parameter of the PredictorStream
is a dictionary (issue 7200)
...
Fixes 7200.
2016-04-15 16:30:18 +02:00
Yury Delendik
6282ec24d1
Merge pull request #7172 from yurydelendik/umd-web
...
Introduces UMD headers to the web/ folder.
2016-04-13 10:23:23 -05:00
Yury Delendik
006e8fb59d
Introduces UMD headers to the web/ folder.
2016-04-13 10:09:48 -05:00
Yury Delendik
fa2f80d0fd
Merge pull request #7189 from yurydelendik/webpack-browserify-love
...
Removing "entry-loader" dependency from webpack.
2016-04-13 08:42:11 -05:00
Yury Delendik
ae415f9e80
Removing "entry-loader" dependency from webpack.
2016-04-13 08:24:25 -05:00
Yury Delendik
b834b6899c
Merge pull request #7185 from iloire/issue-7177-support-almondjs
...
Support almond.js #7177
2016-04-12 17:21:03 -05:00
Ivan Loire
1dfc49152a
Support almond.js #7177
2016-04-12 09:32:07 +10:00
Yury Delendik
398e6acbc5
Stops bleeding of pattern edges for mesh.
2016-04-11 18:21:44 -05:00
Jonas Jenwald
be6754a1a0
Merge pull request #7176 from yurydelendik/smask-resume
...
Allow SMask be resumed after restore() and better transform after SMask
2016-04-11 15:57:40 +02:00
Yury Delendik
63f62a0e53
Finishing SMask at the end of operators list.
2016-04-11 08:02:06 -05:00
Yury Delendik
1485c1d1da
Suspending/resuming SMask operation during setGState/restore.
2016-04-11 08:02:06 -05:00
Jonas Jenwald
f59c3a0644
Remove the remaining usages of new {Name,Cmd}
in favor of {Name,Cmd}.get
...
Using `new {Name,Cmd}` should be avoided, since it creates a new object on *every* call, whereas `{Name,Cmd}.get` uses caches to only create *one* object regardless of how many times they are called.
Most of these are found in the unit-tests, where increased memory usage probably doesn't matter very much. But it still seems good to get rid of those cases, since no part of the codebase ought to advertise that usage.
Given the small size of the patch, I'm also tweaking a few comments and class names.
2016-04-08 12:14:05 +02:00
Yury Delendik
1e4886a15a
Remove global window and navigator usages from the core code.
2016-04-07 13:46:07 -05:00
Yury Delendik
1e3e14e6b2
Exposes all functional members via lib exports and use them in viewer.
2016-04-07 13:46:07 -05:00
Yury Delendik
1d12aed5ca
Move all PDFJS.xxx settings into display/global.
2016-04-07 13:46:07 -05:00
Yury Delendik
118b71925c
Forces UMD header to have relative path and extension for CommonJS.
2016-04-02 11:10:36 -05:00
Yury Delendik
34aa915441
Merge pull request #7146 from Snuffleupagus/extract-CFFParser
...
Extract CFFParser and Type1Parser from fonts.js
2016-04-02 10:50:38 -05:00
Yury Delendik
055d642bf2
Merge pull request #7107 from Rob--W/worker-loading
...
Detect premature worker load error
2016-04-02 10:40:26 -05:00
Rob Wu
c8996f654f
Detect and handle premature worker load error
...
Fall back to a fake worker if the worker fails to load or initialize,
e.g. due to a network error, a security error or simply a script error.
2016-04-02 11:06:15 +02:00
Jonas Jenwald
ef551e8266
Extract Type1Parser
from fonts.js
2016-04-01 23:38:53 +02:00
Jonas Jenwald
b961e1d21b
Extract CFFParser
from fonts.js (issue 6777)
2016-04-01 22:32:39 +02:00
Yury Delendik
a250c150ab
Merge pull request #7134 from yurydelendik/circ-stream-colorspace
...
Refactors to remove stream.js dependency on colorspace.js
2016-04-01 08:23:24 -05:00
Yury Delendik
ff3ce973b8
Merge pull request #7106 from Snuffleupagus/issue-7101
...
Keep track of the character to glyph mapping in font_renderer.js, to prevent errors when different characters point to the same glyph (issue 7101)
2016-04-01 08:09:21 -05:00
Yury Delendik
35cbf74b12
Refactors to remove stream.js dependency on colorspace.js
2016-04-01 07:36:16 -05:00
Brendan Dahl
13d440df61
Merge pull request #7078 from Snuffleupagus/refactor-toFontChar-without-file
...
Refactor the building of `toFontChar` for non-embedded fonts
2016-03-31 10:43:11 -07:00
Jonas Jenwald
05cf709f8e
Parse Type1 font files to determine the various Length{n}
properties, instead of trusting the PDF file (issue 5686, issue 3928)
...
Fixes 5686.
Fixes 3928.
2016-03-31 11:08:12 +02:00
Jonas Jenwald
c40df8a393
Make Type1Font
more class-like, by adding closure
...
*Note:* Ignoring whitespace should simplify reviewing a great deal.
2016-03-31 11:00:27 +02:00
Jonas Jenwald
17aaa125df
Keep track of the character to glyph mapping in font_renderer.js, to prevent errors when different characters point to the same glyph (issue 7101)
...
Fixes 7101.
2016-03-30 11:33:04 +02:00
Nico Schlömer
7cb055307d
Add element to text layer even if width === 0
...
Some browsers render certain special characters with width 0, others with strictly positive width. (For example, the Greek Delta, Δ, has width 0 in Google Chrome, and a positive width in Firefox.) The `if` clause in operation so far results in different text layer DOM trees for different browsers.
This commit fixes that by adding the elements independently of their width.
2016-03-29 19:32:51 +02:00
Brendan Dahl
4e2f70440f
Merge pull request #6711 from yurydelendik/errors
...
Better errors capturing at the core and stop rendering on error.
2016-03-29 09:19:28 -07:00
Jonas Jenwald
13d7a5070e
Prevent failures in the Annotation code if the Rect
array contains indirect objects (issue 7115)
...
Note that in the PDF files provided by the reporter, this issue was limited to `Rect` arrays in AcroForm entries (which we currently don't support).
However, since a bad PDF generator could create this problem in *any* kind of annotation, the reduced test-case included here uses a simple LinkAnnotation instead.
Fixes 7115.
2016-03-26 20:55:16 +01:00
Brendan Dahl
df7afcf004
Merge pull request #7053 from yurydelendik/rm-pdfjs-core
...
Removes global PDFJS usage from the src/core/.
2016-03-25 13:19:43 -07:00
Yury Delendik
2fa4dd6f40
Proxy global PDFJS.verbosity to properly configure shared/util.
2016-03-23 19:24:37 -05:00
Yury Delendik
a8e5912cb1
Moves shared/global to display/global
2016-03-23 19:24:37 -05:00
Yury Delendik
e372f3608b
Makes WorkerMessageHandler non-global.
2016-03-23 19:24:37 -05:00
Yury Delendik
bda5e6235e
Removes global PDFJS usage from the src/core/.
2016-03-23 19:24:37 -05:00
Yury Delendik
54ee15d866
Merge pull request #7100 from yurydelendik/stream-wo-parser
...
Removes core/stream circular dependency on core/parser.
2016-03-22 15:08:12 -05:00
Yury Delendik
6038c236b2
Removes core/stream circular dependency on core/parser.
2016-03-22 14:06:01 -05:00