Brendan Dahl
815c3a822f
Bug 1291709 - PdfjsChromeUtils.jsm leaks browser.xul windows.
2016-08-03 14:18:40 -07:00
klemens
6f03f62327
trivial spelling fixes
2016-07-17 14:33:41 +02: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
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
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
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
Yury Delendik
df10513e10
Moves DEFAULT_PREFENCES into JSON format.
2016-05-11 17:58:17 -05:00
Dave Huseby
867a5ea1b0
Make pdf.js use the correct principal origin attributes when loading subresources.
2016-04-04 14:12:51 -07:00
Yury Delendik
2b246192e1
Removes frontWindow usage from the stream converter.
2016-03-24 11:47:34 -05:00
Jonas Jenwald
41efb92d3a
Merge pull request #6988 from timvandermeij/fileattachment-annotation
...
Implement support for FileAttachment annotations
2016-02-24 12:58:06 +01:00
Tim van der Meij
6a33dfd13a
Implement support for FileAttachment annotations
2016-02-23 22:49:53 +01:00
Jonas Jenwald
f64113c927
[Addon] Catch errors in getFindBar
(in PdfStreamConverter.jsm) to fix loading of PDF files in the bookmark sidebar (bug 1248959)
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1248959 .
2016-02-18 13:59:18 +01:00
Manas
a2ba1b8189
Uses editorconfig to maintain consistent coding styles
...
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
2015-11-14 07:32:18 +05:30
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
Yury Delendik
4f3f983a21
Removes PdfRedirector.js and PlayPreview support.
2015-08-06 10:38:45 -05: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
Yury Delendik
0b5330781c
Bug 1179262 - Remove PlayPreview registration from PDF Viewer.
2015-07-02 12:59:17 -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
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
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
Yury Delendik
4d4ef11978
Bug 1076909 - change args order in registerAddonHistogram.
2014-11-06 15:27:28 -06: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
Jonas Jenwald
a34e7aa8fe
[Firefox] Use getTabForBrowser instead of _getTabForBrowser if possible
2014-10-10 22:26:52 +02:00
Yury Delendik
56d11fc26b
Merge pull request #5364 from Rob--W/firefox-pbu_isWindowPrivate
...
Firefox addon: Use isContentWindowPrivate instead of isWindowPrivate if available
2014-10-01 17:05:23 -05:00
Rob Wu
4fe92f6d01
addon: isWindowPrivate -> isContentWindowPrivate
...
As of Firefox 35, isContentWindowPrivate should be used for DOM windows instead of isWindowPrivate.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1069059 and
http://hg.mozilla.org/mozilla-central/diff/324798b60ba3/toolkit/modules/PrivateBrowsingUtils.jsm
Without this fix, you will get the following error message when Firefox+PDF.js is started:
>
WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
pbu_isWindowPrivate@resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
ChromeActions.prototype.isInPrivateBrowsing@resource://pdf.js/PdfStreamConverter.jsm:237:12
xhr_onreadystatechange@resource://pdf.js/PdfStreamConverter.jsm:545:30
NetworkManager_requestRange@resource://pdf.js/network.js:95:7
NetworkManager_requestRange@resource://pdf.js/network.js:81:14
RangedChromeActions_requestDataRange@resource://pdf.js/PdfStreamConverter.jsm:596:1
RequestListener.prototype.receive@resource://pdf.js/PdfStreamConverter.jsm:705:5
PdfStreamConverter.prototype.onStartRequest/proxy.onStopRequest/<@resource://pdf.js/PdfStreamConverter.jsm:909:11
FirefoxComClosure/<.request@resource://pdf.js/web/viewer.js:529:14
PdfDataRangeTransport_requestDataRange@resource://pdf.js/web/viewer.js:2977:9
transportDataRange@resource://pdf.js/build/pdf.js:2122:13
messageHandlerComObjOnMessage@resource://pdf.js/build/pdf.js:1219:9
2014-10-01 23:50:03 +02:00
Yury Delendik
c0e933682a
Disables streaming in the extension when length is undefined.
2014-10-01 14:16:50 -05:00
Yury Delendik
a95123188a
Disables hash options when PDFBug is disabled and fixed streaming regressions.
2014-09-26 11:49:18 -05:00
Yury Delendik
c3f191a27c
Implement streaming using moz-chunk-arraybuffer
2014-09-19 19:05:25 -05:00
Yury Delendik
63b7fa5634
Merge branch 'issue-4954' of https://github.com/Snuffleupagus/pdf.js into hashes
...
Conflicts:
web/viewer.js
2014-09-19 18:25:11 -05:00
Jim Mathies
b399f19426
Bug 1064496 review changes
2014-09-19 15:31:21 -05:00
Yury Delendik
861a7615ff
Adds preprocessor directive to the X-Content-Security-Policy stuff
2014-09-19 15:18:37 -05:00
Jonas Jenwald
8d27f38c64
Rename |_isPrefAllowed| to |_ensurePreferenceAllowed| in extensions/firefox/content/PdfjsChromeUtils.jsm
2014-09-18 15:06:34 +02:00
Jonas Jenwald
dbe756c406
Update the license header in extensions/firefox/content/pdfjschildbootstrap.js; see https://bugzilla.mozilla.org/show_bug.cgi?id=942707#c99
2014-09-18 12:08:48 +02:00
Jonas Jenwald
c00951e3e4
Add back pdfBugEnabled pref check in the |log| function in extensions/firefox/content/PdfStreamConverter.jsm
2014-09-18 12:08:48 +02:00
Jonas Jenwald
3ac9bd063d
Fix setPreferences regression from the e10s patch (PR 5115)
2014-09-18 12:08:47 +02:00
Yury Delendik
7ae7fd3d1a
Adds DEFAULT_PREFERENCES to the PdfjsChromeUtils
2014-09-08 15:53:01 -05:00
Yury Delendik
782ed5cb67
Lint error fix for pdfjschildbootstrap.js
2014-09-08 15:44:21 -05:00
Jim Mathies
f2096fe23f
Firefox pdf viewer support for e10s (Bug 942707).
2014-09-05 17:33:52 -05:00
Yury Delendik
ab63f96a91
Adds telemetry to record embedding usages
2014-06-16 16:41:04 -05:00
Yury Delendik
0cd28ebfa3
Telemetry for used stream and font types
2014-06-16 16:41:04 -05:00
Jonas Jenwald
1ba31a6cb7
Add pdfBugEnabled to the default preferences
2014-06-16 21:46:39 +02:00
Yury Delendik
7ac1c6b034
Reporting print usage
2014-06-14 15:55:21 -05:00
Yury Delendik
75d9ae9cd3
PdfRedirector checks if plugin is still in PlayPreview mode
2014-06-02 09:27:28 -05:00
Yury Delendik
68b037ffb0
Add preprocessor directives for the extension; and refactor FirefoxCom callback
2014-05-28 10:24:06 -05:00
Gijs Kruitbosch
da93e65d8c
Bug 1015115 - switch to cloneInto in pdf.js, r?yury
2014-05-28 10:22:49 -05:00
Yury Delendik
9f9454d2ae
Refactors new extension find bar code to support old FF versions
2014-05-08 09:05:28 -05:00
Adam Dane [:hobophobe]
bc66c8119e
Add getFindBar for Fx extension
2014-05-07 18:45:24 -05:00
Tim van der Meij
c566feb721
Providing content type for attachment downloads
2014-04-25 23:30:51 +02:00
Samuel Chantaraud
25ee0e8572
Preliminary attachments support
...
Added a partial Filespec support
Added getAttachments in API
Added a new attachments view in UI (with a new icon by @shorlander)
2014-04-18 12:11:00 -04:00
Yury Delendik
b39f0c311c
Refactors history and how the database is stored
2014-04-03 13:23:18 -05:00
Jonas Jenwald
4c9c43f82b
Modify {get, set}Preferences in PdfStreamConverter.jsm to support async
2014-04-03 10:17:35 +02:00
Jonas Jenwald
3fee5345b9
[Firefox] Only load 'PdfStreamConverter' and 'PdfRedirector' when PDF.js is enabled
2014-03-27 16:01:13 +01:00
Jonas Jenwald
f6cfab0061
[Firefox] Stop importing default_preferences.js as a module and include it instead
2014-03-26 00:37:32 +01:00
Jonas Jenwald
2017f7925e
[Firefox] Lazy load network.js in PdfStreamConverter.js
2014-03-21 17:39:55 +01:00
Jonas Jenwald
c158894d94
Improve handling of preferences in Firefox
2014-03-05 11:58:12 +01:00
Brendan Dahl
b8f7bcaf02
Use only one resource url for moz central build.
2014-02-27 14:11:39 -08:00
jmozmoz
4cd33bf460
Really call unregister for _pdfRedirectorFactory (fixing issue #3598 )
2013-08-21 17:35:50 +02:00
Yury Delendik
ba23a9e8f9
Adds initial telemetry probes
2013-08-16 09:53:05 -05:00
Brendan Dahl
7eae88669a
Bug 879161 - Fix pdf.js mimetype check.
2013-07-08 11:09:50 -07:00
Vladan Djeric
0fae231526
Avoid triggering plugin list initialization on startup (Bugzilla 881575)
2013-06-14 19:09:23 -04:00
Yury Delendik
853e4625bf
Fixes pdf application switching in FF22/23 (redo)
2013-04-03 09:23:00 -05:00
Yury Delendik
6e975d431b
Fixes PDF application switch in Firefox.
2013-03-29 20:08:08 -05:00
Yury Delendik
dc12d33f4d
Adding PlayPreview API support to pdf.js/mozilla-central
2013-03-18 16:12:24 -05:00
Brendan Dahl
b42136f8f9
Fix migration for upgraded profiles.
2012-12-19 12:15:55 -08:00
Brendan Dahl
2a7312836c
Add comment for migration.
2012-10-04 10:56:01 -07:00
Brendan Dahl
eea7f90c7f
Fix the first run code and make it possible to run multiple times.
2012-10-03 12:11:53 -07:00
Brendan Dahl
332ae4ce41
Change to the Apache v2 license.
2012-08-31 15:48:21 -07:00
Yury Delendik
1bb7a7ed1c
Adds stub PdfJs.jsm for FF15
2012-08-19 13:07:31 -05:00
Brendan Dahl
da94701c7b
Addresses review feedback from mozilla central. See bugzilla bug 752676.
2012-06-04 09:38:22 -07:00
Brendan Dahl
121040a5dc
Make pdf.js the default pdf viewer for moz central.
...
Update the tests to reflect this.
2012-06-01 13:21:45 -07:00
Brendan Dahl
3d7f01d9ca
Add global pref to enable/disable. Control pdf.js in application preferences. Add Artur's mochi tests.
2012-05-31 11:16:06 -07:00