Commit Graph

1207 Commits

Author SHA1 Message Date
aib
2870a6108c Fix download button waiting if document has started but not completed downloading 2014-03-14 05:23:47 +02:00
Tim van der Meij
e5cd75083f Merge pull request #4132 from yurydelendik/minified
Adds make minified command
2014-03-13 21:38:50 +01:00
Yury Delendik
7963f22545 Merge pull request #4259 from brendandahl/built-in-cmaps-squash
Adds built in CMaps and unifies the glyph mapping.
2014-03-13 10:27:48 -05:00
Yury Delendik
31ea4e0f4d Merge pull request #4420 from prometheansacrifice/RemovingCheckSetPresence
Removing set-presence-in-ImageData check from canvas.js
2014-03-13 08:31:53 -05:00
Manas (prometheansacrifice)
30e00bc573 Removing set-presence-in-ImageData check from canvas.js 2014-03-11 08:48:37 +05:30
Brendan Dahl
3b209b5347 Add note about adobe license. 2014-03-10 13:03:35 -07:00
Brendan Dahl
48323b8066 Merge pull request #4225 from Snuffleupagus/prefs-v3
Improve handling of preferences in Firefox
2014-03-10 10:39:56 -07:00
Jonas Jenwald
9192fb966d Move globals in web/pdf_find_bar.js 2014-03-10 15:58:18 +01:00
Jonas Jenwald
5dcc92430c Fix coding style in web/text_layer_builder.js 2014-03-10 11:48:20 +01:00
Jonas Jenwald
9e0ed5ca7e Fix coding style in web/viewer.js 2014-03-09 12:20:32 +01:00
Jonas Jenwald
0bd865b329 Fix coding style in web/ui_utils.js 2014-03-09 12:04:56 +01:00
Jonas Jenwald
af4e977848 Fix coding style in web/pdf_find_controller.js 2014-03-09 11:51:16 +01:00
Jonas Jenwald
2e09f14a80 Fix coding style in web/pdf_find_bar.js 2014-03-09 11:51:16 +01:00
Jonas Jenwald
6df9cc46b4 Fix coding style in web/firefoxcom.js 2014-03-09 11:51:15 +01:00
Jonas Jenwald
e9cfae84a0 Fix coding style in web/debugger.js 2014-03-09 11:51:15 +01:00
Jonas Jenwald
665b862b7f Fix coding style in web/compatibility.js 2014-03-09 11:51:15 +01:00
Jonas Jenwald
047a82a07e Fix coding style in web/chromecom.js 2014-03-09 11:51:14 +01:00
Samuel Chantaraud
076b3433b4 Improved annotations' display/behavior.
Added an "InteractiveAnnotation" class to homogenize the annotations' structure (highlighting) and user interactions (for now, used for text and link annotations).

Text annotations:
The appearance (AP) has priority over the icon (Name).
The popup extends horizontally (up to a limit) as well as vertically.
Reduced the title's font size.
The annotation's color (C) is used to color the popup's background.
On top of the mouseover show/hide behavior, a click on the icon will lock the annotation open (for mobile purposes). It can be closed with another click on either the icon or the popup.

An annotation printing is conditioned by its "print" bit
Unsupported annotations are not displayed at all.
2014-03-07 10:48:42 -04:00
Jonas Jenwald
6fd0b063e9 Fix scrolling using Shift+Spacebar in Firefox 2014-03-06 15:26:23 +01:00
Yury Delendik
15847ef94f Fixes CSS for webkit 2014-03-05 08:50:31 -06:00
Jonas Jenwald
c158894d94 Improve handling of preferences in Firefox 2014-03-05 11:58:12 +01:00
Brendan Dahl
ce9e9e6ff7 Remove embeddedFontsUsed from API. 2014-02-27 14:06:03 -08:00
Samuel Chantaraud
dcb174ed58 Made viewer's webViewerLoad callable from outside viewer.js
To allow manual triggering when DOMContentLoaded can not be relied upon.
2014-02-27 13:45:02 -04:00
Rob Wu
3f96d0dabb Ctrl/cmd + S = save PDF instead of viewer.html 2014-02-27 16:21:47 +01:00
Yury Delendik
7657011985 Merge pull request #4342 from timvandermeij/retina
Implement Retina assets
2014-02-26 15:27:11 -06:00
Tim van der Meij
f281669151 Implement Retina assets 2014-02-26 22:22:38 +01:00
Yury Delendik
9c4101b51a Merge pull request #4335 from dferer/locales-handling
Correct formatting of locale id before submitting to l10n
2014-02-26 14:31:17 -06:00
Samuel Chantaraud
cbc9ad3cb6 Correct formatting of locale to make it compatible with l10n (safari issue) 2014-02-26 16:09:58 -04:00
Brendan Dahl
d0f87457d7 Merge pull request #4331 from nnethercote/cleanups
Minor clean-ups
2014-02-26 12:06:13 -08:00
Brendan Dahl
6cce1e44dd Merge pull request #4292 from Snuffleupagus/issue-4232
Fix wrong page being displayed when entering/exiting Presentation mode with zoom set to 'page-fit'
2014-02-26 11:43:42 -08:00
Jonas Jenwald
4ee1fb7956 Fix spacebar scrolling in Firefox (4224 follow-up) 2014-02-26 20:17:58 +01:00
Brendan Dahl
0af0c6c99d Merge pull request #4229 from Rob--W/crx-stream-progress
Get progress bar for PDF streams in Chromium by passing the expected content length to the page
2014-02-26 11:12:34 -08:00
Brendan Dahl
890752680b Merge pull request #4224 from Rob--W/shortcut-responsiveness
Focus container when arrow/navigation keys are pressed
2014-02-26 10:52:17 -08:00
Nicholas Nethercote
d4e8b41639 Remove some unnecessary local variables. 2014-02-24 18:25:59 -08:00
Tim van der Meij
6d703ca640 Merge pull request #4327 from Snuffleupagus/issue-4315-followup
Move print icons now that all icons are the same size
2014-02-24 21:44:41 +01:00
Jonas Jenwald
2337e974f7 Move print icons now that all icons are the same size 2014-02-20 22:49:16 +01:00
shorlander
bef10a938a Clean up toolbar images and add Retina assets. 2014-02-20 16:10:46 -05:00
Yury Delendik
d28b890aa1 Merge pull request #4299 from peerlibrary/bind-compatibility
Fix for bind compatibility implementation (polyfill)
2014-02-18 09:00:17 -06:00
Mitar
628de8a1f4 Fix for bind compatibility implementation (polyfill).
Previously, reconstruction of arguments was incorrect if arguments contained
arrays. Arrays were added to arguments as their elements and not as a whole
array. It is enough to simply pass whole array to concat and it will be (only
one level deep) added to arguments.

In addition, we call slice on arguments for maximum compatibility (it is used
in Underscore.js library, with which I was comparing implementations while
debugging).
2014-02-15 03:48:18 -08:00
Gabriele Svelto
f4d54517c4 Bug 972435 - Recompress all PNG assets 2014-02-13 17:57:10 +01:00
Jonas Jenwald
d6ca563f46 Fix wrong page being displayed when entering/exiting Presentation mode with zoom set to 'page-fit' 2014-02-11 22:51:14 +01:00
Yury Delendik
4563f6cd58 Merge pull request #4191 from Rob--W/crx-chrome-os
Register PDF Viewer as PDF handler in Chrome OS's file browser
2014-02-11 12:51:36 -06:00
Brendan Dahl
b5b94a4af3 Use built in CMaps and unify the glyph mapping. 2014-02-11 10:27:09 -08:00
Brendan Dahl
e477958b74 Remove inline script warnings. 2014-02-03 14:14:54 -08:00
Rob Wu
ce9400dc8b Handle navigation keys when viewer is not focused
Restrict the scrollbar hack to the keycode for "spacebar",
since the bug only occurs in Firefox with spacebar.

Keyboard navigation is only activated for the spacebar if
the currently focused element is not a button.
2014-01-31 14:59:49 +01:00
Rob Wu
eaf7daf7db [CRX] Pass expected length of stream to viewer
To get a progress bar for POST/FTP requests in Chromium.
2014-01-30 23:03:15 +01:00
Rob Wu
64a4a27455 Remove obsolete code from shortcut handler
These lines were introduced in 612f59aa10
when the only shortcuts were +/-/=/0 (to change zoom level).
Back then, when the input fields were focused, using these keys would
add these unwanted characters to the input field and change the zoom
level of the viewer. Having both operations at the same time was an
undesired event, so a check was inserted, to ignore shortcuts when
the toolbar is focused.

The #toolbar element doesn't exist any more, so these lines are obsolete.
2014-01-30 15:26:51 +01:00
Rob Wu
65701f941d Get rid of weird scrollbar on mouse down 2014-01-30 15:06:04 +01:00
Yury Delendik
b4eceac826 Merge pull request #4209 from Rob--W/grab-to-pan-performance
Update Grab to pan to fix performance issue
2014-01-29 15:30:58 -08:00
Rob Wu
45c633b072 Update Grab to pan to fix performance issue
Reported at http://stackoverflow.com/questions/21392844/pdf-js-recalculating-problme
See also e0f893753a

Changes versus grab-to-pan.js: Moved inline style to viewer.css,
lowered z-index from 2e9 to 50000 (note to future maintainers:
make sure that all other z-index values stay below 50000!).
2014-01-30 00:16:25 +01:00
Rob Wu
9df998914d Print shortcut: Ctrl + (Shift +) P only
The previous version interfered with the full screen shortcut
 (Ctrl + Alt + P).
The new version only intercepts Cmd/Ctrl + P (all browsers).
And Ctrl + Shift + P in Chrome / Opera (Presto and Chromium),
because these browsers also associate a Print operation with
the shortcut.
2014-01-29 18:38:42 +01:00
Brendan Dahl
c2e31cd1ef Merge pull request #4205 from yurydelendik/blob-open-file
Using blob URL for open file
2014-01-28 14:15:35 -08:00
Brendan Dahl
0e000392ae Merge pull request #4179 from yurydelendik/dataLoaded
Fixes PDFDocumentProxy.getDataLoaded API name (and refactoring)
2014-01-28 13:56:01 -08:00
Yury Delendik
e5e9c6e243 Fixes PDFDocumentProxy.getDownloadInfo API name (and refactoring) 2014-01-28 15:13:47 -06:00
Tim van der Meij
b4b145507c Implements mouse wheel behaviour for non-Firefox browsers 2014-01-28 20:52:25 +01:00
Yury Delendik
48f0d0a131 Refactors nextPageMatch (nits) 2014-01-28 11:11:02 -06:00
Yury Delendik
187c9007ef Merge pull request #4131 from karlden/findUnboundedRecursionBug960409
Fixes find functionality recursion (bugzilla FF bug 960409)
2014-01-28 06:44:42 -08:00
Brendan Dahl
59526a7cf1 Merge pull request #4189 from yurydelendik/split-pattern
Refactors shared/pattern.js into core/ and display/
2014-01-27 17:40:22 -08:00
Yury Delendik
18515b8668 Using blob URL for open file 2014-01-27 13:11:02 -06:00
Yury Delendik
570c4f5660 Merge pull request #4203 from timvandermeij/outline-chrome
Removes button outline as visible in Chrome
2014-01-27 06:40:01 -08:00
Tim van der Meij
fa603af391 Removes button outline as visible in Chrome 2014-01-27 11:57:33 +01:00
Rob Wu
7bbff32a4d [security] Verify message source in Firefox add-on
And put initPassiveLoading within a preprocessor block because
it is only used by Firefox.
2014-01-26 12:55:48 +01:00
Rob Wu
60fb28caf0 Register as File browser handler in Chrome OS 2014-01-25 22:37:19 +01:00
Rob Wu
b0e18a0703 [CRX] Remove redundant location.origin check
The PDF Viewer will always be rendered directly from the extension,
so checking "origin == chrome-extension:/.." is not needed any more.
( since edd4bae903 )
2014-01-25 21:44:58 +01:00
Rob Wu
aeaf11ca43 [CRX] Fall back to sender.tab.url if !tab.url
sender.url is relatively new (Chromium 29)
 ( https://chromiumcodereview.appspot.com/14301016 )
2014-01-25 20:15:43 +01:00
Yury Delendik
bf432a37bb Refactors shared/pattern.js into core/ and display/ 2014-01-25 12:18:22 -06:00
Tim van der Meij
c952b6fb85 Miscellaneous improvements for the document properties dialog 2014-01-23 00:30:48 +01:00
Yury Delendik
ba1eb4d1d1 Merge pull request #4126 from Rob--W/crx-using-streams-api
Chromium extension using streamsPrivate API!
2014-01-22 05:12:07 -08:00
Tim van der Meij
5f7ded4ff6 Document properties 2014-01-22 00:07:07 +01:00
Tim van der Meij
d25b0a74d0 RTL CSS improvements 2014-01-21 22:56:19 +01:00
Brendan Dahl
e13500e46b Merge pull request #4140 from timvandermeij/close-secondary-toolbar
Close the secondary toolbar when an action is performed once
2014-01-21 11:47:11 -08:00
Brendan Dahl
f18e3e9e0f Merge pull request #4144 from yurydelendik/api-doc
Misc fixes for the API docs
2014-01-21 11:31:16 -08:00
Sriram
151cd6dee8 Terminate worker of previous doc 2014-01-21 07:13:27 +05:30
Yury Delendik
96fff4cc74 Refactors getTextContent return value 2014-01-17 13:26:00 -06:00
Yury Delendik
2b298a7a34 Adds make minified command 2014-01-17 10:50:54 -06:00
Jonas Jenwald
80f5ae518f Remove old CSS rules 2014-01-17 16:31:51 +01:00
Tim van der Meij
e14d917161 Close the secondary toolbar when an action is only performed once 2014-01-17 12:16:43 +01:00
Karl Denninghoff
1be27e3c81 Fixes but 960409 and adresses review comments including removal of do-while construct 2014-01-16 13:58:29 -08:00
Brendan Dahl
ff66c23e6e Merge pull request #4089 from yurydelendik/issue3725
Takes ascent/descent in account in the text layer
2014-01-16 13:12:04 -08:00
Brendan Dahl
3b829f4a45 Merge pull request #4103 from yurydelendik/issue3977
Introduces disableObjectCreateURL
2014-01-16 10:51:22 -08:00
Jonas Jenwald
181e06f30a Fix regression that disabled the "Open With Different Viewer" button on the fallback bar 2014-01-16 13:49:39 +01:00
Rob Wu
cdadb0db4d Proof of concept using chrome.streamsPrivate API
This method captures all application/pdf streams, loads the viewer
and passes the stream to the PDF.js viewer.

This commit shows a proof of concept using the chrome.streamsPrivate API.

Advantages of new method:
- Access to the response body of the original request, thus fewer
  network requests.
- PDFs from non-GET requests (e.g. POST) are now supported.
- FTP files are also supported.

Possible improvements:
- Use declared content scripts instead of dynamic chrome.tabs.executeScript.
  This allows the extension to render the viewer in frames when the
  extension is disallowed to run executeScript for the top URL.
- Use chrome.declarativeWebRequest instead of webRequest, and replace
  background page with event page (don't forget to profile the
  difference & will the background/event page still work as intended?).
2014-01-15 23:04:15 +01:00
Brendan Dahl
a340336269 Merge pull request #4081 from yurydelendik/doubledraw
Avoiding double draw() calls
2014-01-14 14:33:16 -08:00
Tim van der Meij
3e8795f8b8 Prevent the open file button from appearing in the B2G viewer/preview 2014-01-14 00:09:54 +01:00
Tim van der Meij
e05bda4045 De-inline CSS for the 'open file' button 2014-01-13 22:04:36 +01:00
Tim van der Meij
08e1ef356a Make presentation mode use a black background 2014-01-13 21:30:47 +01:00
Tim van der Meij
ee48522a86 Merge pull request #4109 from Snuffleupagus/css-zoom-annotations
Update the annotationLayer when using CSS only zoom
2014-01-13 12:14:12 -08:00
Jonas Jenwald
3c637b7ca9 Update the annotationLayer when using CSS only zoom 2014-01-12 23:07:56 +01:00
Jonas Jenwald
05c331c295 Maintain the current position in the document when zooming 2014-01-11 13:01:25 +01:00
Yury Delendik
a8c11ad1e5 Introduces disableObjectCreateURL 2014-01-10 16:30:41 -06:00
Yury Delendik
2f4246abe4 Fixes FitV scrolling 2014-01-10 12:15:09 -06:00
Tim van der Meij
ae117c296a Merge pull request #4088 from Rob--W/handtool-button-is-null
Allow hand tool toggle button to be optional
2014-01-08 14:41:20 -08:00
Yury Delendik
0131101275 Takes ascent/descent in account in the text layer 2014-01-08 13:50:52 -06:00
Brendan Dahl
ebdd710da3 Merge pull request #4034 from Snuffleupagus/setScale-regression
Fix setScale regression that affects exiting Presentation Mode on narrow window widths
2014-01-08 10:04:35 -08:00
Rob Wu
838802c2d3 Explain meaning of elements in secondary_toolbar 2014-01-08 11:59:30 +01:00
Brendan Dahl
5d080a03bb Show a different warning for PDF’s with forms. 2014-01-07 16:03:45 -08:00
Rob Wu
f2d13a2e2c Test if toggleHandTool is null before using it
Do not break the viewer if the buttons are not
available for some reason.
2014-01-07 22:55:38 +01:00
Yury Delendik
378c49c2d8 Avoiding double draw() calls 2014-01-07 10:59:54 -06:00
Yury Delendik
5bf3e44e30 Introduces LegacyPromise; polyfills DOM Promise 2014-01-03 18:17:05 -06:00
Yury Delendik
122cd150d4 Merge pull request #4048 from brendandahl/unsupported-features
Only trigger warning bar on certain unsupported features.
2014-01-03 16:01:20 -08:00