Tim van der Meij
0991c06395
Refactor annotation flags code
...
This patch makes it possible to set and get all possible flags that the PDF specification defines. Even though we do not support all possible annotation types and not all possible annotation flags yet, this general framework makes it easy to access all flags for each annotation such that annotation type implementations can use this information.
We add constants for all possible annotation flags such that we do not need to hardcode the flags in the code anymore. The `isViewable()` and `isPrintable()` methods are now easier to read. Additionally, unit tests have been added to ensure correct behavior.
This is another part of #5218 .
2015-11-22 01:06:37 +01:00
Yury Delendik
bd7f121c83
Better "text" testing.
2015-11-19 11:03:52 -06:00
Yury Delendik
56ccaea99b
Move text layer building logic into src/display/text_layer.js
2015-11-19 10:50:27 -06:00
Yury Delendik
2f34fd46cb
Move CustomStyle.
2015-11-19 10:47:17 -06:00
Jonas Jenwald
055573fc83
Replace the unavailable linked test-case for issue 1055 with a reduced test-case
...
Re: issue 1055 and PR 1095.
2015-11-18 13:48:44 +01:00
Yury Delendik
194994a289
Merge pull request #6551 from yurydelendik/subaa
...
[api-minor] Enables subpixel anti-aliasing for most of the content.
2015-11-17 19:45:32 -06:00
Yury Delendik
2f1a626d6a
Merge pull request #6640 from dsprenkels/issue-6006-radial-gradient-size
...
Apply transformation matrix to RadialGradient radiuses
2015-11-17 11:40:13 -06:00
Daan Sprenkels
6ce83d3290
apply transformation matrix to RadialGradient radiuses,
...
not only to circle origin points
fix for #6006
2015-11-17 00:20:42 +01:00
Jonas Jenwald
bd8d3a78a3
Replace the unavailable linked test-case for issue 845 with a reduced test-case
...
Re: issue 845 and PR 1977.
2015-11-16 23:38:23 +01:00
Yury Delendik
99f9b523c2
Merge pull request #6627 from prometheansacrifice/use-editorconfig
...
Uses editorconfig to maintain consistent coding styles
2015-11-16 13:51:45 -06:00
Yury Delendik
37f511cb65
Merge pull request #6645 from Snuffleupagus/issue-3405-reduced-test
...
Replace the unavailable linked test-case for issue 3405 with a reduced test-case
2015-11-16 11:37:41 -06:00
Yury Delendik
c506ca6ba1
Merge pull request #6642 from Snuffleupagus/pr-2606-reduced-tests
...
Replace the unavailable linked test-cases for PR 2606 with reduced test-cases
2015-11-16 11:29:52 -06:00
Yury Delendik
b2e3c59372
Merge pull request #6639 from Snuffleupagus/pr-197-reduced-test
...
Replace the unavailable linked test-case for PR 197 with a reduced test-case
2015-11-16 11:27:10 -06:00
Yury Delendik
1d8800370a
Allow subpixel anti-aliasing for most of the content.
2015-11-16 10:50:02 -06:00
Jonas Jenwald
1478241c8e
Replace the unavailable linked test-case for issue 3405 with a reduced test-case
...
Re: issue 3405 and PR 3861.
2015-11-16 17:06:53 +01:00
Jonas Jenwald
841831f35e
Replace the unavailable linked test-cases for PR 2606 with reduced test-cases
...
Re: PR 2606.
2015-11-16 13:15:36 +01:00
Jonas Jenwald
4b360512af
Replace the unavailable linked test-case for PR 197 with a reduced test-case
...
Re: PR 197.
*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-11-15 20:07:54 +01:00
Jonas Jenwald
dca681e82b
Replace the unavailable linked test-case for issue 1655 with a reduced test-case
...
Re: issue 1655 and PR 1978.
2015-11-15 15:32:11 +01:00
Jonas Jenwald
458aff66f4
Replace the unavailable linked test-case for issue 3207 with a reduced test-case
...
Re: issue 3207 and PR 3268.
2015-11-15 13:33:36 +01:00
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: */
2015-11-14 07:32:18 +05:30
Jonas Jenwald
5bd76c46ac
Replace the unavailable linked test-case for issue 3263 with a reduced test-case
...
Re: issue 3263 and PR 3265.
2015-11-13 16:47:02 +01:00
Jonas Jenwald
50a70429ec
Ignore the /Mask entry in images unless its /ImageMask entry is explicitly set to true
(issue 6621)
...
Fixes 6621.
2015-11-12 22:49:26 +01:00
Tim van der Meij
3a23367f04
Merge pull request #6610 from Snuffleupagus/issue-2128-reduced-test
...
Replace the unavailable linked test-case for issue 2128 with a reduced test-case
2015-11-11 23:02:29 +01:00
Tim van der Meij
d8ddde26b7
Merge pull request #6622 from yurydelendik/rm-mc-tests
...
Remove mozcentral test files.
2015-11-11 22:57:40 +01:00
Yury Delendik
4c9f6741ae
Remove mozcentral test files.
2015-11-11 15:54:17 -06:00
Yury Delendik
248e211a20
Merge pull request #6600 from Rob--W/test-server-improved
...
Improve reliability of the test server
2015-11-11 13:50:25 -06:00
Rob Wu
b0ff49e456
Improve reliability of the test server
...
- replace // with /
(otherwise http://localhost:8888// links to e.g. http://src/ instead
of http://localhost:8888/src ).
- Solve XSS issue (file names should be sanitized, not output as-is).
- Prevent server from crashing if there is a stat error (e.g. permission
error or file not found (e.g. broken symlink)).
2015-11-11 18:37:29 +01:00
Jonas Jenwald
3008580972
Replace the unavailable linked test-case for issue 2128 with a reduced test-case
...
Re: issue 2128 and PR 2628.
2015-11-11 12:49:42 +01:00
Yury Delendik
3674f0d7c7
Merge pull request #6620 from Rob--W/node-test-random-port
...
Use random port in test webserver
2015-11-10 13:13:01 -06:00
Rob Wu
ff8c334207
Use random port in test webserver
2015-11-10 19:10:23 +01:00
Jonas Jenwald
ff64ef0243
Prevent readCmapTable
from failing if the cmap
is missing in TrueType fonts
...
Fixes http://arrow.dit.ie/cgi/viewcontent.cgi?article=1000&context=aaschadpoth#page=3 .
2015-11-08 16:48:37 +01:00
Jonas Jenwald
66c17a69ae
Add a reduced text
test-case for issue 4665
...
Re: issue 4665 and PR 6601.
Since we currently don't have a good `text` test-case that fails without the above PR, this patch adds a reduced one.
2015-11-07 13:09:08 +01:00
Yury Delendik
4ee0bade82
Test for text layer issue 1045.
2015-11-06 10:55:43 -06:00
Yury Delendik
7e8dacf57b
Merge pull request #6588 from yurydelendik/spacing
...
Better spacing in text layer.
2015-11-03 09:24:43 -06:00
Yury Delendik
27efe5608f
Test case from #6019 .
2015-11-03 09:03:08 -06:00
Jonas Jenwald
034087bb40
Replace the linked test-case for issue 3879 with a reduced test-case
...
Re: issue 3879 and PR 3880.
2015-11-01 13:02:10 +01:00
Jonas Jenwald
cf09f38340
Replace the linked test-case for issue 1293 with a reduced test-case
...
When I submitted PR 3576, I included a linked test-case. The reason was that I didn't know enough about the PDF format, in order to successfully create a reduced test-case.
Considering that the link points to a Dropbox, there's no guarantee that the PDF file will remain available, hence it seems worthwhile to replace the test-case.
*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-10-29 13:39:29 +01:00
Jonas Jenwald
1c66d4a106
Add a totalLength
getter to OperatorList
, since the length
is zero after flushing
...
In the `RenderPageRequest` handler in `worker.js`, we attempt to print an `info` message containing the rendering time and the length of the operator list. The latter is currently broken (and has been for quite some time), since the `length` of an `OperatorList` is reset when flushing occurs.
This patch attempts to rectify this, by adding a getter which keeps track of the total length.
2015-10-26 18:12:14 +01:00
Jonas Jenwald
25e55322c4
Improved get fingerprint
unit-tests (PR 5124)
...
This patch adds a unit-test for the changes contained in PR 5124, and also improves the existing `get fingerprint` test slightly.
2015-10-24 14:18:36 +02:00
Yury Delendik
5111422d89
Merge pull request #6558 from Snuffleupagus/issue-6151-test
...
Add a reduced test-case for issue 6151
2015-10-23 14:45:57 -05:00
Brendan Dahl
2a5616c2aa
Merge pull request #6546 from yurydelendik/destroy
...
[api-minor] Adds controlled destruction of the worker.
2015-10-23 10:54:01 -07:00
Jonas Jenwald
ec04c4acb7
Add a reduced test-case for issue 6151
...
Re: issue 6151 and PR 6193.
*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-10-23 18:50:14 +02:00
Yury Delendik
58c3ea0820
Adds thread abort capabilities.
2015-10-23 09:06:32 -05:00
Yury Delendik
59c13b32aa
Adds destroy method to the document loading task.
...
Also renames PDFPageProxy.destroy method to cleanup.
2015-10-23 08:57:14 -05:00
Jonas Jenwald
d3782ff8d4
Add a reduced test-case for issue 4575
...
Re: issue 4575 and PR 4581.
2015-10-23 15:15:06 +02:00
Jonas Jenwald
2e751199fb
Prevent getOperatorList from failing to correctly parse OPS.paintXObject for TilingPatterns that are missing some /Resources entries (issue 6541)
...
Fixes 6541.
2015-10-21 21:30:56 +02:00
Jonas Jenwald
e04113a35b
Add unit-tests for the onPassword/onProgress
callbacks of the API
...
The standard viewer implicitly depends on the `onPassword` and `onProgress` callbacks, in order to open password protected PDF files, respectively to report file loading progress. We currently have no unit-tests for this functionality, which seems unfortunate; hence this patch.
*Please note:* Rather than adding more unit-tests to `api_spec.js`, I slightly extended/reworked two existing tests. Specifically for the password test, this *does not* really change what we actually test, just how the test is done.
2015-10-21 00:01:52 +02:00
Jonas Jenwald
5987197bd5
Ensure that all getDocument
unit-tests returns the expected data
2015-10-16 18:54:20 +02:00
Jonas Jenwald
34cbee9bd3
Add unit-tests for PR 6531
2015-10-16 18:54:18 +02:00
Jonas Jenwald
39b962e3b0
Add unit-tests for isExternalLinkTargetSet
2015-10-13 21:56:46 +02:00