Commit Graph

5371 Commits

Author SHA1 Message Date
Brendan Dahl
2aecbe874e Paint patterns relative to content base transformation. 2013-07-22 14:52:44 -07:00
Yury Delendik
c682c25bcf Merge pull request #3504 from brendandahl/info-bar
Lower the priority of the notification bar to INFO.
2013-07-22 12:25:00 -07:00
Brendan Dahl
e015ab0d81 Lower the priority of the notification bar to INFO. 2013-07-22 11:50:03 -07:00
Yury Delendik
95bb727931 Merge pull request #3494 from SSk123/master
Fixing the offset of vertical CJK text
2013-07-20 10:26:13 -07:00
Srishti
6c3e5e5d92 Fixing the offset of vertical CJK text 2013-07-20 20:56:33 +05:30
Yury Delendik
12d9b6570b Merge pull request #3497 from Snuffleupagus/regression-3447
Fixes regression that cause scrolling using spacebar to break in Firefox
2013-07-20 06:59:22 -07:00
Jonas
8708f8beb5 Fixes regression that cause scrolling using spacebar to break in Firefox 2013-07-19 22:09:37 +02:00
Yury Delendik
c6e698e21f Merge pull request #3332 from Snuffleupagus/fix-loadingBar
Fix the positioning of the progressive loadingBar
2013-07-18 09:39:25 -07:00
Jonas
4890c5d017 Fix the positioning of the progressive loadingBar 2013-07-18 18:28:59 +02:00
Yury Delendik
c1598ecab5 Merge pull request #3489 from Snuffleupagus/move-PDFHistory
Move PDFHistory from viewer.js to its own file
2013-07-18 09:26:35 -07:00
Jonas
09e0c9b65d Move PDFHistory from viewer.js to its own file 2013-07-18 17:18:27 +02:00
Yury Delendik
af8e96cf26 Merge pull request #3422 from timvandermeij/presentation-mode-shortcuts
Presentation mode shortcut implementation
2013-07-18 07:33:55 -07:00
Tim van der Meij
343bb7488a Presentation mode shortcut implementation 2013-07-18 16:28:06 +02:00
Yury Delendik
adb3caec00 Moves changeable details from etherpad and README to issues and wiki pages 2013-07-18 09:11:28 -05:00
Yury Delendik
0dd0e2ee64 Merge pull request #3477 from brendandahl/font-loading
Use dummy font for testing when pdf fonts are loaded.
2013-07-18 07:01:55 -07:00
Yury Delendik
e6be2666de Merge pull request #3484 from Rob--W/crx-improved-navigation-detection
[Chrome extension] Improved navigation detection by using webNavigation instead of tabs API.
2013-07-18 06:32:22 -07:00
Yury Delendik
fb189f4fdf Merge pull request #3476 from Rob--W/no-google-translate
Disable Google Translate on viewer in Chrome.
2013-07-18 06:21:57 -07:00
Yury Delendik
984b9bf78b Merge pull request #3486 from Rob--W/csp-unsafe-inline
Remove all inline JavaScript from viewer.html to comply with CSP unsafe-inline and correct error textarea's height
2013-07-18 06:08:39 -07:00
Yury Delendik
333a728cb1 Merge pull request #3487 from timvandermeij/remove-code-duplication
Removing code duplication
2013-07-18 06:00:03 -07:00
Tim van der Meij
22120005b7 Removing code duplication 2013-07-18 13:37:55 +02:00
Rob Wu
d5e16ab85c Viewer: Remove inline events; set height on error
Move inline event handlers to viewer.js to comply with a
Content-Security-Policy where directive "unsafe-inline" is not set.

Change textarea.rows = <number of newlines> to
textarea.style.height = textarea.scrollHeight.
(The former is extremely unreliable; consider long lines...)
2013-07-18 10:38:44 +02:00
Brendan Dahl
5fa609584e Merge pull request #3449 from Snuffleupagus/history-remove-beforeunload
[Browsing history] Remove 'beforeunload' to enable caching and prevent duplicate entries
2013-07-17 16:03:12 -07:00
Rob Wu
ec956d97c9 [CRX] Delay render of viewer if needed...
Sometimes, the viewer did not render for PDF files in an iframe,
because document.readyState not reaching "complete".

Deferring window.stop() until the root element is placed in the
document fixes the problem (typically a few ten milliseconds).
2013-07-17 23:25:31 +02:00
Brendan Dahl
fde86cde54 Merge pull request #3473 from Rob--W/chrome-printing
Fix printing behaviour in Chrome
2013-07-17 11:04:49 -07:00
Brendan Dahl
31dab67a34 Merge pull request #3479 from RudyLu/mutlires_1.5
Bug 881152 - hdpi/xhdpi resolution assets and layout for PDF Viewer app
2013-07-17 10:56:34 -07:00
Brendan Dahl
e9f5336cc9 Add atob polyfill. Remove uneeded data uri polyfill. 2013-07-17 10:26:12 -07:00
Rob Wu
ec5ef58b84 [CRX] Improved navigation detection.
A user reported that the PDF Viewer is not rendered on Dropbox,
(Chrome on Mac OS X). This is apparently caused by the fact that the
PDF file is loaded in an iframe in such a way that the tabs.onUpdated
event is not triggered.

This patch switches to the webNavigation event API, which improves the
reliability of the navigation detection.

Unfortunately Opera 15 does not support the webNavigation API, so the
old (tabs.onUpdated) method is used (feature-detection is used, so
whenever Opera decides to implement this API, it will profit from it).
2013-07-17 19:04:10 +02:00
Brendan Dahl
78d3b600d4 Merge pull request #3430 from Rob--W/crx-download-pdf
Chrome extension: Do not intercept PDF downloads if it's target is a frame
2013-07-16 16:13:30 -07:00
Brendan Dahl
7a1049216c Merge pull request #3440 from peerlibrary/syncing-order
Syncing order of JS files in viewer.html and make.js. See #3414
2013-07-16 16:10:25 -07:00
Brendan Dahl
6b9c272590 Merge pull request #3457 from yurydelendik/remove-prefixes
Removes foreign for Firefox CSS prefixes
2013-07-16 16:08:05 -07:00
Brendan Dahl
a5cc8d1ec3 Merge pull request #3464 from yurydelendik/bug889327
Fixes ASCIIHex decoding
2013-07-16 10:32:35 -07:00
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
330f6212ba Merge pull request #3341 from Snuffleupagus/navigateTo-fix
Tweak the behaviour of navigateTo during document load
2013-07-15 16:16:46 -07:00
Brendan Dahl
f04dbcaf2e Use dummy font for testing when pdf fonts are loaded. 2013-07-15 15:37:03 -07:00
Rob Wu
97efe7886e Disable Google Translate on viewer in Chrome.
test/pdfs/yo01.pdf triggered "This page is in Japanese. Would you like
to translate it?" info bar in Chrome.
2013-07-16 00:13:05 +02:00
Rob Wu
066dffde3c Fix printing behaviour in Chrome
Two major issues:
1. Border/shadow around every page. Removed by adding "border:none".
2. Added "overflow:visible" (overrides "overflow:auto") in #viewContainer.
   This solves two problems:
   - It prevents scrollbars from appearing.
   - Every "page" is automatically resized to fit on a printed page,
     just like the Firefox.
To see what's wrong, here's a picture of how PDF.js rendered the pdf in
 Chrome (using "Print to PDF" feature of Chrome):
 https://robwu.nl/pdfjs/pdfjs-print-with-chromium-28.pdf

Successfully tested with Chrome 28 and Firefox 22.

Solves #3445
2013-07-15 16:23:43 +02:00
Brendan Dahl
6c6719efeb Merge pull request #3436 from yurydelendik/jpeg-cmyk
Removes browser decoding optimization for JPEG CMYK
2013-07-12 17:54:12 -07:00
Yury Delendik
b617f74be6 Merge pull request #3469 from brendandahl/enable-rr-in-master
Enable range requests in master mode.
2013-07-12 17:11:53 -07:00
Brendan Dahl
e697c598c2 Enable range requests in master mode. 2013-07-12 16:40:19 -07:00
Yury Delendik
dfaf22f564 Merge pull request #3468 from yurydelendik/download-refactor
Restoring PR 3455 functionality
2013-07-12 15:04:26 -07:00
Yury Delendik
81c8730e4b Restoring PR 3455 functionality 2013-07-12 17:00:43 -05:00
Brendan Dahl
4982290170 Merge pull request #3467 from yurydelendik/download-refactor
Refactor download logic
2013-07-12 14:42:24 -07:00
Yury Delendik
28778e6c1b Rejects incorrect url in download manager 2013-07-12 13:38:49 -05:00
Yury Delendik
ef658bf5f1 Refactoring download button logic 2013-07-12 13:14:13 -05: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
Yury Delendik
8ee9db45ef Fixes ASCIIHex decoding 2013-07-11 13:33:29 -05:00
Brendan Dahl
5dcc4cd1b4 Merge pull request #3424 from yurydelendik/lookChar
lookChar refactoring
2013-07-11 09:08:59 -07:00
Yury Delendik
a50501c43a Merge pull request #3459 from Rob--W/define-URL
Always declare window.URL even if undefined
2013-07-10 17:37:26 -07:00
Rob Wu
b076cd1d6a Always declare window.URL even if undefined
Otherwise it breaks feature detection,
"ReferenceError: Can't find variabl: URL" in Safari 5.1
2013-07-10 23:34:10 +02:00
Yury Delendik
9ac2584852 Merge pull request #3437 from Rob--W/download-from-cache
Download PDF from cache for non-Firefox add-on
2013-07-10 14:20:20 -07:00