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

[Regression] The zoomLayer-functionality is broken after PR 17817 #18622

Open
Snuffleupagus opened this issue Aug 18, 2024 · 0 comments
Open

Comments

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Aug 18, 2024

Attach (recommended) or Link to PDF file

wuppertal_2012.pdf

Web browser and its version

N/A

Operating system and its version

N/A

PDF.js version

master, or any version after PR #17817

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Load the attached PDF document in the viewer.
  2. Wait until initial rendering is complete.
  3. Change the zoom level to e.g. page-width. (It must be a zoom operation that triggers immediately, i.e. not using defaultZoomDelay.)

What is the expected behavior?

That the previously rendered canvas, as stored in this.zoomLayer on the PDFPageView-instance, is visible while the new canvas renders in the background.

Note that you need a fairly slow rendering page to easily spot this, which is probably why the issue has gone unnoticed.

What went wrong?

The new canvas renders visibly, which this.zoomLayer is intended to avoid (such that the page is "usable" while re-rendering occurs.)

Link to a viewer

No response

Additional context

git bisect gave the following output, i.e. this points to PR #17817:

918b500ca5075f8b03167ef276c990e6987190ca is the first bad commit
commit 918b500ca5075f8b03167ef276c990e6987190ca
Author: Calixte Denizet <[email protected]>
Date:   Thu Mar 21 12:51:08 2024 +0100

    Avoid wrong scrolling when calling zoomReset

    The goal of this patch is to fix the test:
    https://searchfox.org/mozilla-central/source/toolkit/components/pdfjs/test/browser_pdfjs_zoom.js

    It's a regression due to #17790.

 test/integration/viewer_spec.mjs       | 32 ++++++++++++++++++++++++++++++++
 web/annotation_editor_layer_builder.js |  1 -
 web/pdf_page_view.js                   |  7 ++++++-
 3 files changed, 38 insertions(+), 2 deletions(-)

/cc @calixteman

@Snuffleupagus Snuffleupagus added the release-blocker Blocker for the upcoming release label Oct 9, 2024
@Snuffleupagus Snuffleupagus removed the release-blocker Blocker for the upcoming release label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant