Jonas Jenwald
e5c4819601
Small refactoring of the code that calls |PDFViewerApplication.setInitialView|
...
This is a minor cleanup, to avoid an unnecessary `Promise.all` and to simplify catching |ViewHistory| errors.
10 years ago
Jonas Jenwald
6091e7bd6b
Move the code that resets the history state when the |showPreviousViewOnLoad| preference is set to |false|
...
Since this code is *only* necessary if/when the history is actually enabled, this patch refactors it to actually reflect that.
10 years ago
Jonas Jenwald
03497eabd5
Move fetching of the |defaultZoomValue| preference value to |PDFViewerApplication.initialize|
...
For consistency, this preference should be placed amongst the others. The current position is purely for "historical" reasons, since it was one of the first preferences that was added to the code.
10 years ago
Jonas Jenwald
36400ae48d
Add |pageActualOption| to the list of predefined zoom options in the |scalechange| event handler in viewer.js
...
This patch also rearrange the order of the references to the DOM elements of the predefined zoom values, in viewer.js, to correspond with the element order in the current viewer UI. (The previous ordering is a leftover from the previous viewer UI.)
10 years ago
Jonas Jenwald
65a5543efe
Disable PresentationMode for certain problematic configurations
...
Instead of trying to hack around various browser defects, let's just disable PresentationMode in the affected browsers. This patch:
- Disables PresentationMode in IE11+ when the viewer is embedded; fixes 4711.
10 years ago
speedplane
80d85b5fe7
Embedded PDF viewers should not be changing their parent page's title.
10 years ago
Rob Wu
6a16d7dd44
Reset state upon load if showPreviousViewOnLoad
...
And moved showPreviousViewOnLoad up to PDFViewerApplication.initialize
10 years ago
Jonas Jenwald
8131440f9e
Move the call to |PDFFindController.resolveFirstPage| into PDFViewer
...
From reading IRC scrollback, it became clear that having to manually call `PDFFindController.resolveFirstPage` in order for the find functionality to work isn't particulary good. Hence this PR, which moves that code into `PDFViewer.setDocument` to make life easier for third-party implementations.
10 years ago
Jonas Jenwald
d53fa1884b
Simplify a couple of preprocessor tags in viewer.js
10 years ago
Jonas Jenwald
bb16475070
Use the |shadow| function from src/shared/util.js in viewer.js
10 years ago
Tim van der Meij
4c6ca1c78f
Remove DownloadManager dependency
...
We can pass it in using the options object. Note that that this also avoids creating a DownloadManager object for each separate link (instead, having only one is enough).
10 years ago
Tim van der Meij
733882ac25
Refactor PDFAttachmentView to be more class-like and to separate functionality into methods
10 years ago
Tim van der Meij
609e2a30e9
Rename DocumentAttachmentsView to PDFAttachmentView
10 years ago
Tim van der Meij
2c19d99a2e
Rename document_attachments_view.js to pdf_attachment_view.js
10 years ago
Tim van der Meij
ea1d37eb0d
Refactor PDFAttachmentView to be more class-like and to separate functionality into methods
10 years ago
Tim van der Meij
b17da309ed
Rename DocumentOutlineView to PDFOutlineView
10 years ago
Tim van der Meij
3eeb571425
Rename document_outline_view.js to pdf_outline_view.js
10 years ago
fkaelberer
d3022e1e70
Update thumbnail images only when sidebar is visible
10 years ago
fkaelberer
047d61ed1f
Update thumbnail style only when sidebar is visible
10 years ago
Jonas Jenwald
c55dcf19a0
Move PDFThumbnailViewer to its own file
10 years ago
Jonas Jenwald
af6170ffd0
Attempt to display the File size quicker in the Document Properties dialog (PR 5554 followup)
10 years ago
Yury Delendik
d52289d8fd
Fixes B2G file open sequence.
10 years ago
Jonas Jenwald
3f061cef86
Add a |textlayerrendered| event
10 years ago
Yury Delendik
3a61edfcae
Refactors getDocument and adds PDFDataRangeTransport.
10 years ago
Jonas Jenwald
5aad040735
Fix handling of "Fit" zoom values in setHash (issue 5581)
10 years ago
Yury Delendik
22c62685b0
Removes Stats dependency from PDFPageView.
10 years ago
Yury Delendik
fe4ac86781
Removes PDFPageSource
10 years ago
Yury Delendik
f68678086d
Simple restructuring PageView into PDFPageView
10 years ago
Jonas Jenwald
6078901962
Prevent a "TypeError: pdfViewer is null" when the viewer loads (PR 5413 followup)
...
Currently if you manage to e.g. open the console (with <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>K</kbd>) before the viewer is initialized, the following will be printed in the console: `TypeError: pdfViewer is null`.
This doesn't cause any actual errors, but nevertheless it seems like something we should avoid.
Followup to PR 5413.
11 years ago
Jonas Jenwald
2505c8613b
Allow localization of the placement of percent signs in the zoom box
11 years ago
Jonas Jenwald
a1f4bff4f3
Disable zooming in Presentation Mode
11 years ago
Tim van der Meij
b215af30d3
Require destinations when they are needed and do not fetch all of them in advance
11 years ago
Jonas Jenwald
ecbb39f983
Fix loadingBar hiding when disableAutoFetch is enabled (issue 3590)
11 years ago
Jonas Jenwald
cfeb4c1019
Small refactoring of the loadingBar hiding code
11 years ago
Jonas Jenwald
a429e88c3b
Fix inconsistencies in the preference names used by PDFViewerApplication
...
Since `preferenceSidebarViewOnLoad` is an enumeration value, it seems better to initialize it with the default one instead of a boolean.
`preferencesPdfBugEnabled` uses a superfluous "s", which is a typo I made when I introduced it.
11 years ago
Jonas Jenwald
b9ef80e167
Add a page loading indicator to the page number input
11 years ago
Yury Delendik
5e0b2d383f
Fixes enabling pdfBug
11 years ago
Yury Delendik
374b94381d
Moves scrollPageIntoView to the PDFViewer.
11 years ago
Yury Delendik
44779f14b0
Renames and refactors PDFView to PDFViewerApplication.
11 years ago
Yury Delendik
a89bba35b2
Adds types definitions (jsdoc) for the PDFViewer code.
11 years ago
Yury Delendik
3773972dce
Marks some private methods in PDFViewer and PDFThumbnailViewer
...
Conflicts:
web/pdf_viewer.js
11 years ago
Yury Delendik
a1eca2084d
Moves constants to avoid dependency on PDFView
11 years ago
Yury Delendik
f1851c6393
Removes any usage of PDFView in the PageView
11 years ago
Yury Delendik
fbd7eedce8
Removes PresentationMode dependency from PDFViewer
11 years ago
Yury Delendik
a06a974f78
Moves rendering queue logic from PDFView
11 years ago
Yury Delendik
7642c39734
Moves pdfDocument.getPage/getTextContent requests out of PDFView
11 years ago
Yury Delendik
7af8748151
Moves viewer code into PDFViewer and some code from PageView.
11 years ago
Yury Delendik
3bce14761a
Moves thumbs logic into PDFThumbnailViewer.
11 years ago
Yury Delendik
bfefadb87c
Moves watchScroll and getVisibleElements from PDFView
11 years ago
Yury Delendik
c3f191a27c
Implement streaming using moz-chunk-arraybuffer
11 years ago