mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[GeckoView] Introduce a development mode constant to tell the viewers apart
Currently we have a couple of pre-processor checks, specifically for the GV-viewer, spread throughout the code. This works fine when *building* the viewer, however they're obviously ignored in development mode (i.e. `gulp server`). This leads to a situation where the GV development viewer, i.e. http://localhost:8888/web/viewer-geckoview.html, behaves subtly different from its built version. This could easily lead to bugs, hence this patch introduces a development mode constant to hopefully improve things here. Finally, in a follow-up to PR 15842, also ignores the `pageMode`-state since there's no sidebar available.
This commit is contained in:
parent
c971f4a0a9
commit
8c4843f69a
3 changed files with 27 additions and 17 deletions
|
@ -269,7 +269,9 @@ class PDFScriptingManager {
|
|||
// NOTE: Always ignore the pageLayout in GeckoView since there's
|
||||
// no UI available to change Scroll/Spread modes for the user.
|
||||
if (
|
||||
(typeof PDFJSDev !== "undefined" && PDFJSDev.test("GECKOVIEW")) ||
|
||||
(typeof PDFJSDev === "undefined"
|
||||
? window.isGECKOVIEW
|
||||
: PDFJSDev.test("GECKOVIEW")) ||
|
||||
isInPresentationMode
|
||||
) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue