Commit Graph

7095 Commits

Author SHA1 Message Date
Jonas Jenwald
ee371fe6b2 Add strict equalities in src/core/pattern.js 2014-08-01 21:56:04 +02:00
Jonas Jenwald
ee0c0dd8a9 Add strict equalities in src/core/obj.js 2014-08-01 21:56:04 +02:00
Jonas Jenwald
a154ca2dd3 Add strict equalities in src/core/murmurhash3.js 2014-08-01 21:56:04 +02:00
Jonas Jenwald
8f5894d81a Add strict equalities in src/core/function.js 2014-08-01 21:56:03 +02:00
Jonas Jenwald
97b3eadbc4 Add strict equalities in src/core/fonts.js 2014-08-01 21:56:03 +02:00
Tim van der Meij
00eea3ddb9 Merge pull request #5116 from Snuffleupagus/strict-equalities-src-core
Add strict equalities in src/core/* (part 1)
2014-08-01 21:50:05 +02:00
Tim van der Meij
df0b821141 Merge pull request #5113 from Snuffleupagus/strict-equalities-src-display
Add strict equalities in src/display/*
2014-08-01 20:51:18 +02:00
Tim van der Meij
0b8b763eda Merge pull request #5112 from Snuffleupagus/strict-equalities-src-shared
Add strict equalities in src/shared/*
2014-08-01 20:00:57 +02:00
Tim van der Meij
49142e9d5a Merge pull request #5108 from timvandermeij/strict-equalities
Use strict equalities in web/*
2014-08-01 19:26:14 +02: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
Jonas Jenwald
87038e44cd Add strict equalities in src/core/evaluator.js 2014-08-01 18:40:10 +02:00
Jonas Jenwald
83a4c68df9 Add strict equalities in src/core/core.js 2014-08-01 18:40:10 +02:00
Jonas Jenwald
0012b8803c Add strict equalities in src/core/colorspace.js 2014-08-01 18:40:09 +02:00
Jonas Jenwald
84503c656d Add strict equalities in src/core/bidi.js 2014-08-01 18:39:46 +02:00
Jonas Jenwald
2162a19ed9 Add strict equalities in src/core/arithmetic_decoder.js 2014-08-01 18:39:46 +02:00
Jonas Jenwald
9cb09324d2 Add strict equalities in src/core/annotation.js 2014-08-01 18:39:45 +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
Yury Delendik
6d6e09b469 Merge pull request #5110 from fkaelberer/issue5026
Fix JBIG2 decoding issue #5026
2014-08-01 09:34:43 -05:00
Jonas Jenwald
c0cbf5f458 Merge pull request #5109 from timvandermeij/strict-equalities-test
Use strict equalities in test/*
2014-08-01 13:27:25 +02:00
Jonas Jenwald
4a82dac45b Add strict equalities in src/display/svg.js 2014-08-01 12:41:03 +02:00
Jonas Jenwald
790ec92a34 Add strict equalities in src/display/pattern_helper.js 2014-08-01 12:40:38 +02:00
Jonas Jenwald
ec6ec13506 Add strict equalities in src/display/metadata.js 2014-08-01 12:40:16 +02:00
Jonas Jenwald
c1f1f2f0e1 Add strict equalities in src/display/canvas.js 2014-08-01 12:39:56 +02:00
Jonas Jenwald
a4b06d7a02 Add strict equalities in src/display/api.js 2014-08-01 12:39:31 +02:00
Jonas Jenwald
ccd71e0a94 Add strict equalities in src/shared/util.js 2014-08-01 12:18:40 +02:00
Jonas Jenwald
42e541a671 Add strict equalities in src/shared/fonts_utils.js 2014-08-01 12:18:35 +02:00
Nicholas Nethercote
adf58ed687 Represent cid chars using integers, not strings.
cid chars are 16-bit unsigned integers. Currently we convert them to
single-char strings when inserting them into the CMap, and then convert
them back to integers when extracting them from the CMap. This patch
changes CMap so that cid chars stay in integer format throughout, saving
both time and space.

When loading the PDF from issue #4580, this change reduces peak RSS from
~600 to ~370 MiB. It also improves overall speed on that PDF by ~26%,
going from 724 ms to 533 ms.
2014-08-01 02:35:17 -07:00
fkaelberer
c03cf20d37 Fix JBIG2 decoding issue #5026 2014-08-01 09:02:25 +02:00
Yury Delendik
ad2ea78280 Merge pull request #5101 from nnethercote/CMap-forEach
Avoid expensive for..in loops involving CMaps
2014-07-31 23:03:25 -05:00
Tim van der Meij
b0349cd184 Use strict equalities in test/unit/{function_spec, stream_spec, testreporter}.js 2014-07-31 23:08:55 +02:00
Tim van der Meij
e525902241 Use strict equalities in test/driver.js 2014-07-31 23:08:54 +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
bdf1c513cf Merge pull request #5105 from Snuffleupagus/pr-4259-tests
Add a couple of reduced test-cases for PR 4259
2014-07-31 19:43:43 +02:00
Yury Delendik
97996230a0 Merge pull request #5106 from timvandermeij/travis-fix
Attempt to fix Travis
2014-07-31 08:16:52 -05:00
Tim van der Meij
eb8ce9f8da Attempt to fix Travis 2014-07-31 15:14:08 +02:00
Jonas Jenwald
26f5b1b2d3 Add a couple of reduced test-cases for PR 4259
PR 4259 fixed a large number of font bugs, but none of those where added as test-cases. This was, in my opinion, unfortunate since it increases the risk of regressions in the future when other font bugs are fixed.
This PR simply adds a few more test-cases, to improve our test coverage somewhat.
2014-07-31 13:46:11 +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
Tim van der Meij
1911bb28bb Merge pull request #5104 from Rob--W/crx-contentscript-fix
Use CSS.supports instead of '..' in ....style
2014-07-30 23:43:45 +02:00
Tim van der Meij
281d68d6bd Merge pull request #5103 from Snuffleupagus/issue-4800-test
Add a reduced test-case for issue 4800
2014-07-30 23:26:44 +02:00
Rob Wu
8bb96db3a0 Use CSS.supports instead of '..' in ....style
document.documentElement.style is null in some XML documents.
The previous snippet caused the following error:

Uncaught TypeError: Cannot use 'in' operator to search for 'animation' in null

To fix this bug, `'animation' in document.documentElement.style` has been
replaced with `CSS.supports('animation', '9s')`. This method was introduced
in Chromium 28, but it is not necessary to detect whether this method is
supported because the required createShadowRoot method for embeds is not
available in Chromium 32 and earlier.
2014-07-30 23:11:02 +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
Jonas Jenwald
50eeff2fab Add a reduced test-case for issue 4800 2014-07-30 22:15:06 +02:00
Tim van der Meij
5b9d78820b Merge pull request #5090 from Rob--W/crx-feature-detect-downgrade
Re-run feature detection after downgrading the Chromium browser.
2014-07-30 21:30:16 +02:00
Nicholas Nethercote
28687bca75 Optimize CMap.prototype.forEach().
This change avoids the element stringification caused by for..in for the
vast majority of CMaps.

When loading the PDF from issue #4580, this change reduces peak RSS from ~650
to ~600 MiB, and improves overall speed by ~20%, from 902 ms to 713 ms.  Other
CMap-heavy documents will also see improvements.
2014-07-30 06:28:47 -07:00
Nicholas Nethercote
b86daed29d Make CMap.map quasi-private.
This makes it easier for the representation to be improved.
2014-07-30 06:26:35 -07: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