Skip to content
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

Update BaseViewer.scrollPageIntoView to always validate the pageNumber parameter #10245

Merged
merged 2 commits into from
Nov 9, 2018

Conversation

Snuffleupagus
Copy link
Collaborator

Note that when e.g. presentation mode is active, we fail[1] to ensure that the pageNumber parameter is actually an integer before calling _setCurrentPageNumber (that method expects the argument be an integer).
Also changes the method signature, of scrollPageIntoView, to use object destructuring instead.


[1] Most likely, this is actually my oversight :-)

…mber` parameter

Note that when e.g. presentation mode is active, we fail[1] to ensure that the `pageNumber` parameter is actually an integer before calling `_setCurrentPageNumber` (that method expects the argument be an integer).
Also changes the method signature, of `scrollPageIntoView`, to use object destructuring instead.

---
[1] Most likely, this is actually *my* oversight :-)
… modes in `BaseViewer`

Given that the `_updateScrollMode`/`_updateSpreadMode` methods are "private", there's no particular reason to not just directly call `_setCurrentPageNumber`.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2018

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/9ec90028e29dddf/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2018

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/9ec90028e29dddf/output.txt

Total script time: 2.99 mins

Published

@timvandermeij timvandermeij merged commit b9c03cd into mozilla:master Nov 9, 2018
@timvandermeij
Copy link
Contributor

Looks good!

@Snuffleupagus Snuffleupagus deleted the scrollPageIntoView branch November 9, 2018 23:38
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.

3 participants