Closed Bug 1753814 Opened 2 years ago Closed 2 years ago

Add an option to configure the maximum amount of pinch zoom that is available

Categories

(Core :: Panning and Zooming, enhancement, P3)

Firefox 98
enhancement

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: pbasista, Assigned: rzvncj, Mentored, NeedInfo)

Details

(Whiteboard: [lang=c++])

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

Use the pinch zoom feature.

Actual results:

The page is zoomed. But only to a maximum amount that is hardcoded.

Expected results:

The page should be zoomed in the same way as it is now. But the maximum amount of pinch zoom that is available should be configurable by user.

Thanks for filing.

I'm going to mark this as a mentored bug, it's a nice simple change for someone looking to start contributing to the Firefox codebase.

Mentor: botond
Priority: -- → P3
Whiteboard: [lang=c++]

Do I understand correctly that we still want to limit the zoom, but we want users to configure kViewportMaxScale ? This number is then multiplied by other factors to actually compute the maxZoom factor.

(In reply to Matteo Ruello from comment #2)

Do I understand correctly that we still want to limit the zoom, but we want users to configure kViewportMaxScale ? This number is then multiplied by other factors to actually compute the maxZoom factor.

Yup, that's right. I do think the browser should still enforce a (less strict) hardcoded limit, e.g. for zooming out you should be able to change the minimum zoom to be lower than the default minimum of 0.25, but we should still clamp it to some smaller threshold (e.g. 0.1). Otherwise, if we allow the user to reach an extreme value (say, 0.001), on a sufficiently large page the browser's going to run into stability issues (e.g. trying to rasterize a huge number of text glyphs and running out of memory or something like that).

The preferences can be defined in StaticPrefList.yaml, with names such as apz.min_zoom and apz.max_zoom. In the code, they'll then be accessible as StaticPrefs::apz_min_zoom() etc.

Assigning to Matteo who is interested in working on this.

Assignee: nobody → matteo.ruello

Hi Matteo, I was wondering if you're interested in continuing to work on this? If not, we have another contribution who may be interested in picking it up.

Flags: needinfo?(matteo.ruello)

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: matteo.ruello → nobody
Assignee: nobody → rzvncj
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by drobertson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2e4152e77b7b
Add an option to configure the maximum amount of pinch zoom that is available. r=dlrobertson
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: