Commit Graph

8336 Commits

Author SHA1 Message Date
Tim van der Meij
f096e4ab91 Merge pull request #6637 from Snuffleupagus/issue-3207-reduced-test
Replace the unavailable linked test-case for issue 3207 with a reduced test-case
2015-11-15 14:32:31 +01:00
Jonas Jenwald
458aff66f4 Replace the unavailable linked test-case for issue 3207 with a reduced test-case
Re: issue 3207 and PR 3268.
2015-11-15 13:33:36 +01:00
Manas
a2ba1b8189 Uses editorconfig to maintain consistent coding styles
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
2015-11-14 07:32:18 +05:30
Tim van der Meij
436b596a13 Merge pull request #6633 from Snuffleupagus/issue-3263-reduced-test
Replace the unavailable linked test-case for issue 3263 with a reduced test-case
2015-11-13 20:57:30 +01:00
Yury Delendik
875588d0cd Merge pull request #6630 from tonyjin/fix-minor-capitalization
Fix minor capitalization issue in viewer
2015-11-13 12:10:31 -06:00
Jonas Jenwald
5bd76c46ac Replace the unavailable linked test-case for issue 3263 with a reduced test-case
Re: issue 3263 and PR 3265.
2015-11-13 16:47:02 +01:00
Yury Delendik
9e335a61fd Merge pull request #6628 from Snuffleupagus/issue-6621
Ignore the /Mask entry in images unless its /ImageMask entry is explicitly set to `true` (issue 6621)
2015-11-12 16:54:00 -06:00
Jonas Jenwald
50a70429ec Ignore the /Mask entry in images unless its /ImageMask entry is explicitly set to true (issue 6621)
Fixes 6621.
2015-11-12 22:49:26 +01:00
Tony Jin
570f144fc3 Fix minor capitalization issue in viewer 2015-11-12 13:33:34 -08:00
Yury Delendik
9455095ee9 Merge pull request #6629 from Snuffleupagus/downgrade-jshint-to-fix-travis
Downgrade the JSHint version in order to fix linting failures on Travis
2015-11-12 15:24:30 -06:00
Jonas Jenwald
de07bd23dd Downgrade the JSHint version in order to fix linting failures on Travis 2015-11-12 22:21:25 +01:00
Yury Delendik
7381ff9523 Merge pull request #6599 from prometheansacrifice/generate-better-api-docs
Generate better API documentation
2015-11-12 14:26:18 -06:00
Manas
dbcb46c8de Uses @alias to fix missing comments on JSDocs pages 2015-11-13 01:24:15 +05:30
Yury Delendik
2a5a79136a Merge pull request #6625 from Snuffleupagus/issue-6463
Dispatch the `pagerendered` event when zooming is only done with CSS (issue 6463)
2015-11-12 09:57:18 -06:00
Jonas Jenwald
2646f27434 Dispatch the pagerendered event when zooming is only done with CSS (issue 6463)
In my opinion, this event shouldn't be dispatched in `PDFPageView.cssTransform`, since that would cause *two* events to be fired when "normal" zooming is used (once in `PDFPageView.cssTransform`, and once in `PDFPageView.draw`).

Fixes 6463.
2015-11-12 16:46:50 +01:00
Tim van der Meij
3a23367f04 Merge pull request #6610 from Snuffleupagus/issue-2128-reduced-test
Replace the unavailable linked test-case for issue 2128 with a reduced test-case
2015-11-11 23:02:29 +01:00
Tim van der Meij
d8ddde26b7 Merge pull request #6622 from yurydelendik/rm-mc-tests
Remove mozcentral test files.
2015-11-11 22:57:40 +01:00
Yury Delendik
4c9f6741ae Remove mozcentral test files. 2015-11-11 15:54:17 -06:00
Yury Delendik
248e211a20 Merge pull request #6600 from Rob--W/test-server-improved
Improve reliability of the test server
2015-11-11 13:50:25 -06:00
Rob Wu
b0ff49e456 Improve reliability of the test server
- replace // with /
  (otherwise http://localhost:8888// links to e.g. http://src/ instead
   of http://localhost:8888/src).

- Solve XSS issue (file names should be sanitized, not output as-is).

- Prevent server from crashing if there is a stat error (e.g. permission
  error or file not found (e.g. broken symlink)).
2015-11-11 18:37:29 +01:00
Jonas Jenwald
3008580972 Replace the unavailable linked test-case for issue 2128 with a reduced test-case
Re: issue 2128 and PR 2628.
2015-11-11 12:49:42 +01:00
Yury Delendik
a4ca9986e1 Merge pull request #6318 from Snuffleupagus/bug-1191279
For documents with different page sizes, ensure that the correct page becomes visible on load when e.g. the 'page' hash parameter was provided (bug 1191279, issue 6393)
2015-11-10 17:51:02 -06:00
Yury Delendik
3674f0d7c7 Merge pull request #6620 from Rob--W/node-test-random-port
Use random port in test webserver
2015-11-10 13:13:01 -06:00
Rob Wu
ff8c334207 Use random port in test webserver 2015-11-10 19:10:23 +01:00
Yury Delendik
3c94ba8a1c Merge pull request #6617 from Snuffleupagus/issue-6615
Correctly handle /FitH destinations with `null` as the parameter
2015-11-10 07:58:41 -06:00
Jonas Jenwald
e629882f2a Correctly handle /FitH destinations with null as the parameter
According to http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G11.2095870, the vertical position shouldn't change if the parameter is `null`.

Fixes 6615.
2015-11-10 14:22:24 +01:00
Yury Delendik
3c6df26704 Merge pull request #6608 from Rob--W/improved-error-message-local-file
Improve error message for non-existent local files
2015-11-09 15:40:41 -06:00
Yury Delendik
5b2015b04b Merge pull request #6607 from Snuffleupagus/TrueType-without-cmap
Prevent `readCmapTable` from failing if the `cmap` is missing in TrueType fonts
2015-11-09 13:22:57 -06:00
Rob Wu
c604cc22d1 Improve error message for non-existent local files
I received multiple reports about the following cryptic error in the
Chrome extension when the user tried to open a local file:

> PDF.js v1.1.527 (build: 2096a2a)
> Message: Cannot read property 'Symbol(Symbol.iterator)' of null

This error most likely originated from core/stream.js:

    function Stream(arrayBuffer, start, length, dict) {
      this.bytes = (arrayBuffer instanceof Uint8Array ?
                    arrayBuffer : new Uint8Array(arrayBuffer));
                                                 ^^^^^^^^^^^
`arrayBuffer` is `null`, and that in turn is caused by the fact that
for non-existing files, there is no data. I've applied two fixes:

1. Never call onDone with a void buffer, but call the error handler
   instead.
2. Show a sensible error message for local files with status = 0.
2015-11-08 18:03:28 +01:00
Jonas Jenwald
ff64ef0243 Prevent readCmapTable from failing if the cmap is missing in TrueType fonts
Fixes http://arrow.dit.ie/cgi/viewcontent.cgi?article=1000&context=aaschadpoth#page=3.
2015-11-08 16:48:37 +01:00
Tim van der Meij
1280b7b76b Merge pull request #6604 from Snuffleupagus/issue-4665-reduced-test
Add a reduced `text` test-case for issue 4665
2015-11-07 15:50:15 +01:00
Tim van der Meij
07067cf078 Merge pull request #6602 from vivin/adding-to-authors
Adding to authors
2015-11-07 15:01:05 +01:00
Jonas Jenwald
66c17a69ae Add a reduced text test-case for issue 4665
Re: issue 4665 and PR 6601.

Since we currently don't have a good `text` test-case that fails without the above PR, this patch adds a reduced one.
2015-11-07 13:09:08 +01:00
Yury Delendik
bb29e13307 Merge pull request #6601 from yurydelendik/ascent
Fixes incorrect PDF file font metrics.
2015-11-06 20:16:04 -06:00
Vivin Paliath
d20bc4675f Adding to authors 2015-11-06 18:52:27 -07:00
Brendan Dahl
9a830a7b62 Merge pull request #6590 from yurydelendik/combinechars
Combines standalone chars into text groups.
2015-11-06 15:06:41 -08:00
Yury Delendik
cc5bc18728 Fixes incorrect PDF file font metrics. 2015-11-06 14:47:10 -06:00
Yury Delendik
4ee0bade82 Test for text layer issue 1045. 2015-11-06 10:55:43 -06:00
Yury Delendik
fa423cfab0 Refactors fake space heuristics for speed. 2015-11-06 10:55:43 -06:00
Jonas Jenwald
1e0bd07d8d Merge pull request #6595 from yurydelendik/currentscript
Uses document.currentScript for pdf.worker.js path.
2015-11-06 17:28:20 +01:00
Yury Delendik
376f8bde14 Combines standalone divs into text groups. 2015-11-06 10:20:49 -06:00
Yury Delendik
601d29b14e Fixes all examples to require workerSrc to be set. 2015-11-06 07:50:21 -06:00
Yury Delendik
28d340679a Uses document.currentScript for pdf.worker.js path. 2015-11-06 07:50:21 -06:00
Yury Delendik
9e66625092 Merge pull request #6597 from Snuffleupagus/issue-6596
Ensure that the `textLayer` has the same dimensions as the `canvasWrapper` (issue 6596)
2015-11-06 07:26:46 -06:00
Jonas Jenwald
dbc611ac9d Ensure that the textLayer has the same dimensions as the canvasWrapper (issue 6596)
This is a quick fix to get `scrollIntoView` working again for search results, but we really ought to re-write that function since it seems way too brittle.

Fixes 6596.
2015-11-06 12:43:22 +01:00
Jonas Jenwald
8079bdddb9 Merge pull request #6591 from yurydelendik/select
Non/less flashing text layer during selection.
2015-11-05 17:50:49 +01:00
Yury Delendik
b8ad68af25 Non/less flashing text layer during selection. 2015-11-05 10:48:22 -06:00
Jonas Jenwald
c05416f81c Merge pull request #6586 from Snuffleupagus/new-indeterminate-loading-bar
Create a new indeterminate loading bar animation for the default viewer
2015-11-04 17:49:39 +01:00
Jonas Jenwald
0f50147ba8 Create a new indeterminate loading bar animation for the default viewer
This patch contains an alternative solution (see the referenced PRs in 4718), in order for the indeterminate loading bar to have a consistent speed regardless of width.

Fixes 4718.
2015-11-04 17:44:51 +01:00
Yury Delendik
7e8dacf57b Merge pull request #6588 from yurydelendik/spacing
Better spacing in text layer.
2015-11-03 09:24:43 -06:00