Commit Graph

8057 Commits

Author SHA1 Message Date
Jonas Jenwald
7cb62089ad Fix a typo causing a TypeError when attempting to call pdfHistory_clearHistoryState (issue 6121)
Fixes 6121.

Note: This "regressed" in PR 5823.
2015-06-16 13:16:12 +02:00
Tim van der Meij
d7e6490c44 Merge pull request #6114 from Snuffleupagus/issue-6113
Ensure that the result of |constructStichedFromIRResult| is a number (issue 6113)
2015-06-15 22:34:54 +02:00
Jonas Jenwald
60fbb5ef69 Ensure that the result of |constructStichedFromIRResult| is a number (issue 6113)
Fixes 6113.
2015-06-14 23:29:38 +02:00
Tim van der Meij
c8fd9c8c06 Merge pull request #6112 from Snuffleupagus/iccbased-alternate
Use the Alternate entry, if it exists, in ICCBased Colour Space dictionaries (issue 5836, issue 5939, issue 6055)
2015-06-14 19:23:22 +02:00
Jonas Jenwald
bc5e43b45c Use the Alternate entry, if it exists, in ICCBased Colour Space dictionaries (issue 5836, issue 5939, issue 6055)
Fixes 5836.
Fixes 5939.
Fixes 6055.
2015-06-14 12:10:22 +02:00
Jonas Jenwald
bf20334bea Merge pull request #6090 from Snuffleupagus/issue-6068
Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
2015-06-13 00:29:08 +02:00
Yury Delendik
0259448e13 Merge pull request #6091 from Snuffleupagus/bolder-ArialBlack
Increase the font weight used for non-embedded ArialBlack fonts
2015-06-12 10:25:53 -05:00
Tim van der Meij
fda6c18644 Merge pull request #6093 from Snuffleupagus/slightly-improved-crypto-unittests
Slightly improved Crypto unit tests
2015-06-10 00:32:35 +02:00
Jonas Jenwald
f59e20226c Slightly improved Crypto unit tests
Currently in the tests which check that incorrect passwords are rejected, we don't ensure that the exceptions thrown are the ones we expect. This patch improves the current situation, so that we actually can be sure that the code "fails" in the correct way.

*Note:* This patch also fixes some cases of weird indentation in the file.
2015-06-10 00:21:40 +02:00
Tim van der Meij
cbc7a0b178 Merge pull request #6101 from Snuffleupagus/issue-6099-test
Add a test-case for issue 6099 - CalRGB color space where the parameters are a |Ref|
2015-06-10 00:14:00 +02:00
Tim van der Meij
5a6ab1502b Merge pull request #6076 from LilyBin/button-fix
Apply padding on <select>, not the button
2015-06-09 23:43:40 +02:00
Brendan Dahl
c205b809a5 Merge pull request #5998 from Snuffleupagus/issue-5994
Don't map glyphs to certain problematic Thai/Lao Unicode locations (issue 5994)
2015-06-09 10:37:52 -07:00
Yury Delendik
4983c7b3db Merge pull request #6089 from Rob--W/README-crx-not-experimental
Update README (Chrome & Opera section)
2015-06-09 12:12:21 -05:00
Jonas Jenwald
97385587a8 Add a test-case for issue 6099 - CalRGB color space where the parameters are a |Ref|
The issue is already fixed by PR 5748, but we didn't have access to a suitable test-case. Thanks to issue 6099, we are now able to add one!
2015-06-09 17:52:36 +02:00
Jonas Jenwald
a64536901a Increase the font weight used for non-embedded ArialBlack fonts
Currently non-embedded ArialBlack fonts are not rendered bold enough, compared to e.g. Adobe Reader.
The issue is that we set the font weight to `bolder`, but since that is actually relative to the font weight of the parent, the result is that there's no practical difference from just using `bold`.

This patch attempts to address that, by explicitly setting the font weight to the maximum value instead (see https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight).

*Note:* I expect one test "failure" in `issue5801`, which in this case is an improvement, since that PDF file uses ArialBlack.
2015-06-06 21:29:41 +02:00
Jonas Jenwald
5eae3e29c5 Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
Fixes 6068.

The most notable issue with the font in question is that the `differences` array contains lots of strange entries (of the type `uniXXXX`, instead of proper glyph names).
2015-06-06 18:28:16 +02:00
Rob Wu
91a5825b23 Update README (Chrome & Opera section)
The Chrome extension is stable and has been around for a few years, so
the ancient note about the extension being experimental can be removed.
Also be a bit more specific about who maintains the Chrome extension,
to make it easier for external contributors to find who is responsible
for the development and maintenance of the PDF.js Chrome extension.
2015-06-06 16:05:00 +02:00
Jonas Jenwald
f943b290e6 Merge pull request #6088 from Rob--W/issue-6083
Check availability of canvas & PDF before printing
2015-06-06 13:58:34 +02:00
Rob Wu
f4ba0e342e Check availability of canvas & PDF before printing 2015-06-05 23:55:08 +02:00
Jonas Jenwald
6f2f0700b7 Don't map glyphs to certain problematic Thai/Lao Unicode locations (issue 5994)
*This patch depends on PR 5990.*

According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#38, certain Thai/Lao characters are treated as special by the font shaping code in Firefox.
Further down in that file, https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#216, the vertical position of glyphs is modified, which should thus explain why some glyphs end up in the wrong position in the PDF file.

Fixes 5994.
2015-06-05 23:53:22 +02:00
Brendan Dahl
749a60a0b7 Merge pull request #5990 from Snuffleupagus/missing-glyphs-identityUnicode
Skip mapping of CIDFontType2 glyphs in fonts with a |IdentityToUnicodeMap|, unless |properties.widths| is defined for the glyph
2015-06-05 14:50:02 -07:00
Rob Wu
8aa1c8102e Merge pull request #5823 from Rob--W/preserve-http-referer
[Chrome extension] Add Referer request header if needed
2015-06-05 23:34:49 +02:00
Rob Wu
adb2f8ae21 [CRX] Add Referer request header if needed
This patch adds the Referer request header to PDF requests if
the original PDF request included the Referer header.
2015-06-05 23:24:40 +02:00
Jonas Jenwald
d95b4e475e Merge pull request #6082 from Snuffleupagus/issue-6081
Fetch parameters if they are |Ref|s in Pattern color spaces (issue 6081)
2015-06-04 23:05:39 +02:00
Jonas Jenwald
64e1fb99fe Fetch parameters if they are |Ref|s in Pattern color spaces (issue 6081)
Fixes 6081.
2015-06-04 22:01:01 +02:00
Yury Delendik
6203dcd292 Merge pull request #6080 from Snuffleupagus/issue-6079
Ensure that PDFHistory does not incorrectly replace the initial document hash (issue 6079)
2015-06-04 07:20:44 -05:00
Jonas Jenwald
27713f9454 Ensure that PDFHistory does not incorrectly replace the initial document hash (issue 6079)
This is fallout from PR 5971; fixes 6079.
2015-06-04 13:58:45 +02:00
Timothy Gu
099f99d6ad Apply padding on <select> and not the button 2015-06-03 12:16:12 -07:00
Yury Delendik
82c5cf6617 Merge pull request #6062 from Snuffleupagus/revert-parse-all-jpegs
Revert PR 6024 "[Firefox] Parse all JPEG images in the addon", since it's fixed upstream
2015-06-01 07:43:18 -05:00
Yury Delendik
5c3c516c30 Merge pull request #6065 from Snuffleupagus/issue-5954-2
Always traverse the entire parent chain in Page_getInheritedPageProp (issue 5954)
2015-05-30 08:34:55 -05:00
Jonas Jenwald
a28ed7c834 Always traverse the entire parent chain in Page_getInheritedPageProp (issue 5954)
This enables us to find resources placed on multiple levels of the tree.

Fixes 5954.
2015-05-30 12:21:05 +02:00
Yury Delendik
d3fa65e019 Merge pull request #6063 from Snuffleupagus/pdfLinkService-optional-history
Tweak the PDFLinkService a bit
2015-05-29 13:16:30 -05:00
Jonas Jenwald
3d9a8022ce Fix a couple of function names in error messages in PDFLinkService 2015-05-29 13:47:28 +02:00
Jonas Jenwald
20881dc99a Make PDFHistory optional in PDFLinkService
Currently `PDFLinkService` requires access to a `PDFHistory` instance in order for it to work correctly (and to avoid errors). If we want `PDFLinkService` to be more useful in custom viewers, I don't think that we actually want to force it to have a `PDFHistory` instance.
Hence this patch, which contains a very simply approach to make `PDFHistory` optional.
2015-05-29 13:37:28 +02:00
Jonas Jenwald
a1743d9952 Revert PR 6024 "[Firefox] Parse all JPEG images in the addon", since it's fixed upstream 2015-05-29 12:58:17 +02:00
Jonas Jenwald
189ef974b1 Merge pull request #5971 from yurydelendik/refact-hist-link
Extracts PDFLinkService and PDFHistory APIs
2015-05-29 12:38:01 +02:00
Yury Delendik
d105734686 Merge pull request #6046 from AppShuttle/pdf-version-fix
Extract correct PDF format version from the catalog
2015-05-27 08:50:20 -05:00
Yury Delendik
c7756d5f96 Merge pull request #6051 from Snuffleupagus/esr-31-find
[Firefox] Re-add _getTabForBrowser compatibility hack for the addon
2015-05-27 08:15:25 -05:00
Yury Delendik
95bd84148a Merge pull request #6054 from Snuffleupagus/bug-1167053
[Firefox] Fix newChannel/asyncFetch fallout from bug 1167053
2015-05-27 08:12:11 -05:00
Jonas Jenwald
5743b4f558 [Firefox] Fix newChannel/asyncFetch fallout from bug 1167053
For some reason, https://bugzilla.mozilla.org/show_bug.cgi?id=1167053 changed methods of `NetUtil` yet *again*. This patch thus attempts to handle those changes, while keeping the addon backwards compatible.

I've tested this using all current Firefox versions (Nightly, Aurora/DevEdition, Beta, Release, ESR), and things still appears to work correctly.
2015-05-27 13:43:17 +02:00
Jonas Jenwald
39d2103063 Merge pull request #6021 from timvandermeij/test-driver
Refactor the test driver
2015-05-26 21:01:13 +02:00
Jonas Jenwald
c82fa16dd2 [Firefox] Re-add _getTabForBrowser compatibility hack for the addon
This should enable Find to work again in the current ESR version (31).
2015-05-26 18:12:17 +02:00
Mike Corbin
4c9b65f0e1 Extract correct PDF format version from the catalog
The 'Version' field of the most recent document catalog, if present, is
intended to supersede the value in the file prologue.

This is significant for incrementally-built PDF documents and generators that
emit a low version in the prologue and later apply a format version based on
PDF features used, such as Apple's CoreGraphics/Quartz PDF backend.

Fixes the internal version variable, as well as the PDFFormatVersion reported
by the API and consumed by viewers.
2015-05-26 01:56:09 +01:00
Tim van der Meij
e02ab9fb79 Implement an option to disable automatic scrolling
This adds a checkbox with which one can disable scrolling, for example to look back at output during testing. Note that the styles are inline because the test runner removes all <style> elements for each test.
2015-05-21 20:19:36 +02:00
Tim van der Meij
07ec736eb9 Improve driver code structure
- Improve variable names and move variables to the top of the method
- Use constants where possible
- Only print the delay text if there is an atual delay set
- Simplify continuation logic in _nextTask
- Do not pass anything to clearCanvas: we can get the context from this.canvas there.
- Remove innerHTML and replace it with textContent. Add a comment why insertAdjancentHTML is so important for performance and runtime.
- Merge _quit and _sendQuitRequest.
2015-05-21 20:19:32 +02:00
Tim van der Meij
ae8748edfb Refactor test driver to be more class-like
- Extract NullTextLayerBuilder and SimpleTextLayerBuilder from the driver code and create classes for them.
- Move options to the constructor and pass in HTML elements instead of getting them in the driver.
- Remove unused masterMode variable.
- Minor method name updates.

The rest is only moving/indenting existing code and adding 'this'.
2015-05-21 20:19:02 +02:00
Tim van der Meij
82536f8fa6 Merge pull request #6025 from mcorb/retina-thumbnails
viewer: Support Retina/HiDPI thumbnails
2015-05-19 21:38:45 +02:00
Yury Delendik
b5de3dcea5 Updates l10n files. 2015-05-19 07:36:01 -05:00
Yury Delendik
5043ba7e65 Fixes bower version confusion (see #6033) 2015-05-19 07:18:24 -05:00
Brendan Dahl
46f06b47a3 Merge pull request #6026 from mcorb/disable-transitions
Eliminate transition effects from thumbnail loader
2015-05-18 16:03:08 -07:00