pdf.js/web
Jonas Jenwald 480110625a Try to, completely, avoid loading the ReadableStream polyfill in MOZCENTRAL builds
With https://bugzilla.mozilla.org/show_bug.cgi?id=1505122 landing in Firefox 65, the native `ReadableStream` implementation is now enabled by default in Firefox.

Obviously it would be nice to simply stop bundling the polyfill in MOZCENTRAL builds altogether, however given that it's still possible to disable[1] `ReadableStream` this is probably not a good idea just yet.
Nonetheless, now that native support is available, it seems unnecessary (and wasteful) to keep bundling the polyfill twice[2] in MOZCENTRAL builds. Hence this patch, which contains a suggest approach for packing the polyfill in a *separate* file which is then *only* loaded if/when needed.

With this patch, the size of the `gulp mozcentral` build target is thus reduced accordingly:

|       | `build/mozcentral`
|-------|-------------------
|master |   3 461 089
|patch  |   3 340 268

Besides the PDF.js files taking up less space in Firefox this way, the additional benefit is that there's (by default) less code that needs to be loaded and parsed when the PDF Viewer is used which also cannot hurt.

---
[1] In `about:config`, by toggling the `javascript.options.streams` preference.

[2] Once in the `build/pdf.js` file, and once in the `build/pdf.worker.js` file.
2019-01-19 09:05:01 +01:00
..
images Add spread modes to web viewer 2018-05-14 23:10:32 -04:00
.eslintrc Enable eslint-plugin-import to prevent unresolved paths 2018-11-23 13:50:28 +01:00
.gitignore Remove obselete file from .gitignore 2015-01-26 16:44:45 +01:00
annotation_layer_builder.css Add support of Ink annotation 2018-10-03 00:28:49 +02:00
annotation_layer_builder.js Move the imageResourcesPath option to a BaseViewer/PDFPageView/AnnotationLayerBuilder option 2018-02-13 14:28:38 +01:00
app_options.js Add support for updating the document hash, off by default, when the browser history is updated (issue 5753) 2019-01-06 20:09:02 +01:00
app.js Prevent TypeError: views[index] is undefined being throw in getVisibleElements when the viewer, or all pages, are hidden 2019-01-13 11:34:24 +01:00
base_viewer.js Move/refactor the code in the BaseViewer.update method to reduce duplication in the extending classes 2019-01-18 15:06:21 +01:00
chrome-i18n-allow-access-to-file-urls.json Add translations of "Allow access to file URLs" 2015-08-14 18:59:55 +02:00
chromecom.js Refactor the Preferences classes to utilize async methods rather than manually returning Promises 2018-09-03 09:52:36 +02:00
compressed.tracemonkey-pldi-09.pdf Add Makefile. Move some files around to make building the website easier. 2011-07-05 10:53:57 -07:00
debugger.js Replace String.prototype.substr() occurrences with String.prototype.substring() 2018-09-28 11:41:07 +02:00
default_preferences.json Add support for updating the document hash, off by default, when the browser history is updated (issue 5753) 2019-01-06 20:09:02 +01:00
download_manager.js Stop exposing the URL polyfill in the global scope 2018-07-04 09:16:28 +02:00
firefox_print_service.js [api-minor] Change the getViewport method, on PDFPageProxy, to take a parameter object rather than a bunch of (randomly) ordered parameters 2018-12-21 11:55:20 +01:00
firefoxcom.js Convert PDFDataRangeTransport to an ES6 class 2018-10-20 17:15:27 +02:00
genericcom.js Refactor the Preferences classes to utilize async methods rather than manually returning Promises 2018-09-03 09:52:36 +02:00
genericl10n.js Refactor the IL10n implementations to utilize async methods rather than manually returning Promises 2018-09-03 09:52:36 +02:00
grab_to_pan.js Enable the no-var ESLint rule in the /web folder 2017-11-05 16:53:47 +01:00
interfaces.js Add support for updating the document hash, off by default, when the browser history is updated (issue 5753) 2019-01-06 20:09:02 +01:00
overlay_manager.js Refactor the OverlayManager to utilize async methods rather than manually returning Promises 2018-09-03 09:52:36 +02:00
password_prompt.js Change var to let, and use object destructuring, in a couple of previously class converted web/*.js files 2017-07-03 11:22:49 +02:00
pdf_attachment_viewer.js Move the disableCreateObjectURL option from the global PDFJS object and into getDocument instead 2018-03-01 18:11:17 +01:00
pdf_cursor_tools.js Simplify resetting of the SecondaryToolbar Scroll/Spread mode buttons, and add a missing comment in PDFCursorTools 2018-07-08 10:55:56 +02:00
pdf_document_properties.js Implement the setDocument method for the find controller 2018-09-30 16:57:40 +02:00
pdf_find_bar.js Tweak the DOMTokenList.toggle polyfill (issue 10460) 2019-01-16 20:15:44 +01:00
pdf_find_controller.js Merge pull request #10231 from Snuffleupagus/find-no-scroll-highlightAll 2018-11-10 20:37:47 +01:00
pdf_find_utils.js Add initial support for "Whole words" searching in the viewer 2018-09-10 11:59:29 +02:00
pdf_history.js Avoid setting incorrect document URLs, in IE 11, when the browser history is updated (PR 10423 follow-up) 2019-01-16 19:26:44 +01:00
pdf_link_service.js For repeated 'findagain' operations, attempt to reset the search position if the user has e.g. scrolled in the document (issue 4141) 2018-11-03 12:03:11 +01:00
pdf_outline_viewer.js Attempt to simplify the signature of the PDFSidebar constructor, by moving the eventBus parameter from the options object and removing the PDFOutlineViewer dependency 2018-10-02 13:14:11 +02:00
pdf_page_view.js [api-minor] Change the getViewport method, on PDFPageProxy, to take a parameter object rather than a bunch of (randomly) ordered parameters 2018-12-21 11:55:20 +01:00
pdf_presentation_mode.js Add source parameters to all remaining EventBus.dispatch calls that are currently missing those 2018-08-30 10:39:32 +02:00
pdf_print_service.js [api-minor] Change the getViewport method, on PDFPageProxy, to take a parameter object rather than a bunch of (randomly) ordered parameters 2018-12-21 11:55:20 +01:00
pdf_rendering_queue.js Replace a few occurences of var with let in already ES6 converted web/ files 2017-10-22 16:23:38 +02:00
pdf_sidebar_resizer.js Only resize the sidebar with the left mouse button 2017-12-02 19:05:17 +01:00
pdf_sidebar.js Attempt to simplify the signature of the PDFSidebar constructor, by moving the eventBus parameter from the options object and removing the PDFOutlineViewer dependency 2018-10-02 13:14:11 +02:00
pdf_single_page_viewer.js Move/refactor the code in the BaseViewer.update method to reduce duplication in the extending classes 2019-01-18 15:06:21 +01:00
pdf_thumbnail_view.js [api-minor] Change the getViewport method, on PDFPageProxy, to take a parameter object rather than a bunch of (randomly) ordered parameters 2018-12-21 11:55:20 +01:00
pdf_thumbnail_viewer.js [api-minor] Change the getViewport method, on PDFPageProxy, to take a parameter object rather than a bunch of (randomly) ordered parameters 2018-12-21 11:55:20 +01:00
pdf_viewer.component.js Remove the attachDOMEventsToEventBus functionality, since EventBus instances are able to re-dispatch events to the DOM (PR 10019, bug 1492849 follow-up) 2018-10-31 23:32:39 +01:00
pdf_viewer.css Add spread modes to web viewer 2018-05-14 23:10:32 -04:00
pdf_viewer.js Move/refactor the code in the BaseViewer.update method to reduce duplication in the extending classes 2019-01-18 15:06:21 +01:00
pdfjs.js Use ES6 notation, and replace var with let, in web/pdf_viewer.component.js and web/pdfjs.js 2017-11-05 16:53:47 +01:00
preferences.js Refactor the Preferences classes to utilize async methods rather than manually returning Promises 2018-09-03 09:52:36 +02:00
secondary_toolbar.js Convert some occurrences, in the /web folder, of classList.{add, remove} to classList.toggle with the "force" parameter 2018-10-12 15:41:11 +02:00
text_layer_builder.css Use span instead of div in the text layer 2018-11-18 15:54:08 +01:00
text_layer_builder.js Avoid unnecessary PDFFindController.scrollMatchIntoView calls in TextLayerBuilder._renderMatches when highlightAll is set (PR 10201 follow-up) 2018-11-14 15:42:15 +01:00
toolbar.js Convert some occurrences, in the /web folder, of classList.{add, remove} to classList.toggle with the "force" parameter 2018-10-12 15:41:11 +02:00
ui_utils.js Prevent TypeError: views[index] is undefined being throw in getVisibleElements when the viewer, or all pages, are hidden 2019-01-13 11:34:24 +01:00
view_history.js Refactor the ViewHistory to utilize async methods rather than manually returning Promises 2018-09-03 09:52:36 +02:00
viewer_compatibility.js Remove the disableFullscreen hack for embedded IE 11 (issue 9585) 2018-06-14 12:25:28 +02:00
viewer-snippet-chrome-extension.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer-snippet-chrome-overlays.html [CRX] Add file chooser as fallback (fixes #9411) 2018-03-21 18:21:46 +01:00
viewer-snippet-firefox-extension.html Try to, completely, avoid loading the ReadableStream polyfill in MOZCENTRAL builds 2019-01-19 09:05:01 +01:00
viewer-snippet-minified.html Remove XHTML leftovers from the viewer HTML files 2016-02-14 13:23:34 +01:00
viewer-snippet.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer.css Fix small visual quirk in thumbnail viewer 2018-12-18 22:48:26 +01:00
viewer.html Add initial support for "Whole words" searching in the viewer 2018-09-10 11:59:29 +02:00
viewer.js In GENERIC builds, dispatch a "webviewerloaded" event (from the webViewerLoad function) before initializing the viewer 2018-11-30 10:04:30 +01:00