Commit Graph

8940 Commits

Author SHA1 Message Date
Tim van der Meij
223adf4656 Merge pull request #7481 from Snuffleupagus/firefox-addon-remove-compatibility
[Firefox addon] Remove compatibility.js
2016-07-09 20:45:46 +02:00
Tim van der Meij
bd562bb39c Merge pull request #7480 from Snuffleupagus/remove-MozBlobBuilder-fallback
Remove the obsolete `MozBlobBuilder` fallback from the `createBlob` utility function
2016-07-09 20:40:24 +02:00
Jonas Jenwald
a69e862bc4 [Firefox addon] Remove compatibility.js
This was added in PR 4865, but hasn't been necessary for quite some time now (and the minimum version is currently Firefox 38 for the addon).
2016-07-09 17:59:06 +02:00
Jonas Jenwald
8f4ec669d0 Remove the obsolete MozBlobBuilder fallback from the createBlob utility function
`MozBlobBuilder` has been obsolete since Firefox 14, so there's no reason to keep this code around anymore.
2016-07-09 16:37:05 +02:00
Tim van der Meij
43613f19f9 Merge pull request #7466 from Snuffleupagus/PDFViewerApplication-open-remove-fallback-args
Remove handling of fallback arguments from `PDFViewerApplication.open`
2016-07-09 15:51:25 +02:00
Tim van der Meij
d728651455 Merge pull request #7479 from Snuffleupagus/recoverGlyphName-warn-to-info
Change the `warn` to `info` in `recoverGlyphName` to reduce the console spam
2016-07-09 15:34:59 +02:00
Jonas Jenwald
51e46fa1a7 Change the warn to info in recoverGlyphName to reduce the console spam
After PR 7441, where `recoverGlyphName` is used a lot more than before, many PDF files will generate a lot of warnings the console. For normal usage, compared to debugging/development, this is probably more annoying than helpful.
2016-07-09 12:08:41 +02:00
Yury Delendik
bca1aebeac Merge pull request #7458 from Snuffleupagus/updateUIToolbar
Consolidate updating of various Toolbar state (e.g. page and scale) in one method in `PDFViewerApplication`
2016-07-08 12:34:39 -05:00
Yury Delendik
b87676078c Merge pull request #7455 from Snuffleupagus/issue-7448
Ensure that the necessary src/* dependencies are loaded before the viewer, when it's run with `gulp server` (issue 7448)
2016-07-08 12:34:09 -05:00
Tim van der Meij
b6826a46a8 Merge pull request #7453 from simoncpu/master
Expose the text widget's maximum length.
2016-07-07 01:03:40 +02:00
Tim van der Meij
10cd37cfb2 Merge pull request #7473 from Snuffleupagus/links-mxr-to-dxr
Update `mxr.mozilla.org` links to point to `dxr.mozilla.org` instead
2016-07-06 22:26:38 +02:00
Brendan Dahl
1f3f4a8dd7 Merge pull request #7441 from Snuffleupagus/issue-7439
Fallback to attempt to recover standard glyph names when amending the `charCodeToGlyphId` with entries from the `differences` array in `type1FontGlyphMapping` (issue 7439)
2016-07-06 13:02:21 -07:00
Jonas Jenwald
87229a086f Update mxr.mozilla.org links to point to dxr.mozilla.org instead
Given that MXR has been officially retired, see https://groups.google.com/forum/#!topic/mozilla.dev.platform/_k-ditFrne4, we've got a couple of links that are no longer working.
2016-07-06 11:42:16 +02:00
Tim van der Meij
b9e903808f Merge pull request #7467 from Snuffleupagus/getAttachments-unit-test
Add a `getAttachments` unit-test for a PDF file that actually contains attachments
2016-07-04 20:33:56 +02:00
Jonas Jenwald
72c1df726e Add a getAttachments unit-test for a PDF file that actually contains attachments 2016-07-02 13:13:30 +02:00
Jonas Jenwald
cb6a7e5503 Remove handling of fallback arguments from PDFViewerApplication.open
The method signature was improved in PR 6546, which was included in the `1.2.109` release from last November.
Hence I think that we should now be able to remove the fallback code for the old method signature. Note that this patch now throws an `Error` in `GENERIC` builds, to clearly indicate that the `open` callsite must be modified.
2016-07-02 11:31:32 +02:00
Yury Delendik
f082407ab4 Merge pull request #7463 from Snuffleupagus/fix-bug-1268749-fallout
Add back moz-specific fullscreen support code for ´MOZCENTRAL` builds (bug 1268749, PR 7273 follow-up)
2016-07-01 08:09:08 -05:00
Jonas Jenwald
2f127df97b Add back moz-specific fullscreen support code for ´MOZCENTRAL` builds (bug 1268749, PR 7273 follow-up)
In PR 7273, we simplified the `MOZCENTRAL` specific check for fullscreen support. Unfortunately I've just, by coincidence, found out about https://bugzilla.mozilla.org/show_bug.cgi?id=1268749, which disabled the unprefixed fullscreen support in release versions of Firefox. If we do nothing, this will lead to Presentation Mode being unavailable in future Firefox releases.

This patch should fix things for now, and I'm afraid that we'll need to uplift it to Firefox 49 as well.
2016-07-01 14:11:58 +02:00
Yury Delendik
3cba2cb258 Fixes SeaMonkey version 2016-06-29 17:54:11 -05:00
Brendan Dahl
e2e657e44f Merge pull request #7390 from Snuffleupagus/issue-7180
Add upper-case `I` as a possible space replacement fallback in `Font.spaceWidth` to improve text-selection (issue 7180)
2016-06-29 15:11:19 -07:00
Jonas Jenwald
dd0fe10a52 Consolidate updating of various Toolbar state (e.g. page and scale) in one method in PDFViewerApplication
With the changes in PR 7289, we no longer dispatch a 'pagechanging' event on load. Since most PDF documents open on the first page, this means that the `previous` and `firstPage` buttons are no longer correctly disabled.
To avoid this, this patch moves the code that updates various UI toolbar state into one method, which is then called on document initialization and from the various existing event handling functions.
2016-06-29 22:36:45 +02:00
Jonas Jenwald
4342993a3f Ensure that the necessary src/* dependencies are loaded before the viewer, when it's run with gulp server (issue 7448)
Fixes 7448.
2016-06-29 15:19:28 +02:00
Simon Cornelius P. Umacob
d872fc90b9 Expose the text widget's maximum length. 2016-06-29 17:04:33 +08:00
Jonas Jenwald
7866109af9 Fallback to attempt to recover standard glyph names when amending the charCodeToGlyphId with entries from the differences array in type1FontGlyphMapping (issue 7439)
Fixes 7439.
2016-06-25 14:54:34 +02:00
Tim van der Meij
e908b71309 Merge pull request #7438 from Snuffleupagus/README-addon-compat
Update README.md to only guarantee Firefox addon compatibility with the current ESR version
2016-06-25 14:10:39 +02:00
Jonas Jenwald
3b9042034b Update README.md to only guarantee Firefox addon compatibility with the current ESR version
To reduced the amount of compatibility code that we need to maintain in the addon, I think that we should be more explicit about which Firefox versions we intend to support. In the future, this should allow us to more quickly remove old compatibility code.
Furthermore, this patch also tries to be more explicit about the addon support for Seamonkey, by defining it in terms of the underlying Firefox version.
2016-06-25 08:59:59 +02:00
Yury Delendik
671f33a324 Merge pull request #7427 from Snuffleupagus/fonts-skip-mapping-ideographic-space
Skip mapping of glyphs to Unicode "Ideographic space" (issue 7416)
2016-06-24 10:57:55 -05:00
Yury Delendik
546e22397e Merge pull request #7437 from Snuffleupagus/addon-seamonkey-compat
[Firefox addon] Feature detect `originAttributes` to make it Seamonkey 2.40 compatible
2016-06-24 10:25:49 -05:00
Jonas Jenwald
9fbde18880 [Firefox addon] Feature detect originAttributes to make it Seamonkey 2.40 compatible
Fixes 7245.
2016-06-24 17:05:53 +02:00
Yury Delendik
98d9712308 Merge pull request #7409 from Snuffleupagus/upstream-bug-1242730
Upstream the changes from Bug 1242730 - Convert callsites to use channel.async0pen2() within browser/extensions/pdfjs (issue 7386)
2016-06-24 09:49:56 -05:00
Jonas Jenwald
2d8ed7ba18 Merge pull request #7430 from Rob--W/crx-rewrite-url-asap
Move Chromium URL rewrite to top of viewer.js
2016-06-24 09:05:12 +02:00
Rob Wu
de85278537 Move Chromium URL rewrite to top of viewer.js
Move the Chromium-specific URL rewriting code to the top of viewer.js
(before the PDF.js library) to make sure that the URL is as expected.

This ensures that variables that synchronously depends on the URL
(e.g. PDFViewerApplication.initialBookmark) are properly set.
2016-06-24 00:57:30 +02:00
Tim van der Meij
9a948f3190 Merge pull request #7428 from Snuffleupagus/importl10n-use-hg.mozilla.org
Unbreak the `importl10n` command by updating the links to point to hg.mozilla.org instead of mxr
2016-06-22 20:26:14 +02:00
Jonas Jenwald
2e42c19202 Update l10n files 2016-06-22 09:41:18 +02:00
Jonas Jenwald
bd0affab9c Unbreak the importl10n command by updating the links to point to hg.mozilla.org instead of mxr
Currently `importl10n` fails, since mxr.mozilla.org has been down for a while. Based on discussions in #developers, it isn't clear to me if/when it'll be available again.
Furthermore, I'm not sure why we're even getting the l10n files through a code search tool, rather than just using the official Mozilla repository directly.
2016-06-22 09:41:11 +02:00
Jonas Jenwald
c1ca268ef3 Skip mapping of glyphs to Unicode "Ideographic space" (issue 7416)
Fixes 7416, which is an IE specific issue.
2016-06-22 08:58:00 +02:00
Jonas Jenwald
6d7f6f1b86 Upstream the changes from Bug 1242730 - Convert callsites to use channel.async0pen2() within browser/extensions/pdfjs (issue 7386)
Please see https://bugzilla.mozilla.org/show_bug.cgi?id=1242730.

Fixes 7386.
2016-06-15 14:50:56 +02:00
Yury Delendik
a0a6e6d688 Merge pull request #7400 from Snuffleupagus/addon-minimum-firefox38
[Firefox addon] Change the minimum supported version to Firefox 38 and remove a bunch old no longer necessary fallback code
2016-06-15 13:27:33 +01:00
Jonas Jenwald
d3d3bb9695 [Firefox addon] Change the minimum supported version to Firefox 38 and remove a bunch old no longer necessary fallback code
From the discussion in issue 7386, it wasn't really clear if we can restrict addon support to Firefox `45` (i.e. the version that corresponds to the *current* ESR version).

However, we have a bunch of code for *very* old Firefox versions. Hence this patch changes the minimum supported version to Firefox `38` (which was released on `2015-05-12`, and correspond to the *previous* ESR version), and removes code that only applies to old Firefox versions.

Regardless what we end up deciding regarding addon support for previous Firefox versions, given the amount of code that even the Firefox `>= 38` condition lets us remove, I certainly think that there is value in doing this.
2016-06-15 09:54:41 +02:00
Jonas Jenwald
64a409b539 Merge pull request #7404 from Rob--W/crx-pdf-embed-object-fix-1
Force inline block display style for <object>.
2016-06-11 16:34:39 +02:00
Rob Wu
08ad551a01 Force inline block display style for <object>.
Test:
1. Build the Chrome extension and load it.
2. Visit https://robwu.nl/pdfjs/object-embed.html
3. Verify that all displayed blocks have the same width and
   height as the reference ("Expected dimension").
2016-06-11 15:54:16 +02:00
Tim van der Meij
f97d52182a Merge pull request #7341 from Snuffleupagus/getDestinationHash-Array
[api-minor] Improve handling of links that are using explicit destination arrays
2016-06-09 00:29:10 +02:00
Tim van der Meij
70b3eea4a3 Merge pull request #7389 from Snuffleupagus/move-isSpace
Move the `isSpace` utility function from core/parser.js to shared/util.js
2016-06-08 22:57:45 +02:00
Jonas Jenwald
6a0b047bfa Add upper-case I as a possible space replacement fallback in Font.spaceWidth to improve text-selection (issue 7180)
In fonts with only upper-case glyphs, that are also missing a space glyph, `get spaceWidth` won't be able to return anything useful.
By adding upper-case `I` as a fallback, we can thus improve text-selection in some PDF files.
Note that locally, the patch causes slight movement in a few existing `text` tests, but in my opinion this actually looks like slight improvements.

Fixes 7180.
2016-06-07 22:55:25 +02:00
Brendan Dahl
c4db4dd4ac Merge pull request #7361 from Snuffleupagus/bug-1146106
Attempt to recover valid `format 3` FDSelect data from broken CFF fonts (bug 1146106)
2016-06-07 11:47:51 -07:00
Jonas Jenwald
6260fc09a3 Attempt to recover valid format 3 FDSelect data from broken CFF fonts (bug 1146106)
According to the CFF specification, see http://partners.adobe.com/public/developer/en/font/5176.CFF.pdf#G3.46884, for `format 3` FDSelect data: "The first range must have a ‘first’ GID of 0".
Since the PDF file (attached in the bug) violates that part of the specification, this patch tries to recover valid FDSelect data to prevent OTS from rejecting the font.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1146106.
2016-06-06 18:20:52 +02:00
Jonas Jenwald
a36a946976 Move the isSpace utility function from core/parser.js to shared/util.js
Currently the `isSpace` utility function is a member of `Lexer`, which seems suboptimal, given that it's placed in `core/parser.js`. In practice, this means that in a number of `core/*.js` files we thus have an *otherwise* completely unnecessary dependency on `core/parser.js` for a one-line function.

Instead, this patch moves `isSpace` into `shared/util.js` which seems more appropriate for this kind of utility function. Not to mention that since all the affected `core/*.js` files already depends on `shared/util.js`, this doesn't incur any more file dependencies.
2016-06-06 09:11:33 +02:00
Rob Wu
bd47440e79 Merge pull request #7388 from Rob--W/crx-telemetry-7312-typo
Fix typo in telemetry.js, follow-up to #7370
2016-06-03 23:29:20 +02:00
Rob Wu
60438399e0 Fix typo in telemetry.js, follow-up to #7370 2016-06-03 23:28:01 +02:00
Yury Delendik
f0585f5d65 Merge pull request #7370 from Rob--W/crx-telemetry-7312
Add opt-out telemetry to the Chrome extension
2016-06-03 15:48:46 -05:00