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

Attempt to respect the "zoom" hash parameter, even when the "nameddest" parameter is present (issue 11875) #11880

Merged
merged 1 commit into from
May 8, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

Given that the PDFLinkService.setHash method itself if completely synchronous, moving the handling of "nameddest" to occur last shouldn't cause any problems (famous last words).
This way the destination will still override any previous parameter, such as e.g. the "page", as expected. Furthermore, given that the PDFLinkService.navigateTo method is asynchronous that should provide additional guarantees that the "nameddest" parameter is always respected.

As sort-of expected, this fairly innocent looking change also required some tweaks in the PDFHistory to prevent dummy history entires upon document load (only an issue when both "page" and "nameddest" parameters are provided in the hash).

Fixes #11875

…t" parameter is present (issue 11875)

Given that the `PDFLinkService.setHash` method itself if completely synchronous, moving the handling of "nameddest" to occur last *shouldn't* cause any problems (famous last words).
This way the destination will still override any previous parameter, such as e.g. the "page", as expected. Furthermore, given that the `PDFLinkService.navigateTo` method is asynchronous that should provide additional guarantees that the "nameddest" parameter is always respected.

As sort-of expected, this fairly innocent looking change also required some tweaks in the `PDFHistory` to prevent dummy history entires upon document load (only an issue when both "page" *and* "nameddest" parameters are provided in the hash).
@Snuffleupagus Snuffleupagus changed the title Attempt to respect the "zoom" hash parameter, even when the "nameddes…t" parameter is present (issue 11875) Attempt to respect the "zoom" hash parameter, even when the "nameddest" parameter is present (issue 11875) May 7, 2020
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented May 8, 2020

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/3ca0793c6d9f391/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 8, 2020

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/3ca0793c6d9f391/output.txt

Total script time: 3.29 mins

Published

@timvandermeij timvandermeij merged commit 7823d59 into mozilla:master May 8, 2020
@timvandermeij
Copy link
Contributor

Thank you for improving this!

@Snuffleupagus Snuffleupagus deleted the issue-11875 branch May 8, 2020 21:49
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.

Option zoom is ignored if nameddest is set
3 participants