Commit Graph

7916 Commits

Author SHA1 Message Date
Jonas Jenwald
fa0f09bcf0 Merge pull request #5771 from timvandermeij/unused-util
Remove unused isNull utility function
2015-03-02 23:21:09 +01:00
Jonas Jenwald
43e6de7e38 Merge pull request #5680 from Rob--W/forget-showPreviousViewOnLoad
Reset state upon load if showPreviousViewOnLoad
2015-03-02 21:49:34 +01:00
Rob Wu
6a16d7dd44 Reset state upon load if showPreviousViewOnLoad
And moved showPreviousViewOnLoad up to PDFViewerApplication.initialize
2015-03-02 21:35:44 +01:00
fkaelberer
a78bb6b946 Use binary search in getVisibleElements() 2015-03-01 17:41:20 +01:00
Tim van der Meij
026b57641f Remove unused isNull utility function 2015-02-28 18:50:58 +01:00
Tim van der Meij
a033b4bf3d Merge pull request #5769 from dumyan/findcontroller-nbsp
nbsp normalization
2015-02-28 14:50:25 +01:00
Jonas Jenwald
f81fc9091a Correctly detect OpenType font files with CFF data
Fixes 5334.
Fixes 215.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1125614.

According to the specification, http://www.microsoft.com/typography/otspec/otff.htm, OpenType font files with CFF data should have `OTTO` in the header.
2015-02-28 13:43:53 +01:00
Jonas Jenwald
00ee6bd6b6 Merge pull request #5693 from collinanderson/whitespace
cleaned whitespace
2015-02-28 10:09:21 +01:00
Damjan Velickovski
29290f3277 added nbsp normalization 2015-02-28 02:57:08 +01:00
Yury Delendik
4c2640dcf0 Merge pull request #5758 from mjlyons/ext-link-new-window
Add option to open external links in new window
2015-02-27 10:49:39 -06:00
Yury Delendik
ce122591b9 Merge pull request #5586 from fkaelberer/updateThumbnailClassesOnlyWhenVisible
Update thumbnails only when they are visible (to improve scrolling through large documents)
2015-02-27 06:56:32 -06:00
Yury Delendik
6ead5c4731 Merge pull request #5711 from Snuffleupagus/deprecate-el-property
Remove the |el| property in PDFPageView and PDFThumbnailView
2015-02-27 06:39:00 -06:00
Yury Delendik
2e14cc70cc Merge pull request #5731 from Snuffleupagus/issue-5331
Skip fill bytes (0xFF) when decoding JPEG images (issue 5331)
2015-02-27 06:36:30 -06:00
Yury Delendik
a0a94344d7 Merge pull request #5721 from Snuffleupagus/move-findController-resolveFirstPage
Move the call to |PDFFindController.resolveFirstPage| into PDFViewer
2015-02-27 06:33:15 -06:00
Yury Delendik
fac79aba64 Merge pull request #5744 from Snuffleupagus/reset-auto-zoom-regression
Fix regression that prevents resetting the zoom level to "Automatic" when using the |Ctrl + 0| keys
2015-02-27 06:30:17 -06:00
Yury Delendik
23916b2b14 Merge pull request #5748 from Snuffleupagus/issue-5747
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
2015-02-26 17:44:46 -06:00
Yury Delendik
ec7bab651b Import L10n files. 2015-02-26 17:41:03 -06:00
Yury Delendik
3b29286cb0 Merge pull request #5763 from yurydelendik/version-1.0.1149
Update to version 1.0.1149
2015-02-26 17:36:14 -06:00
Yury Delendik
5bb61bd801 Update to version 1.0.1149 2015-02-26 17:34:43 -06:00
Jonas Jenwald
eed67ea8bb Remove the |el| property in PDFPageView and PDFThumbnailView 2015-02-27 00:26:02 +01:00
Jonas Jenwald
0a3341dadc Don't map glyphs to Unicode "Dotted circle" combining mark (bug 1108301)
It seems that `0x25CC` is another bad spot for charCodes.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1108301.
2015-02-27 00:20:38 +01:00
Mike Lyons
d271811740 Add option to open external links in new window 2015-02-26 13:34:08 -05:00
Jonas Jenwald
888cbe0bde Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644) 2015-02-22 17:42:15 +01:00
Brendan Dahl
bc7a110743 Merge pull request #5743 from Snuffleupagus/pr-5703-followup
Only skip the |!isSymbolicFont| check for TrueType (3, 1) cmap tables if no previous cmap table was found (PR 5703 followup)
2015-02-20 13:53:51 -08:00
Jonas Jenwald
7c8996558a Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747) 2015-02-20 12:53:02 +01:00
Jonas Jenwald
a495ab0d13 Fix regression that prevents resetting the zoom level to "Automatic" when using the |Ctrl + 0| keys 2015-02-19 17:37:02 +01:00
Jonas Jenwald
417800a1b5 Only skip the |!isSymbolicFont| check for TrueType (3, 1) cmap tables if no previous cmap table was found (PR 5703 followup)
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=894572.
2015-02-19 13:58:03 +01:00
Brendan Dahl
6bb0a483b1 Merge pull request #5703 from Snuffleupagus/issue-5701
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
2015-02-18 14:50:19 -08:00
Collin Anderson
54e984c763 cleaned whitespace 2015-02-17 11:07:37 -05:00
Jonas Jenwald
76a24d8a5b Merge pull request #5729 from timvandermeij/ccitt-bytealign
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
2015-02-16 18:11:23 +01:00
Hengjie
109d67691c Lower threshold
Fixes text selection formatting with https://github.com/vortext/vortext/blob/master/resources/public/examples/TestDocument3.pdf
2015-02-13 22:27:49 -08:00
Jonas Jenwald
3651c9e1f7 Skip fill bytes (0xFF) when decoding JPEG images (issue 5331) 2015-02-14 00:08:43 +01:00
Tim van der Meij
27e3558a41 Fix CCITTStream regression by byte-aligning rows before checking EOL marker 2015-02-13 21:29:00 +01:00
Jonas Jenwald
592890a758 Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701) 2015-02-13 01:03:10 +01:00
Jonas Jenwald
8614c17c1d Merge pull request #5717 from timvandermeij/testcase-5567
Test case for issue 5567
2015-02-13 00:39:52 +01:00
Brendan Dahl
394b38b22f Merge pull request #5651 from Snuffleupagus/missing-glyphs
Try to skip mapping of missing TrueType and CIDFontType2 glyphs
2015-02-11 19:31:22 -08:00
Brendan Dahl
fb8200096b Merge pull request #5634 from Snuffleupagus/cmap-0,0
Add support for TrueType (0, 0) cmap tables (issue 5501, issue 5574, and bug 1037973)
2015-02-11 15:04:03 -08:00
Jonas Jenwald
8131440f9e Move the call to |PDFFindController.resolveFirstPage| into PDFViewer
From reading IRC scrollback, it became clear that having to manually call `PDFFindController.resolveFirstPage` in order for the find functionality to work isn't particulary good. Hence this PR, which moves that code into `PDFViewer.setDocument` to make life easier for third-party implementations.
2015-02-11 14:22:24 +01:00
Tim van der Meij
d124fc5e08 Test case for issue 5567 2015-02-10 00:16:54 +01:00
Jonas Jenwald
f19a1db414 Create a IdentityToUnicodeMap in evaluator.js when toUnicode contains IdentityH/IdentityV
Currently if a font contains a `toUnicode` entry, we always create a new `ToUnicodeMap` in evaluator.js. This is done even for `IdentityV/IdentityH`, despite to possibility to use the much more compact `IdentityToUnicodeMap` representation.
This patch refactors the `IdentityH/IdentityV` cases, to:
 - Avoid calling `IdentityCMap.getMap`, since this prevents allocating and iterating through an array with 65536 elements.

 - Ensure that the handling of `toUnicode` is actually correct in fonts.js.
We rely on `toUnicode instanceof IdentityToUnicodeMap` in a few places, and currently this does not work correctly for `IdentityH/IdentityV`.
2015-02-09 16:52:31 +01:00
Jonas Jenwald
01e6565dd4 Try to skip mapping of missing TrueType glyphs
Also don't skip mapping of glyphs which are empty, if the corresponding charCode is included in toUnicode.
2015-02-07 12:19:38 +01:00
Jonas Jenwald
8174da61fb Don't skip mapping of glyphs for CIDFontType2 fonts with a CIDToGIDMap
Also don't skip mapping of glyphs which are empty, if the corresponding charCode is included in toUnicode.
2015-02-07 12:19:37 +01:00
Brendan Dahl
cb27707277 Try to skip mapping of missing glyphs. 2015-02-07 12:19:37 +01:00
Tim van der Meij
ccf05c7a41 Merge pull request #5691 from Snuffleupagus/viewer-shadow
Use the |shadow| function from src/shared/util.js in viewer.js
2015-02-02 22:59:19 +01:00
Rob Wu
ac5a8bcdda [l10n] Treat language as case-insensitive
See "Case-insensitive language comparisons per RFC 4646"
https://github.com/fabi1cazenave/webL10n/pull/51

Removed the "patch" in compatibility.js and fixed the bug in webL10n,
because the logic belongs to webL10n instead of PDF.js.
The immediate motivation for this patch is that Chrome 40 converts
navigator.language to lower case: https://crbug.com/454331
2015-02-02 22:02:18 +01:00
Jonas Jenwald
d53fa1884b Simplify a couple of preprocessor tags in viewer.js 2015-01-31 22:45:20 +01:00
Jonas Jenwald
bb16475070 Use the |shadow| function from src/shared/util.js in viewer.js 2015-01-31 22:43:30 +01:00
Jonas Jenwald
294c4a86af Merge pull request #5684 from timvandermeij/link-annotation-bug
Make sure that an A entry in an annotation dictionary is also a dictionary itself
2015-01-31 13:12:10 +01:00
Tim van der Meij
06004d6a92 Make sure that an A entry in an annotation dictionary is also a dictionary itself 2015-01-29 13:21:18 +01:00
Jonas Jenwald
e4f0ae24ac Merge pull request #5678 from timvandermeij/pdf_attachment_view
Refactor the attachment code
2015-01-28 22:59:40 +01:00