Skip to content

Ignore some *scripting* events which don't make sense in PresentationMode #13113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

A number of the currently supported scripting events only make sense in the "normal" viewer mode, and not when PresentationMode is active. For example:

  • Changing the zoom-level will outright break rendering in PresentationMode, since it relies on "page-fit" being used.
  • Focusing a particular (AcroForm) element won't work, and could break keyboard navigation, since forms should not be editable in PresentationMode (see issue 12232).

…Mode

A number of the currently supported *scripting* events only make sense in the "normal" viewer mode, and not when PresentationMode is active. For example:
 - Changing the zoom-level will outright break rendering in PresentationMode, since it relies on "page-fit" being used.
 - Focusing a particular (AcroForm) element won't work, and could break keyboard navigation, since forms should not be editable in PresentationMode (see issue 12232).
@Snuffleupagus Snuffleupagus force-pushed the scripting-PresentationMode-events branch from 1cfde44 to 1fa5ce7 Compare March 19, 2021 12:54
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/749a241fcefa88b/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/749a241fcefa88b/output.txt

Total script time: 4.25 mins

Published

@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://3.101.106.178:8877/feb7eb0a1f5ae48/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/d86423c0e301138/output.txt

@calixteman
Copy link
Contributor

Maybe we should disable scripting when in presentation mode, wdyt ?

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/d86423c0e301138/output.txt

Total script time: 3.22 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/feb7eb0a1f5ae48/output.txt

Total script time: 4.84 mins

  • Integration Tests: Passed

@Snuffleupagus
Copy link
Collaborator Author

Snuffleupagus commented Mar 19, 2021

Maybe we should disable scripting when in presentation mode, wdyt ?

My initial though was exactly the same, but there may be some cases where scripting actually make sense even in PresentationMode.

See e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1100769, which is currently not working because of an error being thrown in the sandbox, but is probably something that users would expect to work also in PresentationMode.

Edit: Apparently the relevant methods are not implemented yet, hence the error:

getOCGs() {
/* Not implemented */
}
getOCGOrder() {
/* Not implemented */
}

@timvandermeij timvandermeij merged commit e7e0ecf into mozilla:master Mar 19, 2021
@timvandermeij
Copy link
Contributor

Looks good to me; thanks!

@Snuffleupagus Snuffleupagus deleted the scripting-PresentationMode-events branch March 19, 2021 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants