Commit Graph

1413 Commits

Author SHA1 Message Date
Tim van der Meij
c67ad28673 Remove unused annotation highlight div
This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.
2014-12-21 17:38:22 +01:00
dustyrockpyle
7a0e764ffd Added page break hints in viewer css. 2014-11-26 11:56:00 -05:00
Tim van der Meij
dc5961d969 Merge pull request #5465 from Snuffleupagus/findbar-notFound-color
[GENERIC viewer] Fix the background color of the findInput when the search term is not found
2014-11-18 20:07:31 +01:00
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.
2014-11-15 12:17:10 +01:00
Yury Delendik
bb91aa5e38 Merge pull request #5478 from Snuffleupagus/bug-1018882
Prevent text selection in Presentation Mode (bug 1018882)
2014-11-11 09:15:50 -06:00
Yury Delendik
e294c8883a Merge pull request #5203 from Snuffleupagus/disableAutoFetch-loadingBar
Fix loadingBar hiding when disableAutoFetch is enabled (issue 3590)
2014-11-11 09:05:16 -06:00
Yury Delendik
3b9a78d3d8 Merge pull request #5416 from Snuffleupagus/percent-sign-l10n
Allow localization of the placement of percent signs in the zoom box
2014-11-11 08:30:07 -06:00
Jonas Jenwald
ce62b9387d Remove any active text selection when entering Presentation Mode 2014-11-07 12:53:21 +01:00
Jonas Jenwald
86309faf3c Prevent text selection in Presentation Mode (bug 1018882) 2014-11-07 12:02:48 +01:00
Jonas Jenwald
fbca0e1ab0 [GENERIC viewer] Fix the background color of the findInput when the search term is not found
When a search term isn't found, the background color of the findInput is supposed to change (to red). This is currently not working as intended, because the CSS rule is not being applied correctly. (It seems that this broke in PR 2208.)

This patch also changes the background color to match the one used in the native Firefox findbar, since the old color seemed a bit too pink.
2014-11-01 20:26:44 +01:00
Jonas Jenwald
4ed3074011 Fix regression that prevents downloading of font files in the debugger
This is a regression from PR 5366.
2014-10-28 19:56:55 +01:00
Jonas Jenwald
2505c8613b Allow localization of the placement of percent signs in the zoom box 2014-10-21 21:41:06 +02:00
Jonas Jenwald
a1f4bff4f3 Disable zooming in Presentation Mode 2014-10-15 22:25:31 +02:00
Jonas Jenwald
670b842e09 Fix "Automatic Zoom" for landscape documents with very wide pages (issue 5398) 2014-10-12 02:25:35 +02:00
Brendan Dahl
c8d729ff39 Merge pull request #5325 from fzembow/findcontrollerfix
Update findbar to wrap on initial search
2014-10-08 11:05:07 -07:00
Tim van der Meij
b215af30d3 Require destinations when they are needed and do not fetch all of them in advance 2014-10-06 22:26:18 +02:00
Jonas Jenwald
ecbb39f983 Fix loadingBar hiding when disableAutoFetch is enabled (issue 3590) 2014-10-05 23:16:36 +02:00
Jonas Jenwald
cfeb4c1019 Small refactoring of the loadingBar hiding code 2014-10-05 23:15:10 +02:00
Fil Zembowicz
dcb931dbe0 Use existing page count in nextMatch 2014-10-02 08:57:01 -04:00
Fil Zembowicz
4275481e08 Fix how matches are found in search
Instead of keeping track of where the search starts, just
keep track of the number of pages and make sure we don't
visit pages more than once.
2014-10-01 19:57:57 -04:00
Jonas Jenwald
5f83739190 Fix |cleanup| regression in the viewer 2014-10-02 00:24:01 +02:00
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.
2014-10-01 12:30:11 +02:00
Yury Delendik
29eb147d42 Merge pull request #4150 from Snuffleupagus/issue-3990
Add a page loading indicator to the page number input
2014-09-30 18:06:39 -05:00
Yury Delendik
193b55dba0 Fixes printing regression a10fde1 2014-09-30 18:01:30 -05:00
Jonas Jenwald
902b72ba50 Add updated loading-small.png (and corresponding Retina) asset 2014-10-01 00:13:45 +02:00
Jonas Jenwald
b9ef80e167 Add a page loading indicator to the page number input 2014-10-01 00:13:44 +02:00
Yury Delendik
1858fbfe82 Merge pull request #5366 from Rob--W/use-font-loader-api
Use font loader api
2014-09-30 16:35:41 -05:00
Yury Delendik
5e0b2d383f Fixes enabling pdfBug 2014-09-30 15:19:39 -05:00
Rob Wu
d0845df971 Use Font Loading API if available
http://dev.w3.org/csswg/css-font-loading/
2014-09-30 22:18:53 +02:00
Yury Delendik
5740b96020 Introduces 'pagesinit' event. 2014-09-30 12:41:53 -05:00
Yury Delendik
b16a406f3a Packages PDFViewer as a UI component. 2014-09-30 12:41:53 -05:00
Jonas Jenwald
a10fde165c Merge pull request #5362 from yurydelendik/css-import
Use CSS import to separate pdfviewer styles
2014-09-30 17:55:13 +02:00
Yury Delendik
70a0935737 Move text_layer_builder and pdf_viewer styles out 2014-09-30 10:48:29 -05:00
Yury Delendik
374b94381d Moves scrollPageIntoView to the PDFViewer. 2014-09-30 07:13:46 -05:00
Jonas Jenwald
b06e65e5d6 Followup fix for entering/exiting Presentation mode
Even after PR 5359, switching to/from Presentation mode is still sluggish and I'm still seeing `too much recursion` printed in the console.
I've managed to track down the issue to line https://github.com/mozilla/pdf.js/blob/master/web/page_view.js#L371. It appears that for this particular case, we actually *need* to set `noScroll = true` when calling the `_setScale` function. (Note that it only applies to *this* line, and not to Presentation mode in general.)
Given the amount of refactoring done to the viewer, I'm not sure what the best way to fix this would be. However I'm submitting this patch as an easy workaround for now, but we should probably refactor this to avoid calling a "private" method directly.
2014-09-30 13:02:53 +02:00
Yury Delendik
504d2c19e0 Fixes typo/regression of #5295 for presentation mode 2014-09-29 20:17:26 -05:00
Brendan Dahl
1145eb8c09 Merge pull request #5295 from yurydelendik/pdfviewer
Refactoring to move page display code into separate class
2014-09-29 15:23:35 -07:00
Yury Delendik
44779f14b0 Renames and refactors PDFView to PDFViewerApplication. 2014-09-28 10:39:56 -05:00
Yury Delendik
a89bba35b2 Adds types definitions (jsdoc) for the PDFViewer code. 2014-09-28 10:39:56 -05:00
Yury Delendik
3773972dce Marks some private methods in PDFViewer and PDFThumbnailViewer
Conflicts:
	web/pdf_viewer.js
2014-09-28 10:39:56 -05:00
Brendan Dahl
9c56c6f9f6 Merge pull request #5263 from yurydelendik/stream
Implement streaming using moz-chunk-arraybuffer
2014-09-25 16:40:28 -07:00
Yury Delendik
e0bb2f76d2 Merge pull request #5335 from Snuffleupagus/pdfBug-text-highlight
Fix text highlighting in the Font Inspector in the debugger
2014-09-24 07:14:03 -05:00
Jonas Jenwald
7af46b433d Fix a regression preventing page change in the Stepper in the debugger
This is a regression from ddd3c8fc2f, which prevents changing pages in the Stepper.

(Apart from fixing the bug, for the sake of consistency, I also removed one instance of `parseInt`.)
2014-09-24 10:38:27 +02:00
Jonas Jenwald
9c3ea3c40b Fix text highlighting in the Font Inspector in the debugger
After PR #5282, the text highlighting in the Font Inspector is very hard to see against a white background. That seems to be an oversight from the mentioned PR, hence this patch fixes that.
2014-09-24 00:18:35 +02:00
Brendan Dahl
a2e8a5ee7f Merge pull request #5282 from CodingFabian/nicer-overlapping-text-selection
TextLayer selection coloring improvement for overlap.
2014-09-23 14:15:47 -07:00
Yury Delendik
a1eca2084d Moves constants to avoid dependency on PDFView 2014-09-21 12:47:26 -05:00
Yury Delendik
f1851c6393 Removes any usage of PDFView in the PageView 2014-09-21 12:47:26 -05:00
Yury Delendik
fbd7eedce8 Removes PresentationMode dependency from PDFViewer 2014-09-21 12:47:26 -05:00
Yury Delendik
a06a974f78 Moves rendering queue logic from PDFView 2014-09-21 12:47:26 -05:00
Yury Delendik
7642c39734 Moves pdfDocument.getPage/getTextContent requests out of PDFView 2014-09-21 12:47:26 -05:00