2016-05-12 07:58:17 +09:00
|
|
|
{
|
|
|
|
"showPreviousViewOnLoad": true,
|
|
|
|
"defaultZoomValue": "",
|
|
|
|
"sidebarViewOnLoad": 0,
|
2016-09-07 20:30:26 +09:00
|
|
|
"cursorToolOnLoad": 0,
|
2016-05-12 07:58:17 +09:00
|
|
|
"enableWebGL": false,
|
Add general support for re-dispatching events, on `EventBus` instances, to the DOM
This patch is the first step to be able to eventually get rid of the `attachDOMEventsToEventBus` function, by allowing `EventBus` instances to simply re-dispatch most[1] events to the DOM.
Note that the re-dispatching is purposely implemented to occur *after* all registered `EventBus` listeners have been serviced, to prevent the ordering issues that necessitated the duplicated page/scale-change events.
The DOM events are currently necessary for the `mozilla-central` tests, see https://hg.mozilla.org/mozilla-central/file/tip/browser/extensions/pdfjs/test, and perhaps also for custom deployments of the PDF.js default viewer.
Once this have landed, and been successfully uplifted to `mozilla-central`, I intent to submit a patch to update the test-code to utilize the new preference. This will thus, eventually, make it possible to remove the `attachDOMEventsToEventBus` functionality.
*Please note:* I've successfully ran all `mozilla-central` tests locally, with these patches applied.
---
[1] The exception being events that originated on the `window` or `document`, since those are already globally available anyway.
2018-08-28 17:26:18 +09:00
|
|
|
"eventBusDispatchToDOM": false,
|
2016-05-12 07:58:17 +09:00
|
|
|
"pdfBugEnabled": false,
|
|
|
|
"disableRange": false,
|
|
|
|
"disableStream": false,
|
|
|
|
"disableAutoFetch": false,
|
|
|
|
"disableFontFace": false,
|
2018-02-13 23:01:55 +09:00
|
|
|
"textLayerMode": 1,
|
2016-05-12 07:58:17 +09:00
|
|
|
"useOnlyCssZoom": false,
|
2016-09-07 05:26:57 +09:00
|
|
|
"externalLinkTarget": 0,
|
2016-11-19 04:03:49 +09:00
|
|
|
"renderer": "canvas",
|
2016-01-23 21:56:56 +09:00
|
|
|
"renderInteractiveForms": false,
|
2017-02-08 08:15:09 +09:00
|
|
|
"enablePrintAutoRotate": false,
|
2018-12-07 02:32:41 +09:00
|
|
|
"disableOpenActionDestination": true,
|
2017-07-19 23:26:17 +09:00
|
|
|
"disablePageMode": false,
|
2018-05-15 12:10:33 +09:00
|
|
|
"disablePageLabels": false,
|
Add support for updating the document hash, off by default, when the browser history is updated (issue 5753)
This is *really* the best that we can do here, since other proposed solutions would interfere with (and break) the painstakingly implemented browsing history that's present in the default viewer.
I'm still not convinced that this is a good idea in general, but this patch implements it in a way where it is possible to toggle[1] for users that wish to have this feature. In particular, there's a couple of reasons why I'm not finding this feature necessary/great:
- It's already possible to easily obtain the current hash, by simply clicking on the `viewBookmark` button at any time.
- Hash changes requires a bit of special handling[2], i.e. extra code, to prevent issues when the browser history is traversed (see `PDFHistory._popState`). Currently this is only necessary when the user has manually changed the hash, with this patch it will always be the case (assuming the feature is active).
- It's not always possible to change the URL when updating the browser history. For example: In the Firefox built-in viewer, the URL cannot be modified for local files (i.e. those using the `file://` protocol).
This leads to inconsistent behaviour, and may in some cases even result in errors being thrown and the history thus not updating, if the browser prevents changes to the URL during `pushState`/`replaceState` calls.
---
[1] Using the `historyUpdateUrl` viewer preference.
[2] This depends, to a great extent, on browsers always firing `popstate` events *before* `hashchange` events, which may or may not actually be guaranteed.
2019-01-03 23:45:33 +09:00
|
|
|
"historyUpdateUrl": false,
|
2018-05-15 12:10:33 +09:00
|
|
|
"scrollModeOnLoad": 0,
|
|
|
|
"spreadModeOnLoad": 0
|
2016-09-04 03:26:46 +09:00
|
|
|
}
|