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
Tim van der Meij
b72395d5ce
Determine filename only once and reduce code for _bindLink
2015-01-28 20:53:03 +01:00
Tim van der Meij
818b7fc306
Add JSDoc comments to PDFAttachmentView
2015-01-28 20:53:02 +01:00
Tim van der Meij
4c6ca1c78f
Remove DownloadManager dependency
...
We can pass it in using the options object. Note that that this also avoids creating a DownloadManager object for each separate link (instead, having only one is enough).
2015-01-28 20:53:01 +01:00
Tim van der Meij
733882ac25
Refactor PDFAttachmentView to be more class-like and to separate functionality into methods
2015-01-28 20:53:00 +01:00
Tim van der Meij
609e2a30e9
Rename DocumentAttachmentsView to PDFAttachmentView
2015-01-28 20:52:59 +01:00
Tim van der Meij
2c19d99a2e
Rename document_attachments_view.js to pdf_attachment_view.js
2015-01-28 20:52:22 +01:00
Jonas Jenwald
1b8e44e0d8
Merge pull request #5679 from timvandermeij/pdf_outline_view
...
Refactor the outline code
2015-01-28 15:44:12 +01:00
Tim van der Meij
f4dbc99483
Add JSDoc comments to PDFOutlineView
2015-01-27 23:04:48 +01:00
Tim van der Meij
ea1d37eb0d
Refactor PDFAttachmentView to be more class-like and to separate functionality into methods
2015-01-27 22:51:39 +01:00
Tim van der Meij
b17da309ed
Rename DocumentOutlineView to PDFOutlineView
2015-01-27 22:40:12 +01:00
Tim van der Meij
3eeb571425
Rename document_outline_view.js to pdf_outline_view.js
2015-01-27 22:38:45 +01:00
fkaelberer
d3022e1e70
Update thumbnail images only when sidebar is visible
2015-01-27 21:13:34 +01:00
fkaelberer
047d61ed1f
Update thumbnail style only when sidebar is visible
2015-01-27 21:08:36 +01:00
Tim van der Meij
a544aed2b0
Merge pull request #5673 from Snuffleupagus/thumbnail-refactor
...
Refactor the thumbnail code
2015-01-26 21:33:32 +01:00
Jonas Jenwald
777d69b52e
Remove dead code from PDFThumbnailView
2015-01-26 20:52:46 +01:00
Jonas Jenwald
b7041f81f4
Enable cancelling of thumbnail drawing
...
This is useful if thumbnails are being rendered when the document is rotated, since it let us abort the current rendering.
2015-01-26 20:52:45 +01:00
Jonas Jenwald
878aa76c15
Refactor PDFThumbnailView to look more similar to PDFPageView
...
This includes an optimization to zero the height and width of existing thumbnail canvases, when they are removed and recreated during rotation of the document. (Credit goes to nnethercote, who initially found this in PR 4920.)
2015-01-26 20:52:45 +01:00
Jonas Jenwald
7f8f404536
Rename ThumbnailView to PDFThumbnailView and refactor it to be more class-like
2015-01-26 20:52:44 +01:00
Tim van der Meij
40f9f771c0
Merge pull request #5669 from fkaelberer/avoidOutOfRangeArrayAccessInJbig2Decoder
...
Avoid out of range array access in JBIG2 decoder
2015-01-26 19:10:07 +01:00
Jonas Jenwald
4294fb18d8
Merge pull request #5675 from timvandermeij/cleanup-gitignore
...
Remove obselete file from .gitignore
2015-01-26 16:52:10 +01:00
Jonas Jenwald
9a8d1ce4fc
Merge pull request #5672 from timvandermeij/remove-b2g-header
...
Remove unused viewer-snippet-b2g-activity-header.html
2015-01-26 16:47:58 +01:00
Tim van der Meij
2524c4dee7
Remove obselete file from .gitignore
2015-01-26 16:44:45 +01:00
Tim van der Meij
5db9ebea19
Merge pull request #5674 from Snuffleupagus/avoid-double-childNodes-in-PDFPageView_reset
...
Avoid getting |childNodes| twice in PDFPageView_reset, by using the variable instead
2015-01-26 16:39:31 +01:00
Jonas Jenwald
4bf308ad54
Merge pull request #5671 from timvandermeij/remove-template
...
Remove unused index.html.template
2015-01-26 13:55:27 +01:00
Jonas Jenwald
8471bb3206
Avoid getting |childNodes| twice in PDFPageView_reset, by using the variable instead
2015-01-26 12:22:09 +01:00
Tim van der Meij
c278d65dfd
Remove unused viewer-snippet-b2g-activity-header.html
2015-01-25 20:55:20 +01:00