This repository has been archived by the owner on Mar 23, 2019. It is now read-only.
forked from diracdeltas/pdf.js
-
Notifications
You must be signed in to change notification settings - Fork 7
Merge PDFJS upstream v1.9.426 and fix some PDF loading errors #3
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Remove the special handling for `nameddest`s that look like standard pageNumbers
…ility Remove the reference to `compatibility.js` from the README, since it's included by default in `GENERIC` builds
…e 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.
Don't map glyphs to the HANGUL FILLER (0x3164) Unicode location (issue 8424)
Resets canvas 2d context to the default state.
…ng on length, since `Array.prototype.indexOf` can be extremely inefficient for very large arrays (issue 8372) Fixes 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)
…rvice-navigateTo Refactor and ES6-ify `PDFLinkService.navigateTo`
Update webpack.js to support browsers that do not have the Web Workers API
Convert the overlay manager to ES6 syntax
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.
Convert the files in the `/src/core` folder to ES6 modules
… factory, in preparation for ES6 conversion of the thumbnail related code This patch intends to simplify future ES6 refactoring of the thumbnail code, since the current code isn't going to work well together with proper `Class`es.
Convert the page view to ES6 syntax
…geFactory Refactor the `getTempCanvas` function in `pdf_thumbnail_view.js` to a factory, in preparation for ES6 conversion of the thumbnail related code
Removes last UMDs from the modules.
…ble when running the various `gulp` commands After PR 8459, the run-time of the various `gulp` test commands has regressed quite badly on Windows. For me, `gulp test` now takes approximately *twice* as long when run locally on Windows. The problem seems to be the Babel transpilation step, which takes well over five minutes to run.[1] For someone like me, who runs tests a lot locally, this slowdown is really hurting the overall development experience. To get around this I tested setting `PDFJS_NEXT = true` in `gulpfile.js`, since the transpilation step isn't necessary when testing in a modern browser. However, having to edit `gulpfile.js` every time that I need to run tests isn't very practical. Hence this patch, which adds an environment variable that allows you to disable the transpilation simply by using e.g. `PDFJS_NEXT=true gulp test`. I hope that this can be considered an acceptable solution, such that I don't need to maintain this patch locally (or worse, edit `gulpfile.js` locally before testing). --- [1] This can also be observed on the Windows bot, but it seems fine on Linux.
Allow specifying the `PDFJS_NEXT` build flag via an environment variable when running the various `gulp` commands
Adds streams-lib polyfill and exports ReadableStream from shared/util.
Wraps mozL10n to async calls; splits firefox and generic l10n libs.
It appears that this was simply forgotten in PR 8394.
…lServices-createL10n Add a stub `createL10n` to `DefaultExternalServices` in app.js
Fix two cmap related issues.
More robust getPage() error handling.
ES6-ify the code in `web/dom_events.js`
…es in evaluator.js From looking at blame, it seems that these checks became obsolete with PR 692 (which landed close to six years ago). Note how, after that PR, there's no longer anything being assigned to the `code` property of an Object.
…ject-rm-code-property Remove leftover `args[0].code` checks from the `OPS.paintXObject` cases in evaluator.js
…t `properties` object in `PartialEvaluator.translateFont` This appears to simply have been forgotten in the re-factoring in PR 4815, where the `coded` property was renamed to the *much* more descriptive `isType3Font` property.
Fallback to plain object for globalScope.
…Type3Font Replace the `coded` property with `isType3Font` when building the font `properties` object in `PartialEvaluator.translateFont`
…r-class Convert `DownloadManager` to an ES6 class
… mode At this point, the default viewer is already not usable in older browsers in `gulp server` mode, since we only run the code through Babel as part of the build step. Hence there shouldn't be much point in manually loading `compatibility.js` in `viewer.html` the way that we've been doing, especially considering that it's already being loaded by `src/shared/util.js`.
…ing in `src/core/jpg.js` (issue 4901) This patch removes the `clamp0to255` helper function, as well as manual clamping code in `src/core/jpg.js`. The adjusted constants in `_convertCmykToRgb` were taken from CMYK to RGB conversion code found in `src/core/colorspace.js`. *Please note:* There will be some very slight movement in a number of existing test-cases, since `Uint8ClampedArray` appears to use `Math.round` (or equivalent) and the old code used (basically) `Math.floor`.
Use `Uint8ClampedArray`, when returning data, and remove manual clamping in `src/core/jpg.js` (issue 4901)
This appears to fix the 'Bad end offset errors' when loading some PDFs. See mozilla#7616 Fix brave/browser-laptop#10867
bsclifton
approved these changes
Sep 12, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ on upstream merge and root cause fix (b119354)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge https://github.com/mozilla/pdf.js/releases/tag/v1.9.426
Fix brave/browser-laptop#10867