[GeckoView] Ignore the pageLayout, from the PDF document, to prevent issues

First of all, given the screen-sizes of most mobile phones using Spread modes is unlikely to be useful.
Secondly, and more importantly, since there's (currently) no UI available for the user to override a PDF document-specified Spread mode this would result in a bad UX otherwise.

Also, removes an outdated comment from the `apiPageLayoutToViewerModes` helper function.
This commit is contained in:
Jonas Jenwald 2022-12-16 11:59:22 +01:00
parent b518d93b45
commit 0289038961
3 changed files with 11 additions and 5 deletions

View file

@ -1236,7 +1236,10 @@ const PDFViewerApplication = {
if (pageMode && sidebarView === SidebarView.UNKNOWN) {
sidebarView = apiPageModeToSidebarView(pageMode);
}
// 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")) &&
pageLayout &&
scrollMode === ScrollMode.UNKNOWN &&
spreadMode === SpreadMode.UNKNOWN