Commit Graph

306 Commits

Author SHA1 Message Date
Rudy Lu
f9706b345b Bug 881152 - hdpi/xhdpi resolution assets and layout for PDF Viewer app
1. Add 1.5x assets
 2. specify the background size of page number section
2013-07-16 20:44:06 +08:00
Brendan Dahl
077f08fa6d Merge pull request #3456 from brendandahl/cap-image-size
Limit image size to 1024*1024 for b2g.
2013-07-11 11:44:51 -07:00
Rob Wu
84ae29c21d Improve suggested filename on download
For all of the following URLs, "file.pdf" will be suggested:
http://.../file.pdf
http://.../download.aspx?file=file.pdf&whatever
http://.../get.pdf?name=file.pdf&whatever
http://.../single-page-app#view=file.pdf
http://.../download.aspx?file=%2Fpath%2Fto%2Ffile.pdf&whatever

Fixes #3161
2013-07-10 21:50:56 +02:00
Brendan Dahl
bcc085ec52 Limit image size to 1024*1024 for b2g. 2013-07-10 09:52:37 -07:00
Yury Delendik
666da95b37 Merge pull request #3450 from brendandahl/fix-mimetype-check
Bug 879161 - Fix pdf.js mimetype check.
2013-07-09 10:01:18 -07:00
Rob Wu
cc04cf5d1f Configurable IMAGE_DIR for annotations
The Chrome extension activates PDF.js by inserting the script tags
in a document whose URL and location origin is identical to the PDF
file.
Because of this, the path './images/' was resolved relatively to the
location of the PDF file instead of the extension.

To fix this, the IMAGE_DIR constant is moved outside the local scope,
to allow extensions/chrome/insertviewer.js to override the value.

Originally, the IMAGE_DIR variable was a global variable, but commit
f8f4b3f45d moved the global variable
to the local scope, causing the extension to malfunction.

Impact: low, the only consequence is that some rarely used images
were not visible.

Trivial test:
At the center of page 2, the annotation icon
(images/annotation-comment.svg) should be visible:
http://linorg.usp.br/CTAN/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf
2013-07-09 16:24:25 +02:00
Brendan Dahl
7eae88669a Bug 879161 - Fix pdf.js mimetype check. 2013-07-08 11:09:50 -07:00
Rob Wu
be012ed1df [CRX] Don't intercept download of PDF attachment
Fixes #3426
2013-07-01 19:17:05 +02:00
Rob Wu
efcf2aed6e [Chrome extension] Added JSDocs to pdfHandler.js
And a small refactor to reduce the LOC in the onHeadersReceived
callback, to improve the readability of the code.
2013-07-01 19:16:45 +02:00
Yury Delendik
3461d02d05 Enforces trailing spaces 2013-07-01 11:25:46 -05:00
Brendan Dahl
4e831233a4 Merge pull request #3408 from brendandahl/fix-multiresolution
[B2G] UI tweak for multi-resolution devices support on B2G
2013-06-28 10:11:18 -07:00
Brendan Dahl
aafb5d44ae Make the progress bar small and on the top. 2013-06-28 09:59:47 -07:00
Vladan Djeric
0fae231526 Avoid triggering plugin list initialization on startup (Bugzilla 881575) 2013-06-14 19:09:23 -04:00
Brendan Dahl
c2bdd7b295 Simplify getting the pdf url. 2013-06-03 11:40:07 -07:00
Brendan Dahl
24204cc153 Merge pull request #2498 from ehsan/pbcleanup
Simplify ChromeActions.isInPrivateBrowsing to not rely on the global PB service
2013-05-30 13:26:11 -07:00
Rex Lee
3e480f84a6 [B2G] UI tweak for multi-resolution devices support on B2G 2013-05-17 17:52:04 +08:00
Mack Duan
f8f4b3f45d Refactor code for annotations 2013-05-07 14:22:13 -04:00
Yury Delendik
a081c2d0f1 Merge pull request #3124 from mduan/issue3118-1
Update loading bar during onprogress of range requests
2013-05-03 16:51:32 -07:00
Ehsan Akhgari
926c783ee0 Simplify ChromeActions.isInPrivateBrowsing to not rely on the global PB service 2013-04-27 12:25:27 -04:00
Simon Kornblith
f524eaefe2 Remove DOM window URI check
Per discussion in #2937
2013-04-24 21:02:33 -04:00
Mack Duan
1daf9c984e Disable range request if content-length is unknown 2013-04-22 15:49:39 -07:00
Yury Delendik
8ae5d2745c Merge pull request #3131 from mduan/issue3122
Only perform range requests for identity Content-Encoding
2013-04-22 09:20:32 -07:00
Mack Duan
c5084d9e8a Update loading bar during onprogress of range requests 2013-04-22 08:46:58 -07:00
Mack Duan
e0d4b322cf Only perform range requests for identity Content-Encoding 2013-04-22 08:36:54 -07:00
Jakob Miland
d86fe6b301 Save datalistener in memory 2013-04-21 17:14:10 +02:00
Mack Duan
27fe18e8c6 Address brendan's comments 2013-04-18 00:16:53 -07:00
Mack Duan
ef423ef30c Implement progressive loading of PDFs 2013-04-12 16:13:22 -07:00
Rob Wu
57e6238a6e Enable Web Worker again in Chrome extension
Previously, Web Workers were not created because of a security
policy which does not respect relaxed privileges.
2013-04-04 13:40:35 +02:00
Rob Wu
e181a3c902 Highly improved Chrome extension
Full list feature changes in this commit:
- Support for iframes
- Switched to content-type (MIME) detection instead of hard-coding a
  case-sensitive check for the .PDF extension
- The PDF's original URL is visible in the omnibox
- Support for incognito mode

Note: PDF viewer is disabled for the file:// + incognito
combination, because it's currently impossible to get the combination
to work.

See https://github.com/mozilla/pdf.js/pull/3017#issuecomment-15693432
2013-04-04 10:04:13 +02:00
Brendan Dahl
98d5703565 Merge pull request #3036 from yurydelendik/appswitch
Fixes pdf application switching in FF22/23 (redo)
2013-04-03 13:12:53 -07:00
Jonas
ee83df1338 Detect and add fallback if document colors are disabled in Firefox - address comment 2013-04-03 18:49:03 +02:00
Yury Delendik
853e4625bf Fixes pdf application switching in FF22/23 (redo) 2013-04-03 09:23:00 -05:00
Brendan Dahl
0ac55ac879 Merge pull request #3027 from yurydelendik/download-ff17
Workaround for FF17 to be able to download the pdf file
2013-04-02 09:19:05 -07:00
Yury Delendik
c0bb71d2d2 Workaround for FF17 to be able to download the pdf file 2013-04-02 08:07:01 -05:00
Yury Delendik
6e975d431b Fixes PDF application switch in Firefox. 2013-03-29 20:08:08 -05:00
Jonas
f607e89a65 Add another preference check to detect if web fonts are disabled in Firefox 2013-03-28 11:28:00 +01:00
Brendan Dahl
aa2b1f0a24 Merge pull request #2969 from yurydelendik/notificationBox
Fixes notificationBox on Linux
2013-03-19 10:23:59 -07:00
Yury Delendik
8d0494caf3 Fixes notificationBox on Linux 2013-03-19 10:03:00 -05:00
Yury Delendik
dc12d33f4d Adding PlayPreview API support to pdf.js/mozilla-central 2013-03-18 16:12:24 -05:00
Yury Delendik
627d56485e Merge pull request #2724 from yurydelendik/embed-2
Handles embed tags via PlayPreview API
2013-03-16 09:18:10 -07:00
Yury Delendik
61a3b3d035 Handles embed tags via PlayPreview API 2013-03-12 10:16:03 -05:00
Mack Duan
65194afdd4 Fix issue with 'this' binding in PdfStreamConverter 2013-03-11 10:36:25 -07:00
Brendan Dahl
3f4f056665 Add save as support for Firefox. 2013-03-01 09:52:35 -08:00
Aluísio Augusto Silva Gonçalves
d18f8d11bc Add icons to the Chrome extensions 2013-02-16 23:15:01 -03:00
Yury Delendik
e9debac7f9 Adds zoom buttons ids (follow up on #2707) 2013-02-10 12:55:47 -06:00
vyv03354
07491f584f Replace getUserData()/setUserData() with CustomEvents 2013-02-06 23:31:50 +09:00
Yury Delendik
0058d422be Merge pull request #2672 from yurydelendik/lint
Replacing gjslint with jshint; fixing jshint for windows
2013-02-05 12:31:29 -08:00
Yury Delendik
cb68adb80f Replacing gjslint with jshint; fixing jshint for windows 2013-02-05 10:17:49 -06:00
Yury Delendik
f32233eaf9 Merge pull request #2668 from vyv03354/bug834075
Handle the error in case the sender is already unloaded
2013-02-04 16:27:12 -08:00
vyv03354
b605e1e8a9 Handle the error in RequestListener.receive 2013-02-04 22:06:46 +09:00
Yury Delendik
fcc169453b Adds the extensions/* files for jshint 2013-02-02 21:15:43 -06:00
Brendan Dahl
1c4b780176 Use attachment content disposition attachment and filename. 2013-01-30 18:34:22 -05:00
Yury Delendik
dbe633d324 Fix dir attribute for the extension 2013-01-24 17:35:19 -06:00
Brendan Dahl
4b4601d1fb Merge pull request #2481 from yurydelendik/rm-global-pb
Refactors private browsing logic
2012-12-21 09:36:28 -08:00
Yury Delendik
1e7e586da4 Refactors private browsing logic 2012-12-21 11:20:45 -06:00
Brendan Dahl
b42136f8f9 Fix migration for upgraded profiles. 2012-12-19 12:15:55 -08:00
Yury Delendik
5dc87a7fca Detecting if web fonts are disable in Firefox. 2012-11-30 17:08:19 -06:00
Brendan Dahl
fd4e40c82b New GUI for B2G viewer. 2012-11-29 17:01:51 -08:00
Brian R. Bondy
e2baa902c6 Bug 815475 - Fix pfjs when there is no integrated findbar (pdfjs 0.6.39 broke Firefox metro) 2012-11-27 09:46:44 -06:00
Brendan Dahl
babd8df176 Un-inline pdf.js for the extension/mozcentral and remove fetch pdf by content code. 2012-10-29 12:44:18 -07:00
waddlesplash
60e2e36ff7 Vectorize the logo. 2012-10-29 14:08:52 -04:00
Brendan Dahl
a842534a56 Change the channel owner to the resource url. 2012-10-26 10:22:28 -07:00
Brendan Dahl
83003499b7 Forward original request to avoid firefox assertion. 2012-10-25 10:35:06 -07:00
Michael Payne
05bca47b11 Include uppercase extensions for Chrome
add uppercase case extension recognition for Chrome pdf.js
2012-10-17 21:37:24 -07:00
Brendan Dahl
d79960abb5 Addresses review feedback from mc bug 801280. 2012-10-15 15:14:36 -07:00
Brendan Dahl
848917b1bf Only use the integrated find if we aren't in an frame. 2012-10-10 17:17:26 -07:00
Brendan Dahl
95b1f74a30 Add support for firefox integrated find. 2012-10-05 13:59:13 -07:00
Josh Matthews
673582984f Bug 792582 - Explicitly set privacy status of channels created by pdf.js 2012-10-05 15:07:51 -05:00
Yury Delendik
963fe55203 Merge pull request #2192 from brendandahl/fix-first-run
Fix the first run code and make it possible to run multiple times.
2012-10-04 14:21:47 -07:00
Brendan Dahl
4e0c792f12 Merge pull request #2168 from mozilla/html-search-bar
Find bar
2012-10-04 13:59:20 -07:00
Brendan Dahl
2a7312836c Add comment for migration. 2012-10-04 10:56:01 -07:00
Yury Delendik
72e4c069b2 Merge pull request #2193 from brendandahl/princpal
Change how we get the resource principal.
2012-10-03 16:27:29 -07:00
Brendan Dahl
73c2119250 Change how we get the resource principal. 2012-10-03 15:52:36 -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
Yury Delendik
20c8269e70 Remove unused constants 2012-10-02 07:20:23 -05:00
Yury Delendik
181dd33fbb Fixes private browsing history 2012-10-01 16:16:26 -05:00
Artur Adib
6864a07221 Use "find" instead of both find & search 2012-09-25 16:17:27 -04:00
Brendan Dahl
c8144d683d Mozilla central change for metro. 2012-09-13 09:33:50 -07:00
Michael Payne
6ca9245a39 Changes to allowed versioned building of Chrome extension that meets new
Chrome extension security requirements
2012-09-06 12:39:49 -07:00
Michael Payne
088c6e17e8 changes to allow chrome extension to load
changes to remove inline scripts, update manifest version, fix make.js
so compatibility.js isn't included for chrome. Due to new Chrome
extension changes outlined at
http://developer.chrome.com/extensions/manifestVersion.html
2012-09-05 22:52:17 -07:00
Brendan Dahl
332ae4ce41 Change to the Apache v2 license. 2012-08-31 15:48:21 -07:00
Yury Delendik
296b98f977 Merge branch 'master' of git://github.com/mozilla/pdf.js.git into progress-indeterminate
Conflicts:
	extensions/firefox/components/PdfStreamConverter.js
2012-08-23 15:23:44 -05:00
Yury Delendik
19c62f526c Removes offset and renames set to append 2012-08-22 13:34:01 -05:00
Yury Delendik
aa00fe44c4 Fixing the length given by HTTP headers 2012-08-22 13:20:50 -05:00
Yury Delendik
cd1a645881 Adds support of the indeterminate loading progress 2012-08-22 10:48:56 -05:00
Brendan Dahl
e11e8117c5 Merge pull request #1943 from yurydelendik/loadingbychrome
Implements loading PDF data by extension/chrome
2012-08-21 11:14:16 -07:00
Yury Delendik
077b19fca1 Fixes reported offset when length is unknown 2012-08-20 17:53:26 -05:00
Yury Delendik
df4fadeaf5 Unknown length support; reports download error 2012-08-20 17:16:04 -05:00
Yury Delendik
1bb7a7ed1c Adds stub PdfJs.jsm for FF15 2012-08-19 13:07:31 -05:00
Yury Delendik
9cc5fc4e38 Merge branch 'master' of git://github.com/mozilla/pdf.js.git into loadingbychrome
Conflicts:
	web/viewer.js
2012-08-15 10:17:30 -05:00
Yury Delendik
4de0d31318 Finds correct window/notification box for fallback message 2012-08-09 17:07:41 -05:00
Brendan Dahl
22688b4471 Merge pull request #1697 from yurydelendik/min-version-2
Set Gecko 10 as min version for the extension
2012-08-03 09:58:02 -07:00
Yury Delendik
fc3efa9b16 FF17 getSimpleCodebasePrincipal name change 2012-08-01 16:39:51 -05:00
Yury Delendik
c905191de2 Implements loading PDF data by extension/chrome 2012-07-31 12:21:07 -05:00
Brendan Dahl
f16c6f19aa Address moz central comments for ff16. 2012-07-13 16:14:37 -07:00
Yury Delendik
2f60f4a0d3 Adds android support to install.rdf 2012-07-10 10:23:36 -05:00
Brendan Dahl
87d9651eb7 Fix fallback after new download. 2012-06-04 17:33:27 -07:00
Brendan Dahl
4f314fff39 Remove space at end of line. 2012-06-04 15:39:50 -07:00
Brendan Dahl
16b1fa1e98 Merge upstream. 2012-06-04 11:16:02 -07:00
Brendan Dahl
72e6dbebaa Update factory in bootstrap.js. 2012-06-04 09:45:09 -07:00
Brendan Dahl
da94701c7b Addresses review feedback from mozilla central. See bugzilla bug 752676. 2012-06-04 09:38:22 -07:00
Yury Delendik
769bbf20e1 Merge pull request #1781 from brendandahl/app-pref
GH Portion of the Control pdf.js and Other PDF Plugins using Application Preferences bug
2012-06-01 16:46:48 -07:00
Brendan Dahl
6175e4b526 Use already downloaded data for the open with/save as dialog. 2012-06-01 14:17:09 -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
Artur Adib
92465b41c5 EXT_PREFIX --> PREF_PREFIX 2012-05-29 12:14:12 -04:00
Artur Adib
9597efb3f4 merge upstream 2012-05-29 11:54:11 -04:00
Brendan Dahl
2da12930a6 Merge branch 'master' of github.com:mozilla/pdf.js into fallback-ui
Conflicts:
	extensions/firefox/components/PdfStreamConverter.js
2012-05-24 14:01:10 -07:00
Brendan Dahl
5d67183b4d Fix notification from showing up in wrong window. 2012-05-23 16:54:55 -07:00
Brendan Dahl
ee54c0bfe4 Remove disable option. Change download wording to open. 2012-05-23 16:16:48 -07:00
Brendan Dahl
4bee4c6ee8 Use different id's for moz central and extension. 2012-05-23 15:57:14 -07:00
Artur Adib
ea60f2a088 addr reviewer comments 2012-05-22 19:20:24 -04:00
Artur Adib
424f52205c Fixed moz-central manifest; bundling Mochitests 2012-05-22 18:56:12 -04:00
Artur Adib
6cd9ae01cc Enable/disable search via about:config pref 2012-05-21 11:15:24 -04:00
Brendan Dahl
080c3e79fc Merge upstream. Use new l10n. 2012-05-15 10:33:01 -07:00
Brendan Dahl
5afef149ea Merge pull request #1690 from yurydelendik/stringbundle-1
Loading extension resources via stringbundle
2012-05-14 17:24:55 -07:00
Brendan Dahl
034583e1a1 Add new severity log info(). Change severity of some log messages. Trigger fallback on errors and warnings for extension. 2012-05-14 17:19:09 -07:00
Yury Delendik
48695aa802 Set Gecko 10 as min version for the extension 2012-05-13 22:48:23 -05:00
Jakob Miland
7b5c69cac5 Updated Firefox and SeaMonkey's maxVersion 2012-05-12 19:42:27 +02:00
Jakob Miland
bf64240dc3 SeaMonkey support without SMILE 2012-05-12 15:16:53 +02:00
Yury Delendik
d9f995f9ca Change pdfviewer->pdf.js for chrome://;new line 2012-05-11 17:35:43 -05:00
Yury Delendik
7d648cfa13 Lint errors 2012-05-11 15:18:46 -05:00
Yury Delendik
5ca12d549e Missing file 2012-05-11 15:14:50 -05:00
Yury Delendik
56b3a7086e Remove unused code 2012-05-11 14:42:20 -05:00
Yury Delendik
6323c8e084 Loading extension resources via stringbundle 2012-05-11 14:39:11 -05:00
Brendan Dahl
fca6f352e4 Add firefox ui fallback on error/unsupported feature. 2012-05-10 15:54:58 -07:00
Yury Delendik
52832894f5 Merge pull request #1673 from brendandahl/fallback
Add fallback option for the extension.
2012-05-10 13:10:46 -07:00
Gavin Sharp
117582b2ea fix review comments from bdahl 2012-05-10 10:05:24 -07:00
Gavin Sharp
b607147368 Issue 1682: don't use FUEL in pdf.js 2012-05-09 17:04:52 -07:00
Brendan Dahl
c1f73b96a4 Use open with/save as dialog for fallback and download. 2012-05-08 16:11:50 -07:00
Brendan Dahl
982c7a0f7e Add fallback option for the extension. 2012-05-08 13:05:33 -07:00
Yury Delendik
fcbc684578 Hide 'make locale' generated files 2012-05-02 08:53:56 -05:00
Yury Delendik
427a5f193d Move localization to l10n folders; create 'make locale' 2012-05-02 08:51:52 -05:00
Yury Delendik
32e9eb35fe Using web browsers locale in the extension mode 2012-05-01 20:37:03 -05:00
Brendan Dahl
f72c04b373 Fix extension comment nits. 2012-04-16 14:33:11 -07:00
Brendan Dahl
c6a611a38a Change support url for moz central add-on. 2012-04-04 15:41:52 -07:00
Brendan Dahl
a794319845 Add url check. 2012-03-23 14:48:50 -07:00
Brendan Dahl
11e84b2b7b Remove duplicaten dom window func. 2012-03-23 14:32:19 -07:00
Brendan Dahl
22c858c2ec Use a different way to add the event listener. 2012-03-23 14:28:09 -07:00
Brendan Dahl
cd1fd17f7b Add icon for extension. 2012-03-20 15:25:02 -07:00
Brendan Dahl
94fca5edc7 Change extension name, creator, description. Remove unpack and icon url. Move strict compatibility entry for MC. 2012-03-20 15:24:23 -07:00
Brendan Dahl
84568ee46d Address mc extension code review. 2012-03-20 09:39:33 -07:00
notmasteryet
82868ae52c Merge pull request #1348 from notmasteryet/installrdf
Use <em:maxVersion>@FIREFOX_VERSION@</em:maxVersion>
2012-03-16 15:44:06 -07:00
notmasteryet
e721c90f77 Removing tabs 2012-03-16 07:24:58 -05:00
notmasteryet
ffdae468b0 #filter substitution 2012-03-16 00:55:53 -05:00
notmasteryet
c8d7d88d0a Merge pull request #1347 from brendandahl/app_shutdown
Skip unneeded steps on APP_SHUTDOWN.
2012-03-15 20:54:20 -07:00
notmasteryet
ec02862934 Use <em:maxVersion>@FIREFOX_VERSION@</em:maxVersion> 2012-03-15 22:44:29 -05:00
Brendan Dahl
7c902eb612 Skip unneeded steps on APP_SHUTDOWN. 2012-03-15 20:08:39 -07:00
notmasteryet
6186ab6004 Whitelist GET 2012-03-14 18:43:20 -05:00
notmasteryet
24e48d382d Merge pull request #1337 from brendandahl/debugpref
Only enable pdfDebug for the extension if a pref is set.
2012-03-14 16:13:01 -07:00