Jonas Jenwald
2701edc7c6
Change getDocumentError
in web/viewer.js to use instanceof
instead of the exception name
2014-09-08 22:34:25 +02:00
Yury Delendik
42771159ca
Removes stringToArray
2014-08-10 14:11:04 -05:00
Yury Delendik
46a9a35ddc
Merge pull request #5071 from nnethercote/font-savings
...
Optimize a font-heavy document
2014-08-05 18:57:46 -05:00
Jonas Jenwald
ccd71e0a94
Add strict equalities in src/shared/util.js
2014-08-01 12:18:40 +02:00
Jonas Jenwald
42e541a671
Add strict equalities in src/shared/fonts_utils.js
2014-08-01 12:18:35 +02:00
Yury Delendik
7026543663
Merge pull request #5059 from timvandermeij/unused-code
...
Removing unused code and enforcing additional JSHint options
2014-07-29 15:04:43 -05:00
Tim van der Meij
41faa78368
Fixes typo in promises implementation for legacy browsers
2014-07-24 17:11:22 +02:00
Nicholas Nethercote
c7f02d2c8e
Minimize memory usage of font-related arrays.
...
This patch replaces some vanilla arrays with typed arrays, and avoids
some array copying.
It reduces the peak RSS when viewing
http://www.dynacw.co.jp/Portals/3/fontsamplepdf/sample_4942546800828.pdf
from ~940 MiB to ~750 MiB, and reduces its load time from 83 to 76 ms.
2014-07-22 22:47:45 -07:00
Tim van der Meij
34728ee49b
Removing unused code
2014-07-18 22:34:50 +02:00
Nicholas Nethercote
31c613f064
Avoid creating intermediate strings in Util.makeCssRgb().
...
On one example (the Wuppertal map) this avoids the creation of over
230,000 intermediate strings.
2014-07-08 21:49:19 -07:00
Tim van der Meij
4c759527d1
Implements onerror for JpegStreams
2014-06-18 23:02:52 +02:00
Yury Delendik
bdeca30fbf
Splits shared/annotation.js into core/ and display/
2014-06-17 17:43:33 -05:00
Yury Delendik
5a2e511cbd
Merge pull request #4955 from timvandermeij/rename-concatenate
...
Renames concatenateToArray to appendToArray
2014-06-17 08:21:47 -05:00
Yury Delendik
0cd28ebfa3
Telemetry for used stream and font types
2014-06-16 16:41:04 -05:00
Tim van der Meij
9c072a5d4b
Renames concatenateToArray to appendToArray
2014-06-16 22:10:10 +02:00
Samuel Chantaraud
f362b3c744
Fix #4914 by ignoring hidden annotation
2014-06-11 10:41:43 -04:00
p01
0a51b1e616
utils.js optimization of isFOO methods
2014-06-10 12:37:36 +02:00
Yury Delendik
9c87fa24f7
Removes mozResponseArrayBuffer
2014-05-29 20:38:50 -05:00
Jonas Jenwald
002607502c
Merge pull request #4824 from yurydelendik/movecs
...
Moves colorspace.js and function.js into core/
2014-05-23 21:14:58 +02:00
Yury Delendik
fcc4dfd9b5
Moves shared/function.js to core/
2014-05-23 14:11:47 -05:00
Yury Delendik
7a19085159
Moves shared/colorspace.js into core/
2014-05-23 14:11:47 -05:00
Yury Delendik
542c9c4c7a
Moves ColorSpace logic into evaluator
2014-05-23 14:11:47 -05:00
Samuel Chantaraud
37c3641fad
Added Promise.catch
...
Fixed Promise so it rejects on uncaught exception
Catch possible rejection on ViewHistory.setMultiple
2014-05-22 13:53:19 -04:00
Yury Delendik
d8eb8b1de1
Adds Promise to the getOperatorList
2014-05-19 16:19:54 -05:00
p01
8cfd024e48
Optimized colorspace.js AlternateCS_getRgbBuffer
2014-05-14 17:06:39 +02:00
p01
95fda4fcdc
Optimized function.js / 2x Faster PDFFunction_constructPostScriptFromIR
2014-05-14 17:06:38 +02:00
Jonas Jenwald
44cd0f4a76
Merge pull request #4752 from yurydelendik/refmsghdlr
...
Refactors MessageHandler.send to remove callbacks
2014-05-13 22:47:04 +02:00
Jonas Jenwald
67a3b59864
Handle more cases of invalid line dash patterns in annotation borders
2014-05-09 23:12:23 +02:00
Tim van der Meij
e359f0694f
Merge pull request #4740 from yurydelendik/pageviewportdoc
...
Adds pageviewport documentation
2014-05-09 22:30:16 +02:00
Yury Delendik
a26d28a393
Merge pull request #4683 from yurydelendik/grouppath
...
Groups path commands into single operation
2014-05-08 22:16:58 -05:00
Tim van der Meij
7656408579
Refactoring Util.inherit.getOperatorList in annotation.js
2014-05-08 22:42:47 +02:00
Yury Delendik
cc9643cf32
Refactors GetAnnotationsRequest and GetPageRequest
2014-05-08 15:02:53 -05:00
Yury Delendik
2008f74185
Refactors MessageHandler.send to remove callbacks
2014-05-07 18:15:25 -05:00
Yury Delendik
95e61ad0e3
Adds pageviewport documentation
2014-05-05 14:09:47 -05:00
Yury Delendik
7ac1d6cdc8
Merge pull request #4708 from p01/graphic_optimizations_1
...
Graphic optimizations 1
2014-05-05 10:37:03 -05:00
Yury Delendik
b3f24ca0c7
Merge pull request #4733 from timvandermeij/postscript-unit-tests
...
Completes unit tests for PostScript evaluator and fixes two bugs in the evaluator itself
2014-05-05 10:27:54 -05:00
Yury Delendik
70da61fa01
Merge pull request #4729 from Snuffleupagus/remove-LegacyPromise
...
Remove LegacyPromise
2014-05-05 07:40:21 -05:00
p01
f70a072cde
Optimized CalGrayCS's convertToRgb
2014-05-05 14:22:43 +02:00
Tim van der Meij
4caf5b694e
Completes unit tests for PostScript evaluator and fixes two bugs in the evaluator itself
2014-05-03 12:18:18 +02:00
Jonas Jenwald
cb59e7f872
Remove LegacyPromise in src/shared/annotation.js
2014-05-02 21:05:03 +02:00
Jonas Jenwald
ad732f6403
Remove LegacyPromise
2014-05-02 01:48:17 +02:00
Yury Delendik
63d5aae3f6
Groups path commands into single command
2014-04-30 09:09:04 -05:00
Pramodh KP
04b1eefb1d
Added reject polyfill and PromiseCapability
2014-04-29 19:36:37 +05:30
p01
8f9bd33a57
PDFImage_resize: copy in place with alpha and ~5x speed up
2014-04-23 17:27:02 +02:00
Yury Delendik
bda1865fb8
Merge pull request #4520 from timvandermeij/annotation-icon-size
...
Force default icon size for Text annotations without appearance stream
2014-04-22 16:13:50 -05:00
Jonas Jenwald
ead5653cdc
Add integer conversion to RGB colour values in convertToRgb in DeviceCmykCS (issue 4443)
2014-04-20 02:23:45 +02:00
Tim van der Meij
8d365b23ca
Force default icon size for Text annotations without appearance stream
2014-04-18 21:11:56 +02:00
fkaelberer
b06c10cbbd
rename getUint32 to getInt32 and collect readInt*() in util.js
2014-04-16 21:31:16 +02:00
Samuel Chantaraud
7a4543e348
Prevent the annotationLayer to be recreated when the page is redrawn
...
This allows interactive annotations to keep their states after a resize
2014-04-16 08:13:54 -04:00
Rob Wu
2e97c0d085
Remove some unused variables from src/
...
Only obviously useless, local variables have been removed.
2014-04-15 17:10:23 +02:00
Yury Delendik
21f5dc22f3
Merge pull request #4616 from yurydelendik/jsdoc
...
Creates make.js code to build jsdoc.
2014-04-14 14:44:30 -05:00
Yury Delendik
2ca2c387fc
Creates make.js code to build jsdoc.
2014-04-13 15:54:24 -05:00
Joshua T Kalis
5828b2c687
Refactor - remove redundant function and all references
...
The function `assertWllFormed` was doing nothing different than `assert` which is
available in the same namespace. Removing it will lighten the filesize - albeit
very slightly - and reduce complexity.
2014-04-13 16:18:07 -04:00
Tim van der Meij
10f80bda23
Fixes lint warning W004 in src/shared
2014-04-11 00:02:32 +02:00
Tim van der Meij
a71a87a821
Fixes lint warning W018: confusing use of exclamation mark
2014-04-11 00:02:31 +02:00
Yury Delendik
791c9a7b13
Relaxes murmurhash array requirement.
2014-04-10 07:55:08 -05:00
Brendan Dahl
608c6cea5a
Merge pull request #4374 from yurydelendik/dictgetall
...
Doesn't traverse cyclic references in Dict.getAll; reduces empty-Dict GC
2014-04-08 10:43:42 -07:00
Yury Delendik
34f0f0962f
Merge pull request #4539 from Snuffleupagus/issue-4537
...
Workaround for missing 'Rect' entry in annotation dictionaries (issue 4537)
2014-04-02 08:05:52 -05:00
Jonas Jenwald
772df5e0cb
Workaround for missing 'Rect' entry in annotation dictionaries (issue 4537)
2014-03-31 12:07:54 +02:00
fkaelberer
c978c026fa
clean up string conversion functions
2014-03-27 13:01:43 +01:00
Yury Delendik
1d0286f6a1
Update util.js
...
Fixes comments for preprocessor
2014-03-26 13:19:10 -05:00
Yury Delendik
31f081ae17
Doesn't traverse cyclic references in Dict.getAll; reduces empty-Dict garbage
2014-03-26 09:07:38 -05:00
p01
4e6ebf2de0
Optimized putBinaryImageData for GRAYSCALE_1BPP
...
The following changes make putBinaryImageData 2.2x faster.
* Use a Uint32Array to draw whole pixels instead component by component
* Unroll the inner most loop
* Added lazy PDFJS.hasCanvasTypedArrays, PDFJS.isLittleEndian and compatibility
Uint32ArrayView for browsers using the old CanvasPixelArray
2014-03-26 14:05:59 +01:00
Christian Krebs
fc9edfcf76
Introduce paintSolidColorImageMask command to handle 1x1 solid image masks
...
See https://github.com/mozilla/pdf.js/issues/4436 for details
2014-03-19 13:27:59 +01:00
Yury Delendik
257898b359
Caching inlined mask images
2014-03-13 11:01:34 -05:00
Yury Delendik
f48f57e30a
Caches last parsed resource image, recornizes image repeats
2014-03-13 11:00:10 -05:00
Tim van der Meij
99b0231343
Fixes typo in function.js
2014-03-08 22:40:19 +01:00
Jonas Jenwald
4840c2ccdc
Add braces to single line statements in src/shared/annotation.js
2014-03-08 20:50:38 +01:00
Jonas Jenwald
15a63e48bd
Add braces to single line statements in src/shared/colorspace.js
2014-03-08 20:50:37 +01:00
Jonas Jenwald
00f6d07a21
Add braces to single line statements in src/shared/fonts_util.js
2014-03-08 20:50:37 +01:00
Jonas Jenwald
e8a68f12df
Add braces to single line statements in src/shared/function.js
2014-03-08 20:50:36 +01:00
Jonas Jenwald
635466fcd2
Add braces to single line statements in src/shared/util.js
2014-03-08 20:50:36 +01:00
Samuel Chantaraud
076b3433b4
Improved annotations' display/behavior.
...
Added an "InteractiveAnnotation" class to homogenize the annotations' structure (highlighting) and user interactions (for now, used for text and link annotations).
Text annotations:
The appearance (AP) has priority over the icon (Name).
The popup extends horizontally (up to a limit) as well as vertically.
Reduced the title's font size.
The annotation's color (C) is used to color the popup's background.
On top of the mouseover show/hide behavior, a click on the icon will lock the annotation open (for mobile purposes). It can be closed with another click on either the icon or the popup.
An annotation printing is conditioned by its "print" bit
Unsupported annotations are not displayed at all.
2014-03-07 10:48:42 -04:00
Yury Delendik
ff5ccdeb07
Merge pull request #4383 from nnethercote/more-rgb24
...
Use RGB_24BPP form for all images lacking alpha data.
2014-03-05 07:03:16 -06:00
Nicholas Nethercote
a2fe30ff38
Use RGB_24BPP form for all images lacking alpha data.
2014-03-03 20:58:35 -08:00
Yury Delendik
10af056f8f
Reset annotation stream; reset page annotation promise
2014-03-03 16:46:05 -06:00
Yury Delendik
ba95e0b07b
Merge pull request #4353 from nnethercote/more-Array-joins
...
Use Array.join() to build up strings in more places.
2014-03-02 23:26:22 -06:00
Nicholas Nethercote
ab7568c0ff
Use Array.join() to build up strings in more places.
2014-03-02 17:54:16 -08:00
Yury Delendik
9a918572dd
Merge pull request #4336 from nnethercote/rgb24
...
Special-case 24-bit RGB image-handling
2014-03-02 19:53:42 -06:00
Mitar
2c82e720b8
Updated to current latest stable version of jshint.
2014-03-01 13:31:25 -08:00
Luís Nabais
220a8e4f0e
Fix the combineUrl function
...
* Allow a url to omit the protocol and use the same protocol as the
* current page
2014-02-28 17:25:46 +00:00
Mathieu 'p01' Henri
e786649d2a
Skip the Math.sqrt for clamped values in convertToRgb
...
No need to compute the square root of clamped values.
Only the values in the range ]0,1[ need to be processed.
2014-02-27 17:44:40 +01:00
Nicholas Nethercote
c4fab2f234
Share ColorSpace.getRgb() between all sub-classes.
2014-02-26 05:51:29 -08:00
Nicholas Nethercote
42cbb5b440
Introduce ImageKind constants.
2014-02-25 15:18:04 -08:00
Jonas Jenwald
054f1e7e57
Handle undefined url in LinkAnnotation
2014-02-15 13:49:24 +01:00
Yury Delendik
e9327050c3
Basic function.js split
2014-01-27 20:29:47 -06:00
Yury Delendik
bf432a37bb
Refactors shared/pattern.js into core/ and display/
2014-01-25 12:18:22 -06:00
Yury Delendik
5a6862decc
Merge pull request #4164 from Snuffleupagus/bug-957034-followup
...
Only check for line dash pattern when annotation has a visible border (bug 957034 followup)
2014-01-22 08:27:47 -08:00
Rob Wu
b35ced8c9e
RFC 3986-compliant isValidUrl (protocol parsing)
...
To avoid misinterpreting URLs like "/File:wikipedia.png" as a
non-relative URLs.
2014-01-22 15:10:06 +01:00
Rob Wu
3c0b8073be
Try to recover from bad URI value
...
See https://github.com/mozilla/pdf.js/issues/4159
BAD (http://cms.di.unipi.it/files/bbec7791fac20e98127c77531e4031912392156c/testo.pdf )
<< /S /URI /URI /v#2findex.php#2fFile:Logo.png >>
GOOD (http://www.ioi2012.org/wp-content/uploads/2011/12/practice.pdf ):
<< /S /URI /URI (http://127.0.0.1/v/index.php/File:Logo.png >>
The URL should be wrapped in parentheses, but sometimes it isn't.
Consequently, the value is interpreted as a Name (because of the leading "/"),
and the resulting object is `{name: "v/index.php/File:Logo.png" }`. Obviously,
this is not a string, so `url.indexOf` throws an error here.
2014-01-22 15:09:29 +01:00
Jonas Jenwald
46ba8d10b0
Only check for line dash pattern when annotation has a visible border (bug 957034 followup)
2014-01-22 14:04:55 +01:00
Nicholas Nethercote
0685214a77
Don't create the RGB buffer for images that don't need resizing.
2014-01-19 14:21:36 -08:00
Nicholas Nethercote
c044652320
Remove unneeded srcOffset arguments from createRgbBuffer.
2014-01-16 20:15:37 -08:00
Brendan Dahl
c57fdcceed
Merge pull request #4125 from yurydelendik/issue4111
...
Fixes and refactors log functionality
2014-01-16 10:54:09 -08:00
Yury Delendik
754e000907
Fixes and refactors log functionality
2014-01-15 15:28:31 -06:00
Yury Delendik
a8c11ad1e5
Introduces disableObjectCreateURL
2014-01-10 16:30:41 -06:00
Jonas Jenwald
7c616502c2
Fix annotation border issue (bug 957034)
2014-01-09 13:44:21 +01:00
Yury Delendik
4d01ff4079
Merge pull request #4062 from kkujala/calgray
...
calgray: fix getRgbBuffer problem
2014-01-07 10:54:09 -08:00
Yury Delendik
5bf3e44e30
Introduces LegacyPromise; polyfills DOM Promise
2014-01-03 18:17:05 -06:00
Brendan Dahl
2228343f77
Only trigger warning bar on certain unsupported features.
2014-01-03 09:34:13 -08:00