Commit Graph

9806 Commits

Author SHA1 Message Date
Yury Delendik
66c8893815 Removes last UMDs from the modules. 2017-05-31 07:14:17 -05:00
Jonas Jenwald
e51718711b Merge pull request #8284 from Snuffleupagus/es6-modules-src
Convert the files in the `/src/core` folder to ES6 modules
2017-05-30 23:08:22 +02:00
Jonas Jenwald
982b6aa65b Convert the files in the /src/core folder to ES6 modules
Please note that the `glyphlist.js` and `unicode.js` files are converted to CommonJS modules instead, since Babel cannot handle files that large and they are thus excluded from transpilation.
2017-05-30 22:06:21 +02:00
Yury Delendik
b66b705ed7 Using pre-built code for testing. 2017-05-30 22:06:21 +02:00
Jonas Jenwald
263479fd6a Update l10n files 2017-05-29 09:59:26 +02:00
Tim van der Meij
63a0328f5f Merge pull request #8450 from timvandermeij/es6-overlay-manager
Convert the overlay manager to ES6 syntax
2017-05-28 21:25:59 +02:00
Tim van der Meij
e7a04fc82d
Convert the overlay manager to ES6 syntax 2017-05-28 21:18:18 +02:00
Tim van der Meij
ed661e7063 Merge pull request #8452 from FranckFreiburger/patch-1
Update webpack.js to support browsers that do not have the Web Workers API
2017-05-26 23:10:51 +02:00
Tim van der Meij
e801ab11c5 Merge pull request #8416 from Snuffleupagus/refactor-PDFLinkService-navigateTo
Refactor and ES6-ify `PDFLinkService.navigateTo`
2017-05-26 22:52:52 +02:00
Franck Freiburger
a0b7f84461 Update webpack.js to support browsers that do not have the Web Workers API 2017-05-26 22:02:07 +02:00
Jonas Jenwald
8d55e6a01d Merge pull request #8442 from Snuffleupagus/issue-8372
Add different code-paths to `{CMap, ToUnicodeMap}.charCodeOf` depending on length, since `Array.prototype.indexOf` can be extremely inefficient for very large arrays (issue 8372)
2017-05-24 21:05:04 +02:00
Jonas Jenwald
4ce5e520fb Add different code-paths to {CMap, ToUnicodeMap}.charCodeOf depending on length, since Array.prototype.indexOf can be extremely inefficient for very large arrays (issue 8372)
Fixes 8372.
2017-05-24 19:47:04 +02:00
Jonas Jenwald
ac942ac657 Merge pull request #8437 from yurydelendik/default-ctx
Resets canvas 2d context to the default state.
2017-05-23 23:31:57 +02:00
Yury Delendik
a67198895f Resets canvas 2d context to the default state. 2017-05-23 15:10:30 -05:00
Yury Delendik
ad797fa74d Merge pull request #8436 from Snuffleupagus/issue-8424
Don't map glyphs to the HANGUL FILLER (0x3164) Unicode location (issue 8424)
2017-05-23 11:11:42 -05:00
Jonas Jenwald
31c24ed631 Don't map glyphs to the HANGUL FILLER (0x3164) Unicode location (issue 8424)
*This patch follows a similar pattern as previous ones, by skipping certain problematic Unicode locations.*

According to http://searchfox.org/mozilla-central/rev/6c2dbacbba1d58b8679cee700fd0a54189e0cf1b/gfx/harfbuzz/src/hb-unicode-private.hh#136, it seems that the HANGUL FILLER (0x3164) location is "special".

Fixes 8424.
2017-05-23 16:12:45 +02:00
Tim van der Meij
f2161345e3 Merge pull request #8433 from Snuffleupagus/README-rm-compatibility
Remove the reference to `compatibility.js` from the README, since it's included by default in `GENERIC` builds
2017-05-22 23:02:31 +02:00
Brendan Dahl
5df0cccaa3 Merge pull request #8432 from Snuffleupagus/rm-nameddest-fallback
Remove the special handling for `nameddest`s that look like standard pageNumbers
2017-05-22 11:38:10 -07:00
Jonas Jenwald
cb0391f457 Remove the reference to compatibility.js from the README, since it's included by default in GENERIC builds
Please note that the FAQ (in the Wiki) was already updated to mention that the standalone `compatibility.js` file isn't necessary anymore.
2017-05-22 12:56:27 +02:00
Jonas Jenwald
b4c35857ff Merge pull request #7635 from Snuffleupagus/CursorTools
Unify handling of various cursor tools, e.g. the current Hand Tool and a possible future Zoom Tool, in a new `PDFCursorTools` module
2017-05-22 10:36:52 +02:00
Tim van der Meij
836695986c Add icons for the new "Select tool" button
Also adds the Dutch localizations for the new select/hand tool buttons.
2017-05-22 00:51:03 +02:00
Jonas Jenwald
36c2791296 Unify handling of various cursor tools, e.g. the current Hand Tool and a possible future Zoom Tool, in a new PDFCursorTools module
With the current way that the `HandTool` is implemented, if someone would try to also add a Zoom tool (as issue 1260 asks for) that probably wouldn't work very well given that you'd then have two cursor tools which may not play nice together.
Hence this patch, which attempts to refactor things so that it should be simpler to add e.g. a Zoom tool as well (given that that issue is marked as "good-beginner-bug", and I'm not sure if that really applies considering the current state of the code).

Note that I personally have no interest in implementing a Zoom tool (similar to Adobe Reader) since I wouldn't use it, but I figured that it can't hurt to make this code a bit more future proof.
2017-05-22 00:51:01 +02:00
Jonas Jenwald
0ddf52aca5 Remove the special handling for nameddests that look like standard pageNumbers
PR 7341 added special handling for `nameddest`s that look like pageNumbers, to prevent issues since we previously *incorrectly* supported specifying a pageNumber directly in the hash; i.e. `#10` versus the correct `#page=10` format.

Since this behaviour wasn't correct, PR 7757 fixed and deprecated the old format, which means that we no longer need to maintain the `nameddest` hack in multiple files.
2017-05-20 11:29:29 +02:00
Tim van der Meij
8d2ae20fdd Merge pull request #8431 from Snuffleupagus/rm-make-references
Replace a couple of leftover `make.js` references with `gulpfile.js` in docs/comments
2017-05-19 23:50:33 +02:00
Jonas Jenwald
957dc40ddf Replace a couple of leftover make.js references with gulpfile.js in docs/comments
Also updates a `console.log` statement in the `gulp importl10n` command (since I forgot it in a previous patch, and it didn't seem necessary with a separate patch for it).
2017-05-19 23:45:54 +02:00
Yury Delendik
7b365b9372 Merge pull request #8366 from yurydelendik/rm-shelljs
Removes shelljs
2017-05-19 15:08:04 -05:00
Yury Delendik
c0a1ff0b32 Removes CRLF checker 2017-05-19 07:53:34 -05:00
Yury Delendik
65a1e836cf Removes shelljs 2017-05-19 07:53:05 -05:00
Yury Delendik
32bb0e8c0e Merge pull request #8421 from Snuffleupagus/importl10n-nightly
Change the `importl10n` script to use the Nightly channel
2017-05-18 15:48:35 -05:00
Jonas Jenwald
95660a2ab3 Update l10n files 2017-05-18 12:41:01 +02:00
Jonas Jenwald
044a115d6e Change the importl10n script to use the Nightly channel
It seems that PR 8323 unfortunately didn't pick the right channel for pulling translations from, according to the information in:
 - https://groups.google.com/forum/#!topic/mozilla.dev.l10n/vzmbHLPo3rg
 - https://github.com/mozilla-l10n/localizer-documentation/blob/master/misc/aurora_faqs.md

My apologies for the unnecessary churn in this code!
2017-05-18 12:35:05 +02:00
Jonas Jenwald
658fb03db1 Merge pull request #8420 from mozilla/revert-8390-bug-1319111
Revert "Upstream changes from: Bug 1319111 - Expose result principal URL ("final channel URL") on LoadInfo, convert current consumers of LOAD_REPLACE"
2017-05-18 12:22:02 +02:00
Jonas Jenwald
cbba74f474 Revert "Upstream changes from: Bug 1319111 - Expose result principal URL ("final channel URL") on LoadInfo, convert current consumers of LOAD_REPLACE" 2017-05-18 12:08:05 +02:00
Yury Delendik
5dc8dcdc0f Merge pull request #8388 from Snuffleupagus/issue-8380
Cache JPEG images, just as we do for other image formats, in `evaluator.js` (issue 8380)
2017-05-17 17:25:51 -05:00
Jonas Jenwald
5958dafd8c Merge pull request #8413 from MRMBRAND/set-canvas-background-color
Adds additional parameter so background color of canvas can be set
2017-05-18 00:18:25 +02:00
chris.greening
cfc2f36f5c Adds additional parameter so background color of canvas can be set 2017-05-17 17:06:44 +01:00
Jonas Jenwald
ca3cf6e744 Merge pull request #8417 from Standard8/eslint-cleanup-globals
Use eslint-plugin-mozilla and the webextensions environment to avoid defining globals in each file.
2017-05-17 16:43:54 +02:00
Mark Banner
2e9ae50a3a Use eslint-plugin-mozilla and the webextensions environment to avoid defining globals in each file. 2017-05-17 10:30:46 +01:00
Jonas Jenwald
972eca56a1 Refactor and ES6-ify PDFLinkService.navigateTo
This patch replaces a `var self = this;` statement with arrow functions, and `var` with `let` in `PDFLinkService.navigateTo`.

Furthermore, when I started looking at this method, it quickly became clear that its code is somewhat of a mess. Since I'm one of the persons that have touched this code over the years, I figured that it'd be a good idea to try and clean it up a bit.
2017-05-17 10:27:30 +02:00
Tim van der Meij
e9cbfbccb4 Merge pull request #8411 from Snuffleupagus/web-page-thumbnail-rm-self
Replace unnecessary `var self = this` statements with arrow functions in `web/pdf_page_view.js` and `web/pdf_thumbnail_view.js`
2017-05-16 23:32:48 +02:00
Jonas Jenwald
a9e5bc91fb Replace unnecessary var self = this statements with arrow functions in web/pdf_page_view.js and web/pdf_thumbnail_view.js
Also replaces `var` with `let` in code that's touched in the patch. Please note that this should be completely safe, for two separate reasons, since trying to access let in a scope where it's not defined is first of all a runtime error and second of all an ESLint error (thanks to the `no-undef` rule).
2017-05-16 13:48:27 +02:00
Tim van der Meij
08f8b68f12 Merge pull request #8406 from Rob--W/babel-cache-error-handling
Gracefully ignore transaction failure in plugin-babel-cached
2017-05-14 21:14:03 +02:00
Rob Wu
b3bd2f3b38 Gracefully ignore transaction failure in plugin-babel-cached 2017-05-14 16:01:32 +02:00
Tim van der Meij
63597cc556 Merge pull request #8258 from Snuffleupagus/api-unit-tests-travis
Enable running a subset of the API unit-tests on Travis
2017-05-13 23:56:59 +02:00
Jonas Jenwald
bbe8c3d8ed Enable running a subset of the API unit-tests on Travis
Notably, this patch skips all canvas rendering tests in Node.js.
2017-05-12 11:48:27 +02:00
Jonas Jenwald
028d3421ac Merge pull request #8398 from Snuffleupagus/es6-dom-utils-factories
Convert the `DOMCMapReaderFactory` and `DOMCanvasFactory` to ES6 classes
2017-05-11 23:10:44 +02:00
Jonas Jenwald
c5f73edcd2 Convert the DOMCanvasFactory to an ES6 class
For consistency, also updates the `pdf2png.js` example to use the slightly less verbose `canvasAndContext` parameter name.
2017-05-11 20:15:22 +02:00
Jonas Jenwald
32baa6af7a Convert the DOMCMapReaderFactory to an ES6 class
Given that we only create *one* instance of this class per `getDocument` call, this shouldn't matter performance wise.
2017-05-11 20:15:19 +02:00
Yury Delendik
15425d5b9b Merge pull request #8400 from Snuffleupagus/ref-tests-wait-on-destroy
Wait for previous pdfDocument(s) to be destroyed before running the next reference test
2017-05-11 11:59:20 -05:00
Yury Delendik
372fec61c7 Merge pull request #8399 from Snuffleupagus/unit-tests-wait-on-destroy
Wait until `PDFDocumentLoadingTask.destroy` is resolved before calling `done` in the API unit-tests
2017-05-11 11:55:21 -05:00