Commit Graph

8885 Commits

Author SHA1 Message Date
Jonas Jenwald
7c7d239995 Update l10n files 2016-05-29 12:47:00 +02:00
Yury Delendik
5aefce6ba6 Merge pull request #5579 from jazzy-em/master
Added multiple term search functionality (with default phrase search)
2016-05-27 14:23:26 -05:00
Tim van der Meij
41f978c7c3 Merge pull request #7362 from bbodenmiller/patch-2
Github -> GitHub
2016-05-26 20:15:52 +02:00
Ben Bodenmiller
e0b9d49f2c Github -> GitHub 2016-05-26 11:11:50 -07:00
jazzy-em
0a347ec04d Added multiple term search functionality (with default phrase search) 2016-05-26 18:24:58 +05:00
Tim van der Meij
c55541f1f3 Merge pull request #7352 from Snuffleupagus/popup-annotation-inherit-parent-flags
Let non-viewable Popup Annotations inherit the parent's Annotation Flags if the parent is viewable
2016-05-25 23:57:33 +02:00
Jonas Jenwald
98fe094d18 Let non-viewable Popup Annotations inherit the parent's Annotation Flags if the parent is viewable
Fixes http://www.pdf-archive.com/2013/09/30/file2/file2.pdf.

Note how it's not possible to show the various Popup Annotations in the above document.
To fix that, this patch lets the Popup inherit the flags of the parent, in the special case where the parent is `viewable` *and* the Popup is not.
In general, I don't think that a Popup must have the same flags set as the parent. However, it seems very strange to have a `viewable` parent annotation, and then not being able to view the Popup.

Annoyingly the PDF specification doesn't, as far as I can find, mention anything about how this case should be handled, but this patch seem consistent with the actual behaviour in Adobe Reader.
2016-05-25 23:00:26 +02:00
Tim van der Meij
47b929be26 Merge pull request #7346 from Rob--W/crx-sync-storage
Support syncing of settings in Chrome extension
2016-05-25 01:50:39 +02:00
Rob Wu
0be8e72d6f Support syncing of settings in Chrome extension
Use chrome.storage.sync to store preferences instead of
chrome.storage.local, to allow settings to be synchronized if the user
chooses to sign in in Chrome and enables synchronization of extension
preferences.
2016-05-25 00:51:51 +02:00
Tim van der Meij
78359d8b03 Merge pull request #7353 from timvandermeij/chromium-regression
Resolve a regression in the Chromium extension's preferences handling
2016-05-25 00:43:50 +02:00
Tim van der Meij
fdfaa43f5e Resolve a regression in the Chromium extension's preferences handling
Commit df10513e10 unfortunately broke the options dialog of the Chromium extension because the logic required to work with the preference was not added. This patch adds the required logic to show the preference in the options dialog and to persist it to the preferences storage.

Verified using Chromium 50 on Arch Linux.
2016-05-25 00:32:32 +02:00
Tim van der Meij
6316ca0299 Merge pull request #7344 from Rob--W/crx-cleanup-compat-frame
Remove support for frames in old Chromium versions
2016-05-25 00:04:45 +02:00
Brendan Dahl
b86610ffdb Merge pull request #7300 from Snuffleupagus/bug-1068432
Prevent adding invalid values in `CFFDict_setByKey` (bug 1068432)
2016-05-24 12:12:38 -07:00
Tim van der Meij
db46829ef7 Merge pull request #7316 from timvandermeij/remove-unused
Remove unused variables
2016-05-21 14:07:33 +02:00
Tim van der Meij
7ac48ef4d5 Merge pull request #7340 from Snuffleupagus/unicode-unit-tests
Add basic unit-tests for unicode.js
2016-05-19 20:46:17 +02:00
Jonas Jenwald
c5c5a2a71f Add basic unit-tests for unicode.js
Re: issue 7261.
2016-05-19 19:45:45 +02:00
Tim van der Meij
f4e6afb74f Merge pull request #7337 from Snuffleupagus/combine-setTextMatrix
Attempt to combine text runs positioned with `setTextMatrix`
2016-05-18 23:05:36 +02:00
Jonas Jenwald
7ddb0bc718 Attempt to combine text runs positioned with setTextMatrix 2016-05-18 17:21:58 +02:00
Yury Delendik
8aa5901c20 Merge pull request #7332 from yurydelendik/fix-components
Fixes AMD name in web/the pdf_viewer.js.
2016-05-16 12:02:59 -05:00
Yury Delendik
185a1f45e7 Fixes AMD name in the web/pdf_viewer.js. 2016-05-16 12:01:29 -05:00
Yury Delendik
1c0433586e Merge pull request #7315 from McGiogen/bug-usestrict-compatibilityjs
Solving issue #7307, 'use strict' context in compatibility.js
2016-05-12 15:18:43 -05:00
Gioele Masini
1c96cb8862 Added context to compatibility.js to have 'use strict' directive in our context only 2016-05-12 10:04:51 +02:00
Yury Delendik
b261203018 Merge pull request #7317 from yurydelendik/move-defaultprefs
Moves DEFAULT_PREFENCES into JSON format.
2016-05-11 18:05:20 -05:00
Yury Delendik
df10513e10 Moves DEFAULT_PREFENCES into JSON format. 2016-05-11 17:58:17 -05:00
Jonas Jenwald
12a93971fe Merge pull request #7313 from timvandermeij/secondary-toolbar-class
Convert the secondary toolbar to a class
2016-05-11 23:22:18 +02:00
Tim van der Meij
f4ae277355 Convert the secondary toolbar to a class 2016-05-11 20:53:39 +02:00
Tim van der Meij
6a7012aaca Remove unused variables
These have been found using `gulp lint` in combination with the `unused:
true` parameter for JSHint. Unfortunately there are too many false
positives to enable this feature, but now that most globals have been
removed because of the conversion to UMD the results are much more
useful than before.
2016-05-11 16:11:13 +02:00
Tim van der Meij
c1c199d702 Merge pull request #7295 from Snuffleupagus/core-getArray
Use `Dict_getArray` in more places in `src/core/` to avoid issues when Arrays contain indirect objects
2016-05-10 23:21:54 +02:00
Rob Wu
9394fc133c Remove support for frames in old Chromium versions
Frames are only supported (via redirectUrl) in Chrome 35.0.1911.0+
2016-05-10 22:40:07 +02:00
Jonas Jenwald
69cf8c5fb3 Merge pull request #7289 from yurydelendik/double-pagechange
Disable pagechange event if page is not changing.
2016-05-10 16:38:55 +02:00
Jonas Jenwald
aa9ba43fa1 Merge pull request #7306 from yurydelendik/enable-debugger
Enables debugger only when needed.
2016-05-10 16:19:49 +02:00
Yury Delendik
a4c81c203b Enables debugger only when needed. 2016-05-09 18:18:43 -05:00
Tim van der Meij
8dcc727be1 Merge pull request #7244 from Rob--W/crx-pdf-embed-object-no-shadow-dom
Don't use shadow DOM for rendering <object>/<embed>
2016-05-09 23:59:28 +02:00
Tim van der Meij
d78f90390b Merge pull request #7305 from Rob--W/crx-delete-streamsPrivate
Remove streamsPrivate usage
2016-05-09 23:23:46 +02:00
Rob Wu
fc658a718c Remove streamsPrivate usage
This was only ever useful for the Opera extension because the API
requires a whitelisted extension ID. Opera ditched PDF.js from their
extension gallery, so we don't need to keep this in the tree.
2016-05-09 22:49:47 +02:00
Tim van der Meij
11914277d5 Merge pull request #7299 from Snuffleupagus/PDFPageView_draw-zoomLayer-prevent-error
Prevent intermittent "Node was not found" errors when removing the `zoomLayer` in `PDFPageView_draw`
2016-05-09 22:16:09 +02:00
Yury Delendik
dd828ea6f1 Merge pull request #7302 from Snuffleupagus/Parser_getObj-skip-over-endobj
Ignore 'endobj' commands inside of `ObjStm` streams (issue 5241, bug 898610, bug 1037816)
2016-05-09 11:03:14 -05:00
Jonas Jenwald
182d33800a Ignore 'endobj' commands inside of ObjStm streams (issue 5241, bug 898610, bug 1037816)
According to an example in the PDF specification, see http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#page=56, an `ObjStm` stream should not contain 'endobj' commands.

Fixes 5241.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=898610.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1037816.
2016-05-09 09:50:45 +02:00
Jonas Jenwald
b13b78388b Prevent intermittent "Node was not found" errors when removing the zoomLayer in PDFPageView_draw
I've seen the above error occasionally when the scale is updated many times in quick succession, but I've not been able to pinpoint exactly why it happens.
Since the error isn't caught, this means that the `pageViewDrawCallback` function doesn't run to completion.

Unfortunately, given the very intermittent nature of the issue, I haven't got any good STR for reliably reproducing this issue. However, I hope that this patch can be accepted anyway, since it's simple and should help prevent unnecessary errors.
2016-05-08 16:03:17 +02:00
Jonas Jenwald
5f59d079e0 Merge pull request #7301 from Rob--W/grab-to-pan-mouse-buttons
Update grab_to_pan.js
2016-05-08 09:46:32 +02:00
Rob Wu
057b4615ba Update grab_to_pan.js
See b81897bee4
2016-05-07 23:46:56 +02:00
Jonas Jenwald
c9b6de3b16 Prevent adding invalid values in CFFDict_setByKey (bug 1068432)
In the font in question, there are a couple of `topDict` entries that have invalid values (`0xF 0xF`, i.e. just eof markers without any actual numbers).
This causes the `parseFloatOperand` function, inside `CFFParser_parseDict`, to return `NaN`. Currently we pass this broken font onto the browser, which OTS unsurprisingly rejects.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1068432.
2016-05-07 21:09:58 +02:00
Jonas Jenwald
8b605b6980 Merge pull request #7298 from mortonfox/patch-1
Update link to CONTRIBUTING.md
2016-05-07 11:25:47 +02:00
Morton Fox
f697d83f59 Update link to CONTRIBUTING.md 2016-05-07 00:10:36 -04:00
Brendan Dahl
a682ccec2f Merge pull request #7285 from Snuffleupagus/split_font_unittests
Split the font_spec.js unit-tests into cff_parser_spec.js and type1_parser_spec.js
2016-05-05 13:45:27 -07:00
Jonas Jenwald
6111c17c8a Use Dict_getArray in more places in src/core/ to avoid issues when Arrays contain indirect objects
As evident from e.g. PRs 6485 and 7118, some bad PDF generators unfortunately create Arrays where *some* elements are indirect objects (i.e. `Ref`s). This seems to mostly affect Arrays that contain numbers, such as e.g. `Matrix/FontMatrix/BBox/FontBBox/Rect/Color/...`, and has manifested itself in PDF files that fail to render correctly (some elements are missing).

The problem in both the cases above, besides broken rendering, was that there were *no* errors/warnings that indicated what the problem was, making it difficult to pinpoint the issue.
Hence this patch, where I've audited all usages of `Dict_get` in `src/core/` files, and replaced it with `Dict_getArray` where appropriate to try and prevent unnecessary future bugs.
2016-05-05 19:42:57 +02:00
Yury Delendik
9f68e3f1bc Disable pagechange event if page is not changing. 2016-05-04 11:06:07 -05:00
Yury Delendik
8adddf031c Merge pull request #7242 from Snuffleupagus/bug-1194700
[Bug 1194700] Ensure that the `customScaleOption` is hidden in e10s
2016-05-03 07:06:43 -05:00
Jonas Jenwald
29c4a604af Split the font_spec.js unit-tests into cff_parser_spec.js and type1_parser_spec.js
Re: issue 7261.

Given the we have `gulp fonttest`, which tests the `fonts.js` functionality at a higher level, and that we have *a lot* of font specific reference tests, I'm not convinced that we *also* need unit-tests for it.
2016-05-03 09:37:36 +02:00
Tim van der Meij
9c95d089de Merge pull request #7281 from yurydelendik/static-warnings
Fixes some static analysis warnings and recommendations
2016-05-03 01:26:17 +02:00