Commit Graph

398 Commits

Author SHA1 Message Date
Yury Delendik
c8c211602b Merge pull request #6073 from Snuffleupagus/bug-1170063
[Firefox] Handle the user modifying the "mousewheel.with_meta.action" and "mousewheel.with_control.action" prefs (bug 1170063)
2015-10-30 11:54:04 -05:00
Yury Delendik
59c13b32aa Adds destroy method to the document loading task.
Also renames PDFPageProxy.destroy method to cleanup.
2015-10-23 08:57:14 -05:00
Jonas Jenwald
49389c2d30 Follow-up to PR 6489 - Upstream changes from Bug 1202902
I somehow managed miss including one of the upstream changes in PR 6489; hence this patch. Sorry about the unnecessary churn in this code!
2015-10-05 12:31:53 +02:00
Yury Delendik
82f73dfed5 Merge pull request #6473 from Snuffleupagus/bug-1165272
Upstream the changes from Bug 1165272 - unify Get*CodebasePrincipal with createCodebasePrincipal in nsIScriptSecurityManager
2015-10-01 11:47:12 -05:00
Jonas Jenwald
26ec36ba4c Upstream changes from Bug 1202902 - Give loader scripts and XUL frame scripts a lexical scope that doesn't break everything?
One of the patches in https://bugzilla.mozilla.org/show_bug.cgi?id=1202902, specifically [`Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff)`](https://hg.mozilla.org/mozilla-central/rev/380817d573cd), touches PDF.js code. Unfortunately it was landed upstream without, as far as I can tell, notifying us about it.

This patch uplifts the relevant changes to avoid future merge conflicts, and for consistency also tweaks `PdfJs-stub.jsm`.
2015-10-01 10:03:10 +02:00
Jonas Jenwald
0be1f449ee Upstream the changes from Bug 1165272 - unify Get*CodebasePrincipal with createCodebasePrincipal in nsIScriptSecurityManager
One of the patches in https://bugzilla.mozilla.org/show_bug.cgi?id=1165272, specifically https://hg.mozilla.org/mozilla-central/rev/5a29e8bc51ca, touches PDF.js code. Unfortunately it was landed upstream without, as far as I can tell, notifying us about it.
This patch uplifts the relevant changes, and also adds preprocessor tags to avoid including unnecessary code in mozilla-central.
2015-09-24 18:25:27 +02:00
Jonas Jenwald
421289c7bc Merge pull request #6233 from Rob--W/crx-local-files
Improve support for viewing PDFs from file://-URLs in the Chrome extension
2015-08-15 14:15:36 +02:00
Rob Wu
32e7a8adba Don't reload after updating if a tab is in use 2015-08-14 19:00:12 +02:00
Rob Wu
4ac8863e30 Restore extension tab after reload
Work-around for https://crbug.com/511670
2015-08-14 19:00:12 +02:00
Rob Wu
775d4e69cf Teach users how to enable access to local files. 2015-08-14 18:59:30 +02:00
Yury Delendik
4f3f983a21 Removes PdfRedirector.js and PlayPreview support. 2015-08-06 10:38:45 -05:00
Tim van der Meij
91ab010829 Merge pull request #6201 from Rob--W/crx-dont-force-no-download
[CRX] Respect download requests in main frame
2015-07-18 15:05:32 +02:00
Yury Delendik
eb2ad11571 Merge pull request #5918 from Snuffleupagus/remove-fallback-cpow
[Firefox] Replace the CPOW with asynchronous messages for the Fallback bar
2015-07-06 21:31:48 -05:00
Jonas Jenwald
5aaf18db12 Merge pull request #6169 from yurydelendik/rm-playpreview
Bug 1179262 - Remove PlayPreview registration from PDF Viewer.
2015-07-06 17:32:29 +02:00
Rob Wu
ffbe669730 [CRX] Respect download requests in main frame
When the URL contains "=download", respect the Content-Disposition
header in the Chrome extension.
2015-07-06 17:13:44 +02:00
Rob Wu
4367dd5130 [CRX] Ignore PDFs from responses to POST requests
As explained in
https://github.com/mozilla/pdf.js/issues/6174#issuecomment-118502802.

To verify that this patch works:
1. Build the Chrome extension (node make chromium)
2. Load the Chrome extension (at chrome://extensions)
3. Visit https://robwu.nl/pdfjs/issue6174/.
4. Verify that PDF.js is not used to load the PDF. Either Chrome's
   default PDF Viewer is used, or the PDF is offered as a file download.
2015-07-05 01:01:03 +02:00
Yury Delendik
0b5330781c Bug 1179262 - Remove PlayPreview registration from PDF Viewer. 2015-07-02 12:59:17 -05:00
Yury Delendik
1b847df2f3 Using pdfjs-dist as a library for b2g viewer. 2015-06-30 16:53:32 -05:00
Jonas Jenwald
633d51fc22 [Firefox] Handle the user modifying the "mousewheel.with_meta.action" and "mousewheel.with_control.action" prefs (bug 1170063)
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1170063.

The bug only mentions the <kbd>Meta</kbd> key, but given that a similar situation can occur for <kbd>Ctrl</kbd>, it seemed reasonable to also handle that case in the same patch.

The only possible caveat with the patch is that because of the use of `shadow`, things won't work perfectly if either of the prefs are changed *while* the viewer is active. In this case a reload is required in order for it to work correctly, but given that the issue this patch fixes should be quite rare anyway, that seems OK.
2015-06-19 14:57:32 +02:00
Jonas Jenwald
591a3c291f Make FirefoxCom.requestSync able to return objects from PdfStreamConverter.jsm, by utilizing makeContentReadable 2015-06-19 14:39:18 +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
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
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
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
Jonas Jenwald
93a65921da [Firefox] Replace the CPOW with asynchronous messages for the Fallback bar
This patch removes the only remaining CPOW usage from the code-base, and should thus fix https://bugzilla.mozilla.org/show_bug.cgi?id=1071082.

*Note:* This will not fix the "Open With Different Viewer" button in e10s, since clicking it still fails with `frontWindow is null` in the console, but I do believe that that issue is somewhat orthogonal to the current patch.
2015-04-26 11:59:05 +02:00
Jonas Jenwald
9f63fa4b07 Address review comments from Bug 1148192 - Update pdf.js to version 1.1.24
See https://bugzilla.mozilla.org/show_bug.cgi?id=1148192#c3.
2015-04-06 16:26:23 +02:00
Jonas Jenwald
b721e902dc Remove unused |getChromeWindow| function from PdfStreamConverter.jsm 2015-03-24 18:58:20 +01:00
Jonas Jenwald
133cfc78fa Remove obsolete CPOW code from PdfjsContentUtils.jsm (PR 5749 followup)
This code is unused since PR 5749, and according to https://github.com/mozilla/pdf.js/pull/5749#discussion_r25931841 it should be removed.
2015-03-24 18:36:05 +01:00
Yury Delendik
5cbb5004a3 Merge pull request #5749 from krizsa/removeCPOWs
Bug 1072350 - Removing CPOWs used by Find events.
2015-03-24 11:59:06 -05:00
Yury Delendik
ed243cf02f Using newChannel2 instead of newChannel in the extension. 2015-03-09 19:40:19 -05:00
Gabor Krizsanits
595be5cb4f Bug 1072350 - Removing CPOWs used by Find events. 2015-03-08 17:21:06 +01:00
Collin Anderson
54e984c763 cleaned whitespace 2015-02-17 11:07:37 -05:00
Jonas Jenwald
801902c6cc Fix lint error: extensions/firefox/content/PdfStreamConverter.jsm: line 384, col 63, Expected '===' and instead saw '=='. 2015-01-22 20:58:04 +01:00
Jonas Jenwald
8389f1d792 Merge pull request #5511 from gijsk/patch-1
Bug 639134 - update check for document colors
2015-01-22 20:43:50 +01:00
Rob Wu
1b043bfd5a Chrome extension: Add options page 2015-01-14 00:01:29 +01:00
Gijs
1d674d3e8f Bug 639134 - update check for document colors
This checks for both prefs on the understanding that we need to work on older versions of Firefox. If that isn't the case, the first part of the if isn't necessary. This should only land if bug 639134 is resolved - I'd make the patch part of that bug, but AIUI pdfjs's canonical repo is on github, so...
2014-11-26 23:25:03 +00:00
Jonas Jenwald
4da57c3b85 Fix code style in extensions/firefox/content/PdfStreamConverter.jsm 2014-11-06 23:49:51 +01:00
Jonas Jenwald
8921606b68 Fix code style in extensions/firefox/content/PdfJsTelemetry-addon.jsm 2014-11-06 23:49:50 +01:00
Jonas Jenwald
80503e4197 Fix code style in extensions/firefox/content/PdfJsTelemetry.jsm 2014-11-06 23:37:34 +01:00
Jonas Jenwald
ac0f48c2fc Fix code style in extensions/firefox/content/PdfJs-stub.jsm 2014-11-06 23:37:34 +01:00
Jonas Jenwald
c4c5c2222b Fix code style in extensions/firefox/content/PdfjsContentUtils.jsm 2014-11-06 23:37:33 +01:00
Jonas Jenwald
3370b18e0b Fix code style in extensions/firefox/content/PdfjsChromeUtils.jsm 2014-11-06 23:37:33 +01:00
Jonas Jenwald
9ed3e1e545 Fix code style in extensions/firefox/content/PdfJs.jsm 2014-11-06 23:37:32 +01:00
Brendan Dahl
1480850045 Merge pull request #5428 from yurydelendik/regaddon
Bug 1076909 - change args order in registerAddonHistogram.
2014-11-06 14:34:51 -08:00
Yury Delendik
4d4ef11978 Bug 1076909 - change args order in registerAddonHistogram. 2014-11-06 15:27:28 -06:00
araghava
e2c001c19d [issue 5440] fix rtl direction bug for full language codes 2014-10-26 17:16:56 -04:00
Brendan Dahl
8445ff1e45 Merge pull request #5402 from yurydelendik/streammem
Refactors PdfDataLister buffering.
2014-10-13 14:26:50 -07:00
Yury Delendik
63444aa4b3 Refactors PdfDataLister buffering. 2014-10-13 15:27:05 -05:00
Yury Delendik
55957a7d30 Merge pull request #5395 from Snuffleupagus/getTabForBrowser
[Firefox] Use getTabForBrowser instead of _getTabForBrowser if possible
2014-10-13 09:16:36 -05:00
Jim Mathies
fc3721ce2d Bug 1071709 - 5-30% TART / Session Restore regressions on Inbound (v.35) september 22 from rev d3a7f765152f 2014-10-10 23:04:49 +02:00