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
Yury Delendik
7af8748151
Moves viewer code into PDFViewer and some code from PageView.
2014-09-21 12:47:07 -05:00
Yury Delendik
3bce14761a
Moves thumbs logic into PDFThumbnailViewer.
2014-09-20 08:19:04 -05:00
Yury Delendik
bfefadb87c
Moves watchScroll and getVisibleElements from PDFView
2014-09-20 08:19:04 -05:00
Yury Delendik
12ec2a000b
Merge pull request #5318 from mitar/patch-2
...
textLayer is not used anymore in render context
2014-09-20 08:17:35 -05:00
Yury Delendik
c3f191a27c
Implement streaming using moz-chunk-arraybuffer
2014-09-19 19:05:25 -05:00
Yury Delendik
63b7fa5634
Merge branch 'issue-4954' of https://github.com/Snuffleupagus/pdf.js into hashes
...
Conflicts:
web/viewer.js
2014-09-19 18:25:11 -05:00
Mitar
2f72ac1255
textLayer is not used anymore in render context.
...
It should be removed to prevent confusion when reading the code.
2014-09-19 15:13:01 -07:00
Manuel Padrón Martínez
293d566f67
Changed to lowercase everywhere the hashParams is compared
2014-09-18 20:18:23 +01:00
Manuel Padrón Martínez
4623f20221
Lowerize the params to allow case sensitive
2014-09-18 19:42:04 +01:00
Yury Delendik
ffb613bbac
Merge pull request #5275 from Snuffleupagus/exception-propagation
...
Fix the exception propagation when rejecting workerReadyCapability
2014-09-16 10:05:34 -05:00
Jonas Jenwald
ed5fc43510
Add |UnexpectedResponseException| to fix the exception handling when file loading fails because the server responds with a non 404 status message
2014-09-14 11:52:33 +02:00
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
9261cd9766
Merge pull request #5271 from Rob--W/opera-fixes
...
Opera fixes
2014-09-09 10:10:04 -05: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
Fabian Lange
931b444e00
TextLayer selection coloring improvement for overlap.
...
As a consequence of merging #5221 it is more likely to have multiple
overlapping selection divs inside the text layer. Because each individual
element gets the selection style applied, the 30%opacity stacks, making a
60% bar visible where the overlap happens.
As proposed by @rocallahan, this can be fixed by making the selection
style solid and setting opacity for the overall layer.
I assume also that this should make the work for the renderer easier, but
was unable to bench it.
2014-09-09 15:21:50 +02:00
Jonas Jenwald
2701edc7c6
Change getDocumentError
in web/viewer.js to use instanceof
instead of the exception name
2014-09-08 22:34:25 +02:00
Jonas Jenwald
ca027ebfdb
Fix the exception propagation when rejecting workerReadyCapability
...
Currently when an exception is thrown, we try to reject `workerReadyCapability` with multiple arguments in src/core/api.js. This obviously doesn't work, hence this patch changes that to instead reject with the exception object as is.
In src/core/worker.js the exception is currently (unncessarily) wrapped in an object, so this patch also simplifies that to directly send the exception object instead.
2014-09-08 22:20:41 +02:00
Yury Delendik
b3be74d81c
Merge pull request #5221 from nnethercote/dont-scale-single-char-text-divs
...
Don't scale single-char text divs.
2014-09-08 11:17:25 -05:00
Rob Wu
c9b3ea2f84
Adjust use of chrome.storage.managed for Opera
...
It turns out that chrome.storage.managed is defined for Opera, so the
previous feature detection method did not work.
2014-09-06 00:37:30 +02:00
Tim van der Meij
8c76501a49
Merge pull request #5226 from Snuffleupagus/issue-5224
...
Fix Zoom box resizing when it's hidden when the viewer loads (issue 5224)
2014-09-05 19:06:39 +02:00
Tim van der Meij
2158fcc0f1
Merge pull request #5259 from Rob--W/handtool-unfocus
...
Handtool: Remove focus from previous node on click
2014-09-03 20:34:20 +02:00
Tim van der Meij
d9ec0e58e0
Merge pull request #5237 from Snuffleupagus/fix-findInput-RTL-loading-indicator
...
Fix the placement of the findInput loading indicator in RTL locales
2014-09-03 20:31:33 +02:00
Rob Wu
204d540af2
Handtool: Remove focus from previous node on click
...
"This commit fixes the issue that a focused element cannot lose
focus when the draggable element is clicked."
https://github.com/Rob--W/grab-to-pan.js/commit/11c368f97cebe19
Steps to reproduce/verify:
1. Enable the hand tool (e.g. by using the H shortcut)
2. Click on the Page number input.
3. Click or drag the PDF canvas.
4. Observe that the page number input is still focused.
Consequently, the hand tool cannot be disabled using the H shortcut.
2014-09-03 16:31:47 +02:00
yscumc
4acb744f77
Update document_properties.js
...
Fix for minutes tz calculation
2014-08-28 16:22:57 -04:00
Jonas Jenwald
5c84dd319f
Fix the placement of the findInput loading indicator in RTL locales
...
Currently in RTL locales, the loading indicator is placed such that it is in the way when entring a search term. Hence this patch moves it to the other side of the input field to fix this.
2014-08-25 22:58:44 +02: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
Nicholas Nethercote
cd61aad24f
Don't scale single-char text divs.
...
This change makes scrolling noticeably smoother on files with many
single-char text divs, such as the one in #1045 . The trade-off is that
the visual appearance of text selection in such documents is slightly
worse, because more text divs overlap.
This change also uses `scaleX(N)` instead of `scale(N, 1)`. This might
be marginally more efficient in terms of JS string concatenation.
2014-08-20 19:34:33 -07:00
Tim van der Meij
b4fb1e21e7
Merge pull request #5209 from CodingFabian/text-layer-transform-origin
...
Set transformOrigin for text layer in css.
2014-08-19 22:59:55 +02:00
Fabian Lange
1da38ec91e
no need to set textlayer properties which are overwritten in individual styles.
2014-08-19 22:47:39 +02:00
Fabian Lange
6a0aa2cf49
Set transformOrigin for text layer in css.
...
transformOrigin is set to 0% 0% in all cases. This adds extra memory
impact into the dom tree. It also involves the CustomStyles workaround
to determine the correct css rule for the browser.
By setting all vendor and standard variants in css, the rule is applied
without the dom memory overhead and without the minor computation
overhead to set the value.
2014-08-19 22:46:09 +02:00
Yury Delendik
2f5c6d6c3a
Merge pull request #5208 from CodingFabian/debounce-scroll
...
Debounces scroll events in web viewer.
2014-08-18 22:53:28 -05: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
Yury Delendik
4ef70588de
Merge pull request #5193 from nnethercote/data-font-name
...
Only use data-font-name attributes when necessary.
2014-08-18 13:54:07 -05:00
Nicholas Nethercote
eda7dcbb9e
Only use data-font-name attributes when necessary.
...
The data-font-name attribute of textLayer divs are only used by the Font
Inspector. This change ensures they are only present when the pdfBug
tools are enabled.
2014-08-17 15:56:11 -07:00
Jonas Jenwald
61e24c6f45
Small re-factoring of DocumentProperties
...
With the changes made in PR 5169 to enable quicker display of the File size, `setFileSize()` can now be called during file loading. This function parses *and* localizes the file size, where the l10n is a synchronous operation.
This patch:
* Re-factors `setFileSize()` to *only* update `rawFileSize`, and moves parsing and fetching of the l10n string to a separate method that isn't called until the Document Properties dialog is actually opened.
* Adds a couple of checks to make sure that `rawFileSize` is set to a positive number.
* Removes the `fileName` and `fileSize` properties. Since they are parsed every time the Document Properties dialog is opened, it doesn't seem necessary to cache them.
2014-08-16 12:15:49 +02:00
Yan Or
d8bc16362c
Bug 1054590 - [pdf.js] Update to use gaia-header
2014-08-15 17:57:07 -07:00
Yury Delendik
c2f4b9d301
Merge pull request #5194 from nnethercote/no-absolute
...
Remove `position: absolute` from text divs.
2014-08-15 10:38:23 -05:00
Nicholas Nethercote
9695958ebc
Remove position: absolute
from text divs.
...
It's not necessary in each text div, because it's specified in the
`.textLayer > div` rule.
2014-08-15 08:17:20 -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
Adolfo Jayme Barrientos
ba426f479e
Reduce load progress bar’s height to 4 pixels
2014-08-11 23:09:38 -05: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
Tim van der Meij
0e4d9061b2
Merge pull request #5166 from Snuffleupagus/pdfViewClose-cleanup
...
Remove old unused code from PDFView.close()
2014-08-10 22:49:04 +02:00
Jonas Jenwald
4737e1ad8d
Remove old unused code from PDFView.close()
2014-08-10 16:50:21 +02:00
Tom De Wolf
a265861ba6
only convert in IE9 if the requested responseType is actually an arraybuffer, otherwise just return the responseText. That way the compatibility.js does not break other frameworks like angular that not always want an array from xhr requests.
2014-08-10 10:26:32 +02:00
Nicholas Nethercote
be29fc44e0
Avoid repeated creation of a simple RegExp object.
2014-08-07 22:08:23 -07: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
666cf02f91
Merge pull request #5137 from CodingFabian/optimize-textbuilder-renderLayer
...
Optimize TextLayerBuilder_renderLayer() for text heavy documents.
2014-08-06 09:09:32 -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
Fabian Lange
39129fc441
Optimize TextLayerBuilder_renderLayer() for text heavy documents.
...
This change improves the text layer creation of "normal" text heavy documents.
It changes 2 things:
* If the text element is not rotated, it will neither calculate nor apply a
textTransform: rotate(0deg) to the text layer element.
* For scaling the text layer div, the context will measure the width of the
text in the given font. For many text documents the font changes seldom.
If the font stays the same, the context does not need to be set to a new font
especially avoiding the temporary creation of the same font string over and
over again.
2014-08-06 00:40:48 +02:00
Hengjie
eaa587753b
Fix issue where pdfDocument is null
...
Happens when no file is loaded
2014-08-04 12:27:47 +12:00
Tim van der Meij
097bf41285
Use strict equalities in web/compatibility.js
2014-08-01 19:21:33 +02:00
Tim van der Meij
ddd3c8fc2f
Use strict equalities in web/debugger.js
2014-08-01 19:21:32 +02: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
7ca6f0839f
Use strict equalities in web/document_properties.js
2014-07-31 22:06:39 +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
24cf969422
Use strict equalities in web/ui_utils.js
2014-07-31 22:06:38 +02:00
Tim van der Meij
bf3aad8a95
Merge pull request #5082 from Rob--W/chromium-managed-preferences
...
Managed preferences for Chrome administrators
2014-07-30 23:58:25 +02:00
Rob Wu
00746011a3
Managed preferences for Chrome administrators
...
Implement support for managed preferences. This feature allows users
(administrators) to easily change the default settings of the PDF Viewer for
all Chrome or Chromium browsers within their organization.
External resources for end users (administrators)
- http://www.chromium.org/administrators/
- http://www.chromium.org/administrators/configuring-policy-for-extensions
- http://www.chromium.org/administrators/windows-quick-start
- http://www.chromium.org/administrators/mac-quick-start
- http://www.chromium.org/administrators/linux-quick-start
- http://www.chromium.org/administrators/policy-templates
Administrators can read one of the previous links to learn more about creating
policies. We want to auto-generate these templates, but there are no public
tools for doing that. It will be added in the future, see:
https://code.google.com/p/chromium/issues/detail?id=389061
Resources for PDF.js/extension developers
- http://cs.chromium.org/file:policy_templates.json
- https://developer.chrome.com/extensions/manifest/storage
2014-07-30 22:51:56 +02:00
Yury Delendik
7026543663
Merge pull request #5059 from timvandermeij/unused-code
...
Removing unused code and enforcing additional JSHint options
2014-07-29 15:04:43 -05: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
Yury Delendik
561fc8f98b
Adds ImageData set support for legacy safari
2014-07-22 11:40:32 -05:00
Jonas Jenwald
28e194f670
Adjust the tabindices in the viewer
...
The current way that the tabindices are defined, has the unfortunate consequence that adding a single button to the UI might mean having to change almost all tabindices. (This was the case in e.g. PR 4329.)
This patch attempts to avoid that situation happening again, by re-defining the tabindices slightly.
2014-07-19 12:31:11 +02:00
Tim van der Meij
34728ee49b
Removing unused code
2014-07-18 22:34:50 +02:00
Tim van der Meij
0ac83802ba
Merge pull request #5004 from CodingFabian/issue-5002
...
Improving CanvasPixelArray polyfill for Android
2014-06-30 22:16:03 +02:00
Fabian Lange
54fb1f7226
Improving CanvasPixelArray polyfill for Android
2014-06-25 18:44:49 +02:00
Fabian Lange
6447397c04
Do not run cleanup while printing is ongoing.
2014-06-25 12:53:58 +02:00
Fabian Lange
9fd6cc7f1e
Fixes CanvasPixelArray set polyfill for chrome < 21 ( #4974 )
2014-06-24 19:36:02 +02:00
Yury Delendik
6d86c92514
Merge pull request #4991 from timvandermeij/text-layer-builder-refactoring
...
Refactoring text layer builder and converting text layer builder to a class
2014-06-23 16:00:57 -05:00
Tim van der Meij
fa33b9c643
Refactoring PDFFindController in the text layer builder
2014-06-23 22:19:18 +02:00
Tim van der Meij
a968da8887
Convert the text layer builder to a class
2014-06-23 22:07:21 +02:00
Tim van der Meij
2a052c4aad
Refactoring text layer builder
2014-06-23 21:40:37 +02:00
Tim van der Meij
fbfb9458d6
Implement text normalization for page content and queries
2014-06-20 23:32:44 +02:00
Tim van der Meij
ec1b58a30a
Fix code style issues in pdf_find_controller.js and build strings more efficiently
2014-06-20 21:14:29 +02:00
Yury Delendik
c1c950ce74
Fixes AnnotationUtils in the extension build
2014-06-18 16:42:08 -05:00
Jonas Jenwald
2282c98500
Merge pull request #4965 from yurydelendik/annotations
...
Splits shared/annotation.js into core/ and display/
2014-06-18 17:01:38 +02:00
Yury Delendik
bdeca30fbf
Splits shared/annotation.js into core/ and display/
2014-06-17 17:43:33 -05:00
Jonas Jenwald
bab40caf7b
Merge pull request #4961 from yurydelendik/raf-ios
...
Disables broken rAF on iOS
2014-06-17 21:13:38 +02:00
Yury Delendik
df87df59b6
Increases page cache size when needed
2014-06-17 13:41:40 -05:00
Yury Delendik
dccc709b50
Disables broken rAF on iOS
2014-06-17 12:44:52 -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
Jonas Jenwald
3ead6e6a94
Disable the developer hash parameters by default in PRODUCTION builds of PDF.js
2014-06-17 00:32:57 +02:00
Yury Delendik
0cd28ebfa3
Telemetry for used stream and font types
2014-06-16 16:41:04 -05:00
Jonas Jenwald
1ba31a6cb7
Add pdfBugEnabled to the default preferences
2014-06-16 21:46:39 +02:00
Yury Delendik
7ac1c6b034
Reporting print usage
2014-06-14 15:55:21 -05:00
Yury Delendik
13efe84d37
Merge pull request #4941 from Snuffleupagus/avoid-rendering-pages-when-home/end-keys
...
Prevent rendering unnecessary pages when the HOME/END keys are pressed
2014-06-14 11:37:07 -05:00
Jonas Jenwald
c145f0e063
Add larger zoom values to zoom dropdown box
2014-06-14 15:51:55 +02: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
Yury Delendik
69d722792d
Merge pull request #4936 from nnethercote/fix-cache-splice
...
Fix PageView cache re-insertions.
2014-06-13 10:19:55 -05:00
Nicholas Nethercote
5b7df1830d
Fix PageView cache re-insertions.
2014-06-13 07:57:58 -07: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
Nicholas Nethercote
29d3db4422
Cache pages at the start of drawing, not the end.
2014-06-12 22:54:37 -07: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
Nicholas Nethercote
97cc06a7f9
Zero the height and width of the PageView canvas before deleting.
2014-06-12 16:33:30 +10:00
deathy
7d975dfe22
Fix destination name for 'Fit' zoom levels in hash params
2014-06-11 21:11:56 +03:00
Samuel Chantaraud
221d00a11f
Removed non-base64 bytes before the last 3 characters
2014-06-11 09:12:26 -04:00
Mohammed Abu-alsaad
2b595e6d32
Fixed IE links bug by adding a base64 transparent gif for anchor tags for
...
IE only.
2014-06-03 11:06:43 +12:00
Yury Delendik
5ded0ea163
Merge pull request #4866 from yurydelendik/issue4673
...
Removes mozResponseArrayBuffer
2014-06-02 12:51:29 -05:00
Yury Delendik
f9befa189b
Disables worker if XHR does not support arraybuffer
2014-05-29 20:38:50 -05:00
Yury Delendik
9c87fa24f7
Removes mozResponseArrayBuffer
2014-05-29 20:38:50 -05:00
Mohammed Abu-alsaad
e6546642db
Added more preference variables from the available hash parameters
2014-05-30 10:44:41 +12:00
Yury Delendik
34089212e0
Reverts mozRequestAnimationFrame to compatibility.js
2014-05-29 16:23:13 -05:00
Jonas Jenwald
ff0672e0fa
Merge pull request #4865 from yurydelendik/issue4854
...
Adds compatibility.js to the Firefox extension
2014-05-29 23:06:24 +02:00
Yury Delendik
825762f22a
Merge pull request #4803 from mzgol/compatibility
...
[WIP] Update web/compatibility.js
2014-05-29 11:57:34 -05:00
Yury Delendik
d95f78610e
Adds compatibility.js to the Firefox extension
2014-05-29 11:50:16 -05:00
Jonas Jenwald
7e6cdc74af
Merge pull request #4832 from yurydelendik/showtext
...
Refactors showText: split type3, remove showSpacedText
2014-05-29 12:58:09 +02:00
Tim van der Meij
5b16323916
Merge pull request #4856 from Snuffleupagus/overlay-manager-keydown-preventDefault
...
[OverlayManager] Add preventDefault to the keydown event handler
2014-05-28 19:16:49 +02:00
Yury Delendik
68b037ffb0
Add preprocessor directives for the extension; and refactor FirefoxCom callback
2014-05-28 10:24:06 -05:00
Michał Gołębiowski
85291dd8da
Update web/compatibility.js
...
1) Remove obsolete workarounds
2) Add support comments
2014-05-28 09:57:25 +02:00
Jonas Jenwald
164535fa93
[OverlayManager] Add preventDefault to the keydown event handler
2014-05-27 23:48:02 +02:00
Tim van der Meij
1f1de20d11
Small comment fix
2014-05-27 22:13:00 +02:00
Jonas Jenwald
5cd6dddeee
Convert the existing overlays to use the OverlayManager
2014-05-25 21:33:15 +02:00
Jonas Jenwald
6dc7a52e35
Simplify the interaction with overlays by adding an OverlayManager
2014-05-25 21:33:14 +02:00
Jonas Jenwald
002607502c
Merge pull request #4824 from yurydelendik/movecs
...
Moves colorspace.js and function.js into core/
2014-05-23 21:14:58 +02:00
Yury Delendik
fcc4dfd9b5
Moves shared/function.js to core/
2014-05-23 14:11:47 -05:00
Yury Delendik
7a19085159
Moves shared/colorspace.js into core/
2014-05-23 14:11:47 -05:00
Yury Delendik
d53dc2e7d6
Refactors showText: split type3, remove showSpacedText
2014-05-23 13:36:54 -05: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
Yury Delendik
09b24d5231
Merge pull request #4808 from fkaelberer/fixAndroidButtons
...
Fix strange looking buttons in mobile Firefox
2014-05-19 11:56:57 -05:00
fkaelberer
2d4c35cda7
fix buttons under android
2014-05-18 17:32:26 +02:00
Yury Delendik
97782cafa4
Update text layer correctly when zooming with USE_ONLY_CSS_ZOOM
2014-05-14 09:47:58 -05:00
Jonas Jenwald
73a9d50fd1
Refactor the CSS rules for the overlayContainer
2014-05-13 10:43:38 +02:00
Michał Gołębiowski
e625af3fef
Remove type="text/javascript" from script tags.
...
"text/javascript" is not a correct MIME type (the correct one is
"application/javascript") but it's not even needed; all browsers default
to the correct type and treat it as executable JS when type is ommited.
Since not all browsers recognize the "application/javascript" MIME type
the only way to both stay compliant and to support all popular browsers
is to omit the type. It's also shorter this way.
2014-05-13 02:41:01 +02:00
Jonas Jenwald
b88c5330a9
Reduce the number of calls to PDFView.getVisiblePages from updateViewarea
2014-05-10 16:43:22 +02:00
Tim van der Meij
53f3b1326a
Removes unused code from web/compatibility.js
2014-05-09 21:26:07 +02:00
Yury Delendik
c5eb058b09
Uses rAF to interrupt the operator list execution
2014-05-09 07:00:47 -05:00
Jonas Jenwald
ec50aa4e8c
Refactor how the database is read in ViewHistory
2014-04-29 15:59:51 +02:00
Jonas Jenwald
8bb19fac2d
Catch error when the creation of localStorage polyfill fails in the generic viewer
2014-04-29 15:50:48 +02:00
Yury Delendik
6c5a308dcc
Merge pull request #4689 from timvandermeij/ie-attachments
...
Fixes DownloadManager for IE10 and above
2014-04-28 16:31:57 -05:00
Tim van der Meij
19586721fb
Fixes DownloadManager for IE10 and above
2014-04-28 22:43:05 +02: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
Tim van der Meij
9d6ffbb3bf
Converts attachment items to buttons instead of links
2014-04-25 23:15:25 +02:00
Jonas Jenwald
69eafaa58f
Add support for setting multiple values at once in ViewHistory
2014-04-25 22:57:01 +02:00
Jonas Jenwald
48399a3ec7
Add writeToStorage method to ViewHistory
2014-04-25 20:13:17 +02:00
Jonas Jenwald
447d115ec1
[Firefox] Workaround for sessionStorage error when the preference network.cookie.lifetimePolicy is set to 1 (bug 1000777)
2014-04-25 18:12:25 +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
Yury Delendik
b088690f1a
Merge pull request #4645 from Snuffleupagus/issue-4642
...
Only handle scroll events when PDFView.pdfDocument is defined (issue 4642)
2014-04-23 20:23:41 -05:00
Jonas Jenwald
8edb5cc804
Fix regression preventing the setting of breakpoints in the Stepper (PDFBug)
2014-04-20 01:05:38 +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
Samuel Chantaraud
7a4543e348
Prevent the annotationLayer to be recreated when the page is redrawn
...
This allows interactive annotations to keep their states after a resize
2014-04-16 08:13:54 -04:00
Rob Wu
d7dfa447cd
Remove unused (local) variables in web/
2014-04-15 17:10:23 +02:00
Yury Delendik
b4a81cb472
Merge pull request #4628 from Snuffleupagus/issue-4625
...
Ensure that the errorWrapper is closed when a new document is opened (issue 4625)
2014-04-15 08:38:00 -05:00
Yury Delendik
689927282e
Removes reference to the Makefile
2014-04-15 08:27:35 -05:00
Jonas Jenwald
12f3d58506
Ensure that the errorWrapper is closed when a new document is opened (issue 4625)
2014-04-15 13:51:40 +02:00
Tim van der Meij
d05768078b
Setting empty tooltips for zoom select box items
2014-04-14 23:35:29 +02:00
Manuel Braun
e7da8edb91
Refactoring - remove duplicated code in TextLayerBuilder
2014-04-14 19:05:21 +02:00
Yury Delendik
1fd43a87db
Changes 'documentload' event behavior.
2014-04-13 21:07:36 -05:00
Yury Delendik
f6c631bc31
Reverts #4556 due to flicker on Chome
2014-04-11 14:07:36 -05:00
Yury Delendik
012a727eed
Merge pull request #4598 from Rob--W/crx-filesystem-worker
...
Work-around for filesystem:-URL bug
2014-04-11 13:50:41 -05:00
Yury Delendik
c88696cf5f
Merge pull request #4595 from brendandahl/search-regression
...
Append whitespace divs so matches still line up.
2014-04-11 11:48:57 -05:00
Rob Wu
bfcc8af6ed
Move logic from viewer.js to chromecom.js
...
and also default to '' instead of DEFAULT_URL to avoid trying to
load a non-existent file when no file has been specified.
2014-04-11 17:37:48 +02:00
Rob Wu
b64c06f68d
Work-around for filesystem:-URL bug ( #4592 ).
...
Visit https://robwu.nl/pdfjs/filesystem-worker-bug.htm and follow the
steps to verify that the extension works as intended with this patch.
2014-04-11 15:33:34 +02:00
Jonas Jenwald
965f7a7b14
Print WebGL status in the console
2014-04-11 13:37:50 +02:00
Yury Delendik
2c61f60a4e
Merge pull request #4577 from timvandermeij/reporter
...
Removes custom test/reporter.js from the lint process
2014-04-10 19:17:48 -05:00
Tim van der Meij
b348243866
Fixes lint warning W004 in /web
2014-04-11 00:02:33 +02:00
Tim van der Meij
a71a87a821
Fixes lint warning W018: confusing use of exclamation mark
2014-04-11 00:02:31 +02:00
Yury Delendik
d61ee23afc
Merge pull request #4556 from p01/OpaqueCanvas
...
Use Opaque Canvas
2014-04-10 16:54:26 -05:00
Brendan Dahl
5ba674c996
Append whitespace divs so matches still line up.
2014-04-10 14:01:21 -07:00
Jonas Jenwald
eb7f369c54
Remove leading and trailing spaces from info.Producer and info.Creator when printing debug info in the console (bug 872827)
2014-04-10 12:20:39 +02:00
p01
b10aa18b3e
Use Opaque Canvas where possible
2014-04-10 11:50:20 +02:00
Brendan Dahl
5bd8a83c9b
Build the text layer geometry on the worker.
2014-04-09 16:44:07 -07:00
Brendan Dahl
ed1f8c33bd
Merge pull request #4286 from yurydelendik/webgl
...
WebGL and misc memory optimizations
2014-04-07 14:33:34 -07:00
Yury Delendik
b39f0c311c
Refactors history and how the database is stored
2014-04-03 13:23:18 -05:00
Yury Delendik
30ab878835
Add enableWebGL to the preferences
2014-04-03 12:20:53 -05:00
Yury Delendik
9c59437ac3
Merge pull request #4455 from aib/master
...
Fix download button waiting if document has started but not completed downloading
2014-04-03 09:40:06 -05:00
Yury Delendik
4be65a9477
Merge pull request #4516 from dferer/ios-scrolling
...
Added CSS rules to improve scrolling on iOS devices
2014-04-03 09:34:20 -05:00
Yury Delendik
f57c6935d7
Implements WebGL support
2014-04-03 08:36:22 -05:00
Jonas Jenwald
42f9541081
Add preference to automatically enable the Hand Tool when the viewer loads
2014-04-03 10:17:35 +02:00
Jonas Jenwald
4c9c43f82b
Modify {get, set}Preferences in PdfStreamConverter.jsm to support async
2014-04-03 10:17:35 +02:00
Jonas Jenwald
c920372ff2
Rewrite 'Preferences' to make it async
2014-04-03 10:08:33 +02:00
Yury Delendik
bd11111465
Merge pull request #4545 from Rob--W/crx-api-enhancements
...
Use new Chromium APIs for FTP and redirects
2014-04-02 09:40:13 -05:00
Yury Delendik
75d09fd820
Merge pull request #4524 from fkaelberer/fullWidthInPresentationMode
...
Use full screen width in presentation mode
2014-04-02 09:03:37 -05:00
Jonas Jenwald
edfc78dfe7
Only update the Document Properties if the dialog is still visible when the dataAvailablePromise is resolved
2014-04-02 11:55:35 +02:00
Jonas Jenwald
c7a0b68d9a
Remove superfluous 'self' variable from web/document_properties.js
2014-03-31 23:16:44 +02:00
Jonas Jenwald
025f340228
Prevent the Document Properties from being empty when the dialog is opened before the file has started loading
2014-03-31 23:12:48 +02:00
Samuel Chantaraud
50aa49bb06
Added CSS rules to allow smooth (momentum) scrolling on iOS devices
2014-03-31 11:09:18 -04:00
Rob Wu
d04f81b964
Improved FTP support for Chromium extension
2014-03-30 00:08:02 +01:00
fkaelberer
db84851e27
Use full screen width in presentation mode
2014-03-28 08:58:18 +01:00
Jonas Jenwald
7989c125ba
Merge pull request #4529 from stratosv/patch-1
...
Fix error message typo
2014-03-27 23:54:33 +01:00
Brendan Dahl
a06fca142e
Merge pull request #4519 from yurydelendik/pdfbugclean
...
Cleaning up the viewer and pdfbug; fixes bugs in Stepper
2014-03-27 13:27:15 -07:00
Stratos Voukelatos
6a8c998ebd
Fix error message typo
...
It should read 'PDFFindController cannot be initialized without a PDFFindBar instance'.
2014-03-27 21:43:58 +02:00
Yury Delendik
17eded9065
Partially reverts #3641
2014-03-27 10:50:42 -05:00
Yury Delendik
ed8ecfd00a
Cleaning up the viewer and pdfbug; fixes repeats in Stepper
2014-03-26 15:18:53 -05:00
Jonas Jenwald
f6cfab0061
[Firefox] Stop importing default_preferences.js as a module and include it instead
2014-03-26 00:37:32 +01:00
Yury Delendik
cebf7836f4
Simulate support of the Int8Array for IE9
2014-03-20 18:50:34 -05:00
Brendan Dahl
68be273c69
Merge pull request #4470 from yurydelendik/packcmap
...
CMaps binary packing
2014-03-17 12:27:35 -07:00
Yury Delendik
1d8f6cf0e7
Updates make.js for cmaps and make binary cmaps by default
2014-03-17 13:30:43 -05:00
Yury Delendik
e4d0af2687
Fixes HiDPI icons of the secondary toolbar for Chrome
2014-03-17 11:25:50 -05:00
Yury Delendik
69efd9cb96
CMaps binary packing
2014-03-14 16:46:35 -05:00
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