Tim van der Meij
96cca2b37a
Migrate clean
and importl10n
target to gulp
2016-03-04 21:14:56 +01:00
Yury Delendik
cbbb9bb82d
Adds UMD header to pdf.js and pdf.worker.js files.
2015-12-29 18:15:14 -06:00
Yury Delendik
fc3282db56
Adds RequireJS to worker.
2015-12-29 09:20:52 -06:00
Yury Delendik
85e95d34ed
Use RequireJS in the viewer, examples and tests.
2015-12-29 09:20:52 -06:00
Tim van der Meij
df81b832bb
Remove unused variables
2015-12-16 23:52:16 +01:00
Yury Delendik
450edc95cc
UMD validation and generation tools.
2015-12-15 13:24:39 -06: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
Rob Wu
f8af4d6567
Fix preprocessor: nesting, error & tests
...
Features / bug fixes in the preprocessor:
- Add word boundary after regex for preprocessor token matching.
Previously, when you mistakenly used "#ifdef" instead of "#if", the
line would be parsed as a preprocessor directive (because "#ifdef"
starts with "#if"), but without condition (because "def" does not
start with a space). Consequently, the condition would always be false
and anything between "#ifdef" and "#endif" would not be included.
- Add validation and error reporting everywhere, to aid debugging.
- Support nested comments (by accounting for the whole stack of
conditions, instead of only the current one).
- Add #elif preprocessor command. Could be used as follows:
//#if !FEATURE_ENABLED
//#error FEATURE_ENABLED must be set
//#endif
- Add #error preprocessor command.
- Add end-of-line word boundary after "-->" in the comment trimmer.
Otherwise the pattern would also match "-->" in the middle of a line,
and incorrectly convert something like "while(i-->0)" to "while(i0)".
Code health:
- Add unit tests for the preprocessor (run external/builder/test.js).
- Fix broken link to MDN (resolved to DXR).
- Refactor to use STATE_* names instead of magic numbers (the original
meaning of the numbers is preserved, with one exception).
- State 3 has been split in two states, to distinguish between being in
an #if and #else. This is needed to ensure that #else cannot be
started without an #if.
2015-07-19 14:47:28 +02:00
Rob Wu
8ba73cb4de
Improve getWorkerSrcFiles (builder.js)
...
It took a while to figure out why adding comments in worker_loader.js
caused the build to fail, because getWorkerSrcFiles did not print an
error message when it failed to parse the file. These issues have been
resolved as follows:
- Leading comments are stripped.
- The trailing comma is removed from the array.
- Errors are detected and useful error messages are printed.
2015-07-19 14:47:28 +02:00
Mike Corbin
979c108577
Remove unused require() directive
...
This had the undesirable side-effect of invoking make's command-line argument
parser upon inclusion.
2015-05-15 18:01:33 +01:00
Tim van der Meij
70b6eb09a8
Remove ShellJS copy and use the NPM version
...
There is no need to have a copy of ShellJS in the repository as it is also available on NPM. The NPM version is also much newer. This way we do not have to update this anymore and let NPM do that automatically.
2015-04-05 15:47:25 +02:00
Tim van der Meij
0ab5bb4b42
Fixes minor typo from #5826
2015-03-11 21:09:03 +01:00
Rob Wu
537216b872
[webL10n] Apply PDF.js-specific changes
2015-03-10 16:13:25 +01:00
Rob Wu
f20c5ddf99
Update to latest version of webL10n
...
New commits since last update:
- b5e072c...7d351d51b1
- Plus unmerged patch from PDF.js: https://github.com/fabi1cazenave/webL10n/pull/62
(the PDF.js-specific changes will be applied in a separate commit)
2015-03-10 16:11:59 +01:00
Rob Wu
ac5a8bcdda
[l10n] Treat language as case-insensitive
...
See "Case-insensitive language comparisons per RFC 4646"
https://github.com/fabi1cazenave/webL10n/pull/51
Removed the "patch" in compatibility.js and fixed the bug in webL10n,
because the logic belongs to webL10n instead of PDF.js.
The immediate motivation for this patch is that Chrome 40 converts
navigator.language to lower case: https://crbug.com/454331
2015-02-02 22:02:18 +01:00
araghava
e2c001c19d
[issue 5440] fix rtl direction bug for full language codes
2014-10-26 17:16:56 -04:00
Yury Delendik
5b93cc102c
Adds css import preprocessing
2014-09-30 08:11:43 -05:00
Yury Delendik
10f702f60e
Adds readme file for the pdfjs-dist repo.
2014-09-24 07:10:09 -05:00
Tim van der Meij
c29faaa22d
Use strict equalities in make.js, external/* and extensions/*
2014-08-01 22:27:00 +02:00
Yury Delendik
812c5accb2
Making sure we are not importing CRs and BOMs
2014-05-28 08:25:27 -05:00
Tim van der Meij
a762c9f3c6
Removing old TODOs and comments from jasmine.js
2014-05-08 22:45:30 +02:00
Thorben Bochenek
e8f0700bfa
Move the colour conversion to jpg.js
...
Benchmarking shows that this improves performance for the invitation document
from https://github.com/mozilla/pdf.js/issues/3809 by 35%
2014-04-24 15:07:12 +02:00
Thorben Bochenek
e7fe45a5c4
Refactor jpg.js and include forceRGBoutput, correct style of image.js
...
This refactors getData to be more readable and extracts all the color
conversion algorithms to their own functions. The resulting code was then
cleaned up.
This also introduces a flag `forceRGBoutput` to getData, that allows to always
get the data as a `width * height * 3` bytes long RGB buffer
2014-04-24 12:55:37 +02:00
Christian Krebs
5a49d2eb83
Create the WORKER_SRC_FILES and EXT_SRC_FILES lists in make automatically
2014-04-09 21:02:13 +02:00
Yury Delendik
5fc806823e
Merge pull request #4504 from timvandermeij/importl10n
...
Import l10n files from mozilla-aurora
2014-03-26 17:52:45 -05:00
Tim van der Meij
c6f009403d
Implements importl10n command
2014-03-26 23:48:02 +01:00
Thorben Bochenek
7bf0987810
Fixes for small colour variations in tests
...
https://github.com/notmasteryet/jpgjs/pull/24
2014-03-25 19:04:02 -05:00
Thorben Bochenek
2d99ff3f37
Fix for the offByOne-error and small performance optimisations
2014-03-21 09:16:40 -05:00
Thorben Bochenek
03892a85c2
jpgjs performance improvements
...
see https://github.com/notmasteryet/jpgjs/pull/22
2014-03-20 18:02:08 -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
734d6f346e
Removes external/cmaps; adds binary cmaps to the repo
2014-03-17 13:30:27 -05:00
Yury Delendik
3e8ea958ae
Quick notes about the format
2014-03-14 16:59:40 -05:00
Yury Delendik
69efd9cb96
CMaps binary packing
2014-03-14 16:46:35 -05:00
Jonas Jenwald
4f6b363b2c
Fix coding style in external/builder/builder.js
2014-03-14 12:53:12 +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
Mitar
2c82e720b8
Updated to current latest stable version of jshint.
2014-03-01 13:31:25 -08:00
Brendan Dahl
cc46cea7cb
Merge pull request #4262 from yurydelendik/issue4257
...
Removes -moz-box-sizing usage
2014-02-24 12:47:27 -08:00
fkaelberer
e874b272bf
jpgjs performance tuning
2014-02-18 09:24:59 -06:00
Gabriele Svelto
f4d54517c4
Bug 972435 - Recompress all PNG assets
2014-02-13 17:57:10 +01:00
Brendan Dahl
7be2d6db58
Add adobe CMaps.
2014-02-11 10:26:46 -08:00
Yury Delendik
894c82cec9
Removes -moz-box-sizing usage
2014-02-10 15:06:03 -06:00
Rob Wu
9f4745fd3f
webL10n: Apply PDF.js-specific changes
...
Based on http://pastebin.mozilla.org/3061694
1. Remove "debug helpers" and use console.log/console.warn directly (top).
2. Remove page load initialization (middle).
3. Remove window._ alias (bottom)
The original diff contained an extra entry
"Adds fallback argument to the getL10nData;",
but this was already implemented in the rebased webL10n, so it's no
longer PDF.js-specific.
2013-09-15 15:31:37 +02:00
Rob Wu
d0d3b071ec
Update webL10n to latest version + features
...
Base version of l10n:
- https://github.com/fabi1cazenave/webL10n/tree/b18c753c6f
4 extra commits (expected to be accepted):
- https://github.com/fabi1cazenave/webL10n/pull/38
New features compared to mozL10n:
- Support for getting translated attributes in get()
The previous version of mozL10n was based on:
- https://github.com/fabi1cazenave/webL10n/commits/0c06867a75
- diff: http://pastebin.mozilla.org/3061694
To make it easier to update webL10n in the future, I will apply
the PDF.js-specific changes in a separate commit.
2013-09-15 15:13:47 +02:00
Yury Delendik
56ea1e08e6
Fixes typo in 2-component image decoding
2013-08-19 08:43:17 -05:00
Brendan Dahl
6b9c272590
Merge pull request #3457 from yurydelendik/remove-prefixes
...
Removes foreign for Firefox CSS prefixes
2013-07-16 16:08:05 -07:00
Yury Delendik
2ab481a1da
Removes foreign for Firefox CSS prefixes
2013-07-09 17:23:20 -05:00
Yury Delendik
5e5b66f688
Removes browser decoding optimization for JPEG CMYK
2013-07-02 09:46:14 -05:00
Yury Delendik
71c67976af
Implements FFC1 marker (and syncs with jpgjs)
2013-06-25 12:35:34 -05:00
Yury Delendik
0a27f18bfe
Updates shell.js to v0.1.2
2013-03-07 10:43:23 -06:00
Jon Buckley
c226147d09
Issue #2008 - Fix lint errors for external/crlfchecker/
2013-01-31 19:12:46 -05:00
Jon Buckley
10cdb48f36
Issue #2008 - Fix lint errors for external/builder/
2013-01-31 19:12:46 -05:00
Yury Delendik
e5247e4895
Updates webL10n; using viewer.properties as is
2012-11-29 14:02:33 -06:00
Pimm Hogeling
438e3c8f6d
Fixes for subtile bugs that were introduced in 59283bdf6d
and 99440ab691
, among others.
2012-08-31 13:37:44 +02:00
Yury Delendik
ac0ae3e5fd
Merges new jpgjs: fixes invalid JPEG marker.
2012-08-23 16:12:33 -05:00
Yury Delendik
da861bef30
Merge pull request #2009 from kkujala/dev
...
Correct gjslint warnings in builder.js.
2012-08-22 05:16:16 -07:00
Kalervo Kujala
7bbf65f56e
Correct gjslint warnings in builder.js.
2012-08-22 12:48:47 +03:00
Kalervo Kujala
2ffd3ae1c7
Create crlfchecker module and use it in make.js.
...
Provide names of the files that contain crlf in the output.
Exit(1) is used instead of throw.
2012-08-20 20:42:21 +03:00
Brendan Dahl
e0a6b233dc
Move builder/preprocessor into its own file.
2012-08-01 14:27:42 -07:00
Yury Delendik
89156cec89
Fallback locale string for JS code; simplify locale embedding for the extension
2012-05-04 08:37:08 -05:00
Yury Delendik
7f98f77354
Allow fallback on langauge group; change localized text
2012-05-02 15:03:06 -05:00
Yury Delendik
32e9eb35fe
Using web browsers locale in the extension mode
2012-05-01 20:37:03 -05:00
Yury Delendik
00543a1c89
Embed locale.properties in the viewer.html for extension
2012-04-30 21:55:21 -05:00
Yury Delendik
29bde9d528
Merge remote-tracking branch 'mozilla/master' into l10n-1
...
Conflicts:
web/viewer.html
2012-04-30 18:32:37 -05:00
Yury Delendik
7859ba89c3
Missing webL10n library files
2012-04-30 15:33:37 -05:00
Yury Delendik
244ce870c3
Updates jpgjs libary to the latest: component order fix
2012-04-28 08:59:05 -05:00
Brendan Dahl
e18a2c512e
Use test.py for unit tests too.
2012-04-19 12:32:24 -07:00
Artur Adib
c0289497ec
bumping ShellJS
2012-03-28 18:03:31 -04:00
Artur Adib
a0a5c58894
Upgrading ShellJS, introducing 'makeref'
2012-03-26 16:33:00 -04:00
Artur Adib
c3bdf1e037
adding new find() commands
2012-03-14 17:50:49 -04:00
Artur Adib
f6ba3843bd
Using ShellJS
2012-03-03 14:01:31 -05:00
Kalervo Kujala
9962d9abe4
Remove now obsolete jasmine files related to unit_test.html.
2011-12-12 22:37:26 +02:00
Kalervo Kujala
1a119bcb08
Make unit tests runnable from command line.
2011-11-24 00:03:17 +02:00
Brendan Dahl
faa202df1e
Merge upstream and change test pdf file.
2011-11-22 10:39:26 -08:00
Brendan Dahl
b64b7d55b1
Use the updated jpgjs with faster transform.
2011-11-22 09:32:20 -08:00
Brendan Dahl
7a5556ca91
Add license.
2011-11-21 09:35:36 -08:00
Kalervo Kujala
1b0ccad5b0
Add jasmine license file.
2011-11-20 21:29:54 +02:00
Kalervo Kujala
624a7a74ea
Add jasmine files to external-directory.
2011-11-20 21:16:47 +02:00
Brendan Dahl
9e8d079579
Adding jpg.js back as a regular file.
2011-11-15 15:08:13 -08:00
Brendan Dahl
87d13cf803
Remove submodule.
2011-11-15 15:05:31 -08:00
Brendan Dahl
b872a08f4f
Data is now created by jpg.js since we don't know the size.
2011-11-09 09:50:40 -08:00
Brendan Dahl
22e531b1f2
Adding the jpgjs as submodule.
2011-11-09 09:36:57 -08:00