Closed Bug 1696802 Opened 3 years ago Closed 3 years ago

add code for preffed off double tap to zoom on mac

Categories

(Core :: Panning and Zooming, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(2 files)

No description provided.

We already have a pref for double tap to zoom with is already enabled by default so it's kind of awkward to add another pref.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED

Hmm, I found test code in the chromium repo that checks that the smart magnify event is dispatched as a wheel event that can be preventDefaulted

https://source.chromium.org/chromium/chromium/src/+/master:content/browser/renderer_host/render_widget_host_view_mac_unittest.mm;l=1660;drc=9dd92d606f13e5a25704ed0a7ac245af5727862f

and indeed Chrome does not double tap zoom if you register a wheel listener that preventDefaults. Safari however does not care about preventDefault, and does not send a wheel event.

I can file a followup bug for that, not sure what priority we want for that: 1) don't ship without it 2) we can ship without it but still spend time to implement it 3) see if we get complaints and implement if so or 4) probably not worth it.

Offhand, my suggestion would be (2). That would also be consistent with bug 1686147 where we are planning to match the Safari behaviour in the initial release, and work on matching the (more involved) Chrome behaviour subsequently.

I lean towards 3) because we don't know how big a problem it will be and we have other things that we could work on that we know how important they are.

Creating an event with type NSEventTypeSmartMagnify does not work with either NSEvent mouseEventWithType or NSEvent otherEventWithType (they both hit an assert in the appkit code). So the best we can do is call the same function.

Depends on D107389

Filed bug 1697766 for the preventdefault follow up.

Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/14eab025027a
Add code to support double tap to zoom on mac. r=botond,mstange
https://hg.mozilla.org/integration/autoland/rev/ad220349088f
Add test. r=botond,mstange
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Regressions: 1698841
Regressions: 1703497
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: