When using touch UI (for example on Win8), zooming shouldn't reflow, but just scale

NEW
Unassigned

Status

()

enhancement
P3
normal
7 years ago
16 days ago

People

(Reporter: smaug, Unassigned)

Tracking

(Depends on 1 bug, Blocks 2 bugs, {feature})

unspecified
x86
Windows 10
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 unaffected)

Details

(Whiteboard: gfx-noted)

Right now zoom behavior on Win8+touchscreen is less than optimal.
OS: Linux → Windows 8
Isn't this basically a dupe of bug 593168?
Depends on: 593168
Depends on: 766142
Blocks: 814476
Duplicate of this bug: 814476
Blocks: 688990
No longer depends on: 766142
Duplicate of this bug: 859064
No longer blocks: 814476
Blocks: apz-desktop
No longer blocks: 688990
No longer blocks: apz-desktop
Depends on: apz-desktop
Any status update on this bug? This missing feature makes Firefox seem outdated compared to IE 11...especially on PC+ devices like my Surface Pro 2.
Mmhmm... This should be a high-priority improvement -- Make sure to vote for it, at the least...
Wasn't aware of the voting system. I've voted, sure hope this gets addressed…or just bring back the Windows 8 mode you were originally planning. I, like many others, ditched FireFox earlier 'cause the asinine version number race kept breaking compatibility with extensions. That appears to have been fixed, and I'm back to using Firefox.
Component: Layout → Panning and Zooming
Once bug 1180706 gets merged to m-c, you can enable the Android-style pinch-zooming behaviour by setting apz.allow_zoom=true and dom.meta-viewport.enabled=true. However doing that will break the UI in rather bad ways, so we need to fix things up before we can do that by default.
Blocks: 1158152
Bit surprised at the lack of chatter on a 5 year old bug. :)

Anyway, was reading this post...
https://www.reddit.com/r/firefox/comments/6s7m1f/firefox_needs_actual_touch_support_on_desktop/

Which I think makes a fair point that [it's 2017 and] the other major browsers meet users expectations that touch-zooming scales the entire page (like a tablet or a phone would).

Notably we seem to be taking touch seriously now by adding a Touch Mode to the UI - even automatically invoking it when Windows itself goes into touch mode.

I do hope we can reprioritize this as a result.

Oh, I did try the steps kats outlined in comment 9 to see how things would go. 

They went poorly.
Needinfo for this. kats, do you have an overview of the work items that are left to make this work properly? :)

Thanks!
Flags: needinfo?(bugmail)
Not offhand. However it's not a trivial fix, there is a fair amount of work needed in the guts of layout and graphics code.
Flags: needinfo?(bugmail)
Platform only lists Windows8 and x86 but Windows10 and x64 are affected, too. I recently switched from an Android based tablet to a Windows10 one and this really is the main annoyance.
Now that 57 is near the door, thought I'd ping this bug as a reminder.

I still see requests for this in other forums like reddit and IRC.
Here's one post from today with some upvotes and agreeing comments.
https://www.reddit.com/r/firefox/comments/789d4d/will_firefox_ever_get_pinch_zoom/

One comment in particular says:
> 100% agree. This is an accessibility need for me. I am visually impaired and pinch to zoom in chrome helps so much compared to just using CTRL+ +/-. As soon as FireFox has this, I'll switch.

I can certainly understand how the current jumpy behavior and shifting layout could be considered a non-starter for someone who is visually impaired (while other browsers do this fine). 

Considering this an accessibility aspect may change our perspective a bit too.
Actually changing the platform to All here, as this also affects trackpad zooming on macOS.
OS: Windows 10 → All
Bug 688990 is the macOS version; this one is for windows only. The code for the two will not be the same, because on macOS the manipulation is indirect via a trackpad whereas on windows it would be direct via touchscreen. By "direct" I mean the input device is also the output device so the zoom focus will be based on the user's touch position while for the "indirect" case the zoom focus will always by centred.
OS: All → Windows 10
See Also: → 688990
Seems like the two implementations might end up sharing code (I could be wrong of course).
If so, implementors will want to coordinate.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #17)
> Bug 688990 is the macOS version; this one is for windows only. The code for
> the two will not be the same, because on macOS the manipulation is indirect
> via a trackpad whereas on windows it would be direct via touchscreen. By
> "direct" I mean the input device is also the output device so the zoom focus
> will be based on the user's touch position while for the "indirect" case the
> zoom focus will always by centred.

What about windows devices that don't have touchscreens, but do have precision trackpads? (e.g. Dell XPS 13), or is that a separate bug? These devices support indirect zooming on the trackpad in Microsoft Edge (just like macbook trackpads do with Safari/OSX)
(In reply to Brandon Watkins from comment #19)
> What about windows devices that don't have touchscreens, but do have
> precision trackpads? (e.g. Dell XPS 13), or is that a separate bug? These
> devices support indirect zooming on the trackpad in Microsoft Edge (just
> like macbook trackpads do with Safari/OSX)

In practice fixing either direct or indirect zooming will take a significant effort and the patches will be spread over multiple bugs. Most likely this bug will just end up being used to flip the pref that turns on the feature. Until the implementation is done I don't know if windows trackpad support will be covered by this bug or the other one or some third bug. There is certainly code that will need to be written to handle that case that is not strictly required for either direct zooming on windows or indirect zooming on macOS. However depending on how the implementation goes the code might get written as part of those features.
Wanted to say that WebRender may enable buttery smooth zooming. If this is the case, pinch-to-zoom could make for an excellent showcase for it. I hope, then, it would be possible to land at the same time as WebRender hits release.

Would smooth zooming need any sort of special integration with WebRender?
Im the pre-precision days, used to cheat smooth scrolling on trackpads in Windows by setting the global scroll increment to 1 line (instead of the default 3). 

Although a true fix to this bug appears to require some heavy lifting, could a possible interim solution call modified versions of the `enlarge()`/`reduce()` `zoomManager` methods that use a set of finer-grained `zoomValues` when using touch input (e.g., 0.98, 0.99, 1, 1.01, 1.02, ... instead of the default 0.9, 1, 1.1, ...)? 

I just tested it on my XPS and while it's not perfect, it's an improvement. That said, there'd have to be a separate solution for touchpads, since it appears they're treated as `mousewheel.with_control` inputs.
It's possible have smooth multi-touch magnification zooming in current Firefox (pre WebRender), I've published an extension to demo https://addons.mozilla.org/en-GB/firefox/addon/multi-touch-zoom/

I've only tested on Macbook trackpads but I'm expecting it to work on touch-screen Windows devices – do these devices bind pinch to increment zoom increment by default? If so that may need to be unbound
Yeah, unfortunately it doesn't appear to work with Windows (I filed a bug on GitHub). If anyone has any thoughts and I can try to take a crack at it.
My mistake! It does work when you hold shift while scrolling, but not with touchpad pinching or the touchscreen. I think other mappings might have priority when those events occur.
@haxiomic ; tried on windows and works only with touchpad + SHIFT key pressed .
I'm so happy that there is at least one way to scale zoom to works !
I added a comment on this issue here https://github.com/haxiomic/firefox-multi-touch-zoom/issues/1 
Thanks for the work, I'm sure we will have an extension to scale zoom with pinch on touch screen very soon ! Hope so anyway, it's been a killer feature for me and I don't use Firefox only because of that. (I use the brower to teach at my university and need to scale zoom many times to show things on screen).
Excited to see that's moving 6 years after !! nd I hope to use firefox soon again !
@haxiomic's extension now works with touchscreen
It's not inactive, but there are a number of architectural issues blocking this feature. See the transitive dependencies of this bug, and particularly the dependencies of bug 1461360.

A lot of work was done on bug 656036, and it's close to being done. The next big piece to be tackled will be bug 1459312, which I hope to work on in the coming months.
https://blog.mozilla.org/futurereleases/2018/12/06/firefox-coming-to-the-windows-10-on-qualcomm-snapdragon-devices-ecosystem/
This was just announced today, all of these devices will have touchscreens. Perhaps Qualcomm can help getting this shipped sooner? This issue is not a P3, it's a P2, please change this to P2
I'm doing my best to advocate for this feature and get it on the roadmap for 2019 Q1 (and meanwhile, I have been working on bug 1459312, which is one of its important dependencies). It's not forgotten :)
Thank you! 6 years is painful for something like this :(

Thanks for the updates on this. I am currently using MOZ_USE_XINPUT2=1 on Linux to at least have smooth scrolling with my touchscreen. Is this already using APZ or is this some hacky workaround, which kinda just works for now?

Are the changes discussed here also affecting Linux or just the Windows platform? For the zooming there are a few suboptimal addons like https://addons.mozilla.org/en-US/firefox/addon/multi-touch-zoom/ which work on Linux using XINPUT2 but since they just translate the document body, they break touch gestures within websites.

One more question related to this, the only good resource I can find about APZ is https://wiki.mozilla.org/Platform/GFX/APZ but it feels quite outdated. Is there something better to follow the progress or is this just due to few resources working on this issue?

(In reply to Johannes Zellner from comment #39)

I am currently using MOZ_USE_XINPUT2=1 on Linux to at least have smooth scrolling with my touchscreen. Is this already using APZ or is this some hacky workaround, which kinda just works for now?

Yep, this is using APZ. It's just not enabled by default, due to the issues blocking bug 1207700.

Are the changes discussed here also affecting Linux or just the Windows platform?

They will affect both Windows and Linux.

(In reply to Johannes Zellner from comment #40)

One more question related to this, the only good resource I can find about APZ is https://wiki.mozilla.org/Platform/GFX/APZ but it feels quite outdated. Is there something better to follow the progress or is this just due to few resources working on this issue?

I can point you to technical documentation about APZ, but that's not really useful for following this issue. The best way to follow progress on this issue is to follow bugs in its dependency tree. At this time, the dependency I'm actively working on continues to be bug 1459312.

Thanks for the quick and elaborate reply. I would love to help with this issue, but I have never coded for firefox. I will first try to figure how to build and run it from source and can at least offer to test any changes if wanted.
I can test on both wayland (my default since some time) and X11 with a touchscreen and touchpad.

(In reply to Johannes Zellner from comment #42)

I would love to help with this issue, but I have never coded for firefox. I will first try to figure how to build and run it from source and can at least offer to test any changes if wanted.

Cool, thanks!

Note that you don't necessarily need to build Firefox yourself to test out changes. Code will start to land on the Nightly channel behind a pref, so if you just run an up-to-date Nightly and flip relevant prefs in about:config, you can test things without having to build.

I can test on both wayland (my default since some time) and X11 with a touchscreen and touchpad.

One thing to note is that the initial support will be for touchscreens. Pinch-zooming on the touchpad will require a bit of additional work (and separate work for Windows and Linux).

Blocks: fx-touch
No longer blocks: 1158152

The Addon zooms very unresponsive for me on Windows 10. Any update on when smooth scale zooming will be implemented? Q1 of 2019 has already passed.

This feature did get onto the roadmap, and we made progress in Q1 by fixing one of the main architectural dependencies (bug 1137890). I will be continuing to work on it in Q2.

Note that being on the roadmap for a given quarter does not mean being done or released in that quarter, it means development time will be spent on it in that quarter. The total amount of development time needed, and therefore the shipping date, is not certain at this point.

quick question about this: when it's 'finished', will the scrollbars update when you zoom in or out via touchscreen? The EdgeHTML based Edge does this but Chromium still doesn't https://bugs.chromium.org/p/chromium/issues/detail?id=456861

The end goal is to have the full range of scrollbar behaviour with zooming, including updating their size appropriately, dragging them, and so on.

In the interest of getting this feature in front of users sooner, we may enable it by default before reaching that end goal.

Type: defect → enhancement
You need to log in before you can comment on or make changes to this bug.