Closed Bug 1643461 Opened 4 years ago Closed 4 years ago

Pinch to Zoom on built-in PDF viewer does not allow zooming out

Categories

(Core :: Panning and Zooming, defect)

79 Branch
x86_64
Windows 10
defect

Tracking

()

VERIFIED FIXED
mozilla79
Tracking Status
firefox79 --- verified

People

(Reporter: sraghuvanshi, Assigned: tnikkel)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1643097 +++

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

I am on Windows 10. I have the following about:config settings enabled:
apz.windows.use_direct_manipulation to true
apz.allow_zooming to true

Open a PDF file using the built-in PDF viewer. Then, try to pinch to zoom on a precision trackpad.

Actual results:
Regardless of the current zoom level, I cannot zoom out, only in.

Expected results:

Compare it to the old Microsoft Edge PDF viewer (not the new Chromium-based Edge), where pinching to zoom in and out is butter-smooth.

This might be a bug in the direct manipulation code as it doesn't reproduce on mac.

No longer blocks: desktop-zoom-xp
Status: UNCONFIRMED → NEW
Ever confirmed: true

The originally code make the mistake of thinking that [event magnification] was a multiplicative quantity (ie if the scale changed from a to b then [event magnification] would be b/a). But it is an additive quantity (so b-a). If we then apply this knowledge to how we calculate the value from the Windows code we get the new formula.

The macOS and non-macOS code could be merged because mCurrentSpan is always 100.0 on macOS, but I'm not going to do that just yet because the Windows specific code isn't mature yet, so I'm not sure if we will need to tweak it more and my goal with this change was to just get the signs right to fix the worst bug. The scale can be addressed later if needed.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED
Attachment #9154518 - Attachment description: Bug 1643461. Fix calculate of deltaY on when creating a widget wheel event from pinch input data on Windows. r?kats → Bug 1643461. Fix calculation of deltaY on when creating a widget wheel event from pinch input data on Windows. r?kats
Attachment #9154518 - Attachment description: Bug 1643461. Fix calculation of deltaY on when creating a widget wheel event from pinch input data on Windows. r?kats → Bug 1643461. Fix calculation of deltaY when creating a widget wheel event from pinch input data on Windows. r?kats
Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7966e39bfe36
Fix calculation of deltaY when creating a widget wheel event from pinch input data on Windows. r=kats
Blocks: 1630912
Component: PDF Viewer → Panning and Zooming
Product: Firefox → Core
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79

Looks like this patch landed in the latest nightly. However, now, when I pinch to zoom, bug 1625462 is back. When I pinch to zoom on a PDF, the entire webpage zooms. And it's kind of janky because the PDF.js menus zoom unevenly compared to the actual webpage content. It's hard to describe what's going on.

Technically, though, this bug is fixed since I can zoom out again. But bug 1643097 is still active, and bug 1625462 has reappeared.

Flags: needinfo?(tnikkel)

That's odd. I would expect that those two bugs could never happen at the same time. Do you think you could make a video of what you are seeing to help me understand?

Flags: needinfo?(sraghuvanshi)
Flags: needinfo?(sraghuvanshi)

See a screen recording here: https://youtu.be/40l7S2A-Zzo

I pinch to zoom in and out using my trackpad a few times. I also hit Ctrl-0 a couple times --- that only affects the content zoom, not the overall page zoom. Please let me know if you need anything else.

Flags: needinfo?(tnikkel)

Thank you for the screen recording. Could you please file a new bug for that? Thanks.

Flags: needinfo?(sraghuvanshi)
Flags: needinfo?(sraghuvanshi)
Flags: qe-verify+

Verified-Fixed on latest Nightly 80 and Beta 79.0b2. Pinch zoom out is working in the built-in PDF viewer.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: