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

Don't use a hidden canvas when constructing the zoomLayer in PDFPageView.update #8561

Merged
merged 1 commit into from
Jun 22, 2017
Merged

Don't use a hidden canvas when constructing the zoomLayer in PDFPageView.update #8561

merged 1 commit into from
Jun 22, 2017

Conversation

Snuffleupagus
Copy link
Collaborator

This is an existing issue that I noticed while testing PR #8552.

When zooming or rotation occurs, we'll try to use the current canvas as a (CSS transformed) preview until the page has been completely re-drawn.
If you manage to change the scale (or rotation) very quickly, it's possible that PDFPageView.update can be called before a previous render operation has progressed far enough to remove the hidden property from the canvas.

The result is thus that a page may be entirely black during zooming or rotation, which doesn't look very good. This effect can be a bit difficult to spot, but it does manifest even in the default viewer.

…geView.update`

*This is an existing issue that I noticed while testing PR 8552.*

When zooming or rotation occurs, we'll try to use the current canvas as a (CSS transformed) preview until the page has been completely re-drawn.
If you manage to change the scale (or rotation) *very* quickly, it's possible that `PDFPageView.update` can be called *before* a previous `render` operation has progressed far enough to remove the `hidden` property from the canvas.

The result is thus that a page may be *entirely* black during zooming or rotation, which doesn't look very good. This effect can be a bit difficult to spot, but it does manifest even in the default viewer.
@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/ba9fcedf7562efe/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

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

Total script time: 2.30 mins

Published

@timvandermeij timvandermeij merged commit 2f2e539 into mozilla:master Jun 22, 2017
@timvandermeij
Copy link
Contributor

timvandermeij commented Jun 22, 2017

I verified that the black page does appear before the patch and does not happen anymore after the patch. Thank you!

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