Closed Bug 688990 (desktop-zoom-mac) Opened 10 years ago Closed 3 months ago
Implement "Pinch to zoom" like Safari (and not like it used to be in Firefox)
Firefox is currently the only browser on Mac OS X Lion that does not support "pinch to zoom". My understanding is that this was WONTFIX'ed due to that it was not possible to zoom back to the original page zoom. Safari 5.1 in Lion solves this issue by not allowing to zoom back more than the original zoom state. You can only zoom in and zoom back to the default size. This bug request does not request to only enable the pinch to zoom feature, but to implement it like Safari 5.1 does.
Summary: Implement "Pinch to zoom" like Safari 5.1 → Implement "Pinch to zoom" like Safari 5.1 (and not like it used to be in Firefox)
Related to bug 674371?
Summary: Implement "Pinch to zoom" like Safari 5.1 (and not like it used to be in Firefox) → [10.7] Implement "Pinch to zoom" like Safari 5.1 (and not like it used to be in Firefox)
We didn't want to support it since the thresholds were all wrong and we only zoom 20% at a time, etc. If we could zoom the way Safari 5.1 does it, I'd be all for it. I don't think it's trivial, but I'd love to see it. :)
Referencing the older bugs about this: bug 613909 where the old-style handling of the gestures was disabled and bug 632733 and bug 481092 related to the old implementation. They can be closed once this is fixed.
Can we use the zoom behavior from Firefox for Android for this?
Assignee: nobody → waterlo1
Status: NEW → ASSIGNED
We want this on Windows 8 too (in both "Metro" and desktop modes); see bug 789906. If I understand correctly, the right way to do this is to use the AsyncPanZoomController from B2G (bug 745136).
(In reply to Stefan Arentz [:st3fan] from comment #6) > Can we use the zoom behavior from Firefox for Android for this? Possible, but we probably shouldn't. Firefox for Android reflows text, and it probably shouldn't. We really want this like Safari, or a more iOS-like zooming. That is, where everything gets bigger and does not move its' contents, just allows you to pan around the larger view.
The text reflow in Firefox for Android is controlled by prefs and can be disabled. More importantly, the Android version of this code is mostly implemented in Java and can't be used on other platforms; however, the B2G port of that same code (bug 745136) is already part of Gecko, and we are already planning to use it on Windows 8.
This is a very rough version for pinch zooming. It is compatible with rotation. It works a lot better for ImageDocuments than regular documents.
Apologies for bitrot in previous patch, forgot to update from central before diff'ing.
I have a fixed version of the patch ready, just building real quick to make sure it works.
Same as the last patch, but with way less bit rot!
(In reply to Josiah [:JosiahOne] from comment #13) > I have a fixed version of the patch ready, just building real quick to make > sure it works. Scratch that. Brandon got it fixed. :)
The big-picture plan for panning and zooming across all platforms is to get off-main-thread-compositing working for all platforms (builds on the layers refactoring work being done currently on the gfx branch) and use the AsyncPanZoomController we built for B2G on desktop (and ultimately Android too). In other words, port the stuff we built for B2G to the desktop.
Comment on attachment 714536 [details] [diff] [review] Patch v0.2.1 Most of the code looks fine, but this is probably not something that we will end up shipping in Firefox since the plans for AZPC are too near. Can you please convert this patch in to an add-on? See https://addons.mozilla.org/en-US/developers/docs/sdk/latest/ for more information and feel free to ask questions on IRC as you work on it.
Attachment #714536 - Flags: feedback?(jAwS) → review-
As per https://bugzilla.mozilla.org/show_bug.cgi?id=688990#c17, we'll be moving our work into an add-on. Once OMTC / APZC is ready to go, the add-on will be deprecated. The add-on depends on bugs 851128 and 853490. It will be called "Multi-Touch Gestures" (or something very similar), and will be available on addons.mozilla.org before the end of April. Unassigning myself from the bug.
Status: ASSIGNED → NEW
I keep going back from Firefox to Safari because of this missing feature, i prefer an open platform over proprietary software but ****, the zooming in Firefox feels like going back in time 5 years :'(
Whiteboard: [parity-safari] → [parity-safari] [parity-chrome]
(In reply to Brandon Waterloo from comment #18) > As per https://bugzilla.mozilla.org/show_bug.cgi?id=688990#c17, we'll be > moving our work into an add-on. Once OMTC / APZC is ready to go, the add-on > will be deprecated. > > The add-on depends on bugs 851128 and 853490. It will be called > "Multi-Touch Gestures" (or something very similar), and will be available on > addons.mozilla.org before the end of April. > > Unassigning myself from the bug. Any progress?
5 years ago
5 years ago
I too would really love a soft 'pinch to zoom'. I've recently moved back to Firefox from Google Chrome and it sucks that I can't have this feature anymore.
I'm trying to see if we can find a way to move forward with issues that can benefit from APZ awesomeness. Is there prior art that we can 'copy' from b2g or Android implementations?
[cont comment 24] Is there some kind of API that the frontend team can use to wire things up, or do we need support from platform?
This needs to be implemented in the platform. I think the plan is to look at it once scrolling is solid.
Yeah, what Markus said. There's a bunch of work that needs to be done to handle zoom properly on desktop. With some pref flips you can enable it on Windows touch devices but it exposes a number of bugs that will need to be fixed before it's ready to be used. Once we have shipped the basic APZ scrolling feature we can look into this in more detail.
Whiteboard: [parity-safari] [parity-chrome] → [parity-safari] [parity-chrome][DevRel:P2]
We've had async scrolling for a while now. Any updates on this? > With some pref flips you can enable it on Windows touch devices Is there a similar pref incantation for enabling it on macOS or are we still lacking code there?
Would you mind forwarding this bug to the appropriate people / triagers, please?
Summary: [10.7] Implement "Pinch to zoom" like Safari 5.1 (and not like it used to be in Firefox) → Implement "Pinch to zoom" like Safari (and not like it used to be in Firefox)
Component: General → Panning and Zooming
Priority: -- → P3
Product: Firefox → Core
Whiteboard: [parity-safari] [parity-chrome][DevRel:P2] → [parity-safari] [parity-chrome][DevRel:P2][gfx-noted]
See Also: → desktop-zoom-win
Looks like this has been in development hell for a while, but this is the only missing feature stopping me from switching to Firefox full-time and I would love to see it implemented.
Yeah it seems like now that APZ has landed (as of 57.0) that now might be a good time to readdress this
This bug deserves a higher priority. I will not use Firefox until the browser zoom behavior and multi-touch support is responsive and matches other browsers.
It's possible to add smooth multi-touch zooming to current Firefox - I've developed an extension to demo https://addons.mozilla.org/en-GB/firefox/addon/multi-touch-zoom/?src=userprofile (macOS only)
(In reply to haxiomic from comment #35) > It's possible to add smooth multi-touch zooming to current Firefox - I've > developed an extension to demo > https://addons.mozilla.org/en-GB/firefox/addon/multi-touch-zoom/ > ?src=userprofile > > (macOS only) This seems to work as expected. Thanks!
That is fantastic news ! Hope to see the windows equivalent (it works with SHIFT + pinch on touchpad now) ! One day I'll switch back to firefox, very soon I hope !
Amazing work haxiomic, only took 6 years! I hope this is a big step forward in squashing this bug.
haxiomic, would you be interested in landing that directly in Firefox?
I think it could use some tweaking and fine tuning to make it more responsive. Seems to be a delay after zooming that prevents the user from immediately being able to scroll. Should also assess resource consumption and possible optimization.
Hey Sylvestre, I'm keen to help the feature land in Firefox if I can. I expect it'll take a different approach to the one used in the add-on (which does some ugly things with transform: perspective). Is there someone who owns the gesture code that I should get in touch with? mixxster, I agree, I think there's lots of room for optimization – I'd love to see it as smooth as Safari. That delay seems to be down to a re-paint of the page when the scroll bars become visible which I suspect could be avoided.
(In reply to haxiomic from comment #41) > Hey Sylvestre, I'm keen to help the feature land in Firefox if I can. I > expect it'll take a different approach to the one used in the add-on (which > does some ugly things with transform: perspective). Is there someone who > owns the gesture code that I should get in touch with? Most existing methods for manipulating the view (such as scrolling, or zooming on mobile) are implemented in native (C++) code using our "asynchronous panning and zooming" (APZ) infrastructure. The "asynchronous" part means that the processing of the input events and the progress of the animation that is changing the view is independent of the browser's main loop, and thus can be smooth and responsive even if the main loop is busy running JS or the page is slow to repaint. We would definitely like to add APZ-based support for desktop zooming (that's what this bug tracks). As mentioned earlier, it's a nontrivial undertaking and the timeline for it is uncertain. The idea of landing a JS-based solution like this one as a stopgap, until the APZ-based implementation is ready to take its place, is an interesting one. I'm not opposed to it, but I think the decision is up to the owners of the relevant Firefox front-end code that would need to be modified. :jaws, do you have any thoughts on whether there might be interest in accepting such a contribution?
I looked at the code of the extension and it does this pretty much how I would do this for an extension but I don't think we can ship this built-in as part of Firefox since it works by setting style properties directly on the root element which would be visible from content as well as could have conflicts with some pages that expect various styles set on the root to hold at all times. If haxiomic wants to try to write a patch that implements this without being visible to content (possibly by creating and updating a user agent stylesheet in tab-content.js) then that might work and I would be happy to accept the contribution.  https://github.com/haxiomic/firefox-multi-touch-zoom/blob/master/extension/pinch-zoom.js  https://github.com/haxiomic/firefox-multi-touch-zoom/blob/master/extension/pinch-zoom.js#L156  https://searchfox.org/mozilla-central/rev/51cd1093c5c2113e7b041e8cc5c9bf2186abda13/browser/base/content/tab-content.js
Duplicate of this bug: 1433834
Touchscreen zooming has been implemented into haxiomic's extension. Anyone still interested in implementing this?
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
IMHO it's crazy that Firefox doesn't implement this natively. I think "people might leave" Firefox as soon as they realise they can't easily pinch zoom that image or whatever like they've been doing for years on Safari. I think most won't bother to install an add-on. They'll just leave. Haxiomatic's extension is fantastic and makes Firefox useable for me, but IMHO Firefox really needs to do this nicely right out of the box. Soon. Could you not just repurpose the Firefox Android pinch zoom code? It works well enough.
The patch is unassigned, triaged and P3 and available for grabs. If you want to write a patch, take it, if not, wait until someone else does. If the triage owner will decide to mark is as wontfix, they will. No need to ask about it. Please, familiarize yourself with the Bugzilla etiquette. Your comment is not adding any technical value to the issue at hand.
We definitely haven't forgotten about this, and we are working on it (as other priorities permit). We do plan to reuse most of the Android pinch-zoom code, but there are issues specific to desktop that are not present on mobile that need to be tackled (e.g. different scrollbar behavior). I reorganized the dependency tree of bug 1245183 to make the dependencies of this work more clear. Most of the work involved is not specific to Mac, but common to all desktop platforms; you can follow the progress of that work in the dependencies of bug 1461360.
Thanks for the heads up
Webcompat Priority: --- → ?
11 months ago
Depends on: 1619186
6 months ago
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: desktop-zoom-release
You need to log in before you can comment on or make changes to this bug.