Commit Graph

802 Commits

Author SHA1 Message Date
Yury Delendik
74d02c3406 Merge pull request #5254 from mancas/bug
Avoid showing 'blob..' as a title when using pdfjs from B2G
2014-09-11 17:03:47 -05:00
sangm
f4ccb1b61c Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides the document info title 2014-09-11 11:10:47 -05:00
Manuel Casas Barrado
f40fa1ac2a Bug 1054643 - [B2G][PDF Viewer]PDF Viewer title is shown as blob:... 2014-09-11 08:09:56 +02:00
Yury Delendik
15059ea603 Merge pull request #5229 from cpeterso/cpeterso/auto-fit-landscape
Auto zoom landscape documents (like slide presentations) to fit their height
2014-09-09 09:49:15 -05:00
Chris Peterson
81d5bd86ea Replace magic scale value 0 with UNKNOWN_SCALE 2014-08-23 00:14:44 -07:00
Chris Peterson
50a4510ab7 Auto zoom landscape documents to fit their height 2014-08-23 00:14:18 -07:00
Jonas Jenwald
5abe1cae6a Fix Zoom box resizing when it's hidden when the viewer loads (issue 5224) 2014-08-21 17:57:57 +02:00
Fabian Lange
403a4e2bda Debounces scroll events in web viewer.
As requested in #5178, this change debounces the scroll events.
The reason for doing so is that browsers can event-storm especially on
scroll, communicating hundreds of subpixel changes.

The main reason for this resulting in poor performance is that on each
scroll event `scrollTop` was queried, which forces layouting.

This change will use `requestAnimationFrame` to make sure the browser can
allocate enough time to other tasks. The delay is however quite small, thus
the reduction in executions is less noticeable. Modern browsers however utilize
`requestAnimationFrame` to smoothen out rendering.
2014-08-18 23:23:32 +02:00
Yan Or
d8bc16362c Bug 1054590 - [pdf.js] Update to use gaia-header 2014-08-15 17:57:07 -07:00
Jonas Jenwald
ca1dbda348 Disable the "Go to First/Last Page" buttons when the first/last page is currently active
Since the "Previous/Next Page" buttons are disabled when the first/last page is active, I think that for the sake of consistency the "Go to First/Last Page" should behave the same way.
2014-08-12 12:58:59 +02:00
Jonas Jenwald
3fd6c468b7 Attempt to display the File size quicker in the Document Properties dialog
Currently the File size field in the Document Properties dialog isn't set until `PDFView.pdfDocument.getDownloadInfo()` is resolved. If the Document Properties dialog is opened while a PDF file is loading with range requests, this leads to the less desirable situation where all fields *except* File size are available.

In cases where `PDFView.open()` is called with the `args` parameter defined, and `args` contains the property `length`, we actually know the File size when the PDF file begins to load. (This is usually the case when ranged loading is used in the Firefox addon/built-in version.)
Hence we can use `args.length` to set the File size immediately when `PDFView.open()` is called, resulting in a better user experience.
2014-08-11 16:44:36 +02:00
Jonas Jenwald
4737e1ad8d Remove old unused code from PDFView.close() 2014-08-10 16:50:21 +02:00
Yury Delendik
e8af56ffc5 Fixes text-selection example 2014-08-06 10:09:27 -05:00
Yury Delendik
196416cc17 Merge pull request #5100 from Rob--W/load-file-in-main-thread
Load file:-URLs in the main thread.
2014-08-06 09:54:46 -05:00
Yury Delendik
df8d2573dd Merge pull request #5007 from timvandermeij/pdfview-tlb
Converting PDFFindBar and PDFFindController to classes
2014-08-05 18:32:38 -05:00
Hengjie
eaa587753b Fix issue where pdfDocument is null
Happens when no file is loaded
2014-08-04 12:27:47 +12:00
Rob Wu
bd25f6be94 Load file:-URLs in the main thread.
QtWebKit does not support file:-URLs in Web Workers.
To solve this issue, I'm loading file:-URLs in the main thread
for generic builds. file:-URLs load relatively quick, so there
is no need for sophisticated load progress notifications.
2014-08-01 16:53:41 +02:00
Tim van der Meij
ea85a2f7a7 Use strict equalities in web/viewer.js 2014-07-31 22:06:38 +02:00
Tim van der Meij
dbe22475e1 Converting PDFFindBar and PDFFindController to classes 2014-07-29 21:59:01 +02:00
Rob Wu
bb13fb939e Initialize PDFView.url = ''
The absence of this property caused the following error in PDFView.download:

   Cannot read property 'split' of undefined

This property was unset when the PDF was loaded through a typed array instead
of a URL. With the fix, the file name will default to "document.pdf", as
defined by getPDFFileNameFromURL in web/ui_utils.js
2014-07-24 23:37:31 +02:00
Lu Wang
91b7030bf4 fix typo 2014-07-23 23:59:27 -07:00
Fabian Lange
6447397c04 Do not run cleanup while printing is ongoing. 2014-06-25 12:53:58 +02:00
Yury Delendik
df87df59b6 Increases page cache size when needed 2014-06-17 13:41:40 -05:00
Yury Delendik
6f79aef03a Uplift for B2G bug 1009780 - Improve open mechanism for downloads. 2014-06-16 19:06:36 -05:00
Jonas Jenwald
22cfcbcf8a Merge pull request #4952 from yurydelendik/telemetry
Collect More Telemetry Data
2014-06-17 00:36:58 +02:00
Yury Delendik
7ac1c6b034 Reporting print usage 2014-06-14 15:55:21 -05:00
Jonas Jenwald
5ac4dd9593 Prevent rendering unnecessary pages when the HOME/END keys are pressed
Currently (at least in Firefox) when the HOME/END keys are pressed, this will trigger unnecessary rendering of pages that lay between the current page and the first/last page. Avoid this by going straight to the first/last page instead.
2014-06-14 14:11:42 +02:00
Nicholas Nethercote
f852cefdd8 Halve the size of the PageView cache. 2014-06-13 07:53:36 -07:00
Yury Delendik
2efbdfe8d4 Merge pull request #4834 from dferer/canvas-max-size
Limit the size of canvases to 5MP (iOS restriction)
2014-06-13 09:37:42 -05:00
Yury Delendik
cab043028b Merge pull request #4924 from yurydelendik/fixthumb
Fixes drawImage for thumbs
2014-06-13 09:07:41 -05:00
Samuel Chantaraud
952545e20f Limit the size of canvases to 5MP (iOS restriction) 2014-06-12 17:58:58 -04:00
Yury Delendik
d57f83e087 Reverting back disableWebGL preferences check 2014-06-12 14:47:46 -05:00
Yury Delendik
3b405cf611 Protects PDFJS.disableXXX == true from change 2014-06-12 12:40:59 -05:00
Yury Delendik
a338a7966d Fixes drawImage for thumbs 2014-06-12 10:28:42 -05:00
deathy
7d975dfe22 Fix destination name for 'Fit' zoom levels in hash params 2014-06-11 21:11:56 +03:00
Mohammed Abu-alsaad
e6546642db Added more preference variables from the available hash parameters 2014-05-30 10:44:41 +12:00
Jonas Jenwald
5cd6dddeee Convert the existing overlays to use the OverlayManager 2014-05-25 21:33:15 +02:00
Samuel Chantaraud
37c3641fad Added Promise.catch
Fixed Promise so it rejects on uncaught exception
Catch possible rejection on ViewHistory.setMultiple
2014-05-22 13:53:19 -04:00
Jonas Jenwald
b88c5330a9 Reduce the number of calls to PDFView.getVisiblePages from updateViewarea 2014-05-10 16:43:22 +02:00
Yury Delendik
c5eb058b09 Uses rAF to interrupt the operator list execution 2014-05-09 07:00:47 -05:00
Jonas Jenwald
c53bcb2992 Add a preference to set the sidebarView on load 2014-04-28 20:32:41 +02:00
Jonas Jenwald
159e86f7ab Ensure that the viewer loads even if there are errors when the preferences are read 2014-04-28 11:01:58 +02:00
Yury Delendik
42ed9025ef Merge pull request #4692 from Snuffleupagus/viewHistory-setMultiple
Add support for setting multiple values at once in ViewHistory
2014-04-27 23:26:38 -05:00
Jonas Jenwald
51d6ad7176 Fix the display of the indeterminate progress bar when the loaded percentage is NaN (issue 4696) 2014-04-27 22:11:25 +02:00
Jonas Jenwald
69eafaa58f Add support for setting multiple values at once in ViewHistory 2014-04-25 22:57:01 +02:00
Tim van der Meij
107cd8007f Move DocumentAttachmentsView to its own file 2014-04-24 22:58:21 +02:00
Tim van der Meij
1e119e093b Move DocumentOutlineView to its own file 2014-04-24 22:58:13 +02:00
Jonas Jenwald
4e1362642a Only handle scroll events when PDFView.pdfDocument is defined (issue 4642) 2014-04-19 01:55:10 +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
Rob Wu
d7dfa447cd Remove unused (local) variables in web/ 2014-04-15 17:10:23 +02:00