Closed Bug 981651 Opened 7 years ago Closed 7 years ago
Event Targeting doesn't work so well when zoomed in with APZ
It looks like the AppUnitsFromMM code in PositionedEventTargeting.cpp takes into account the presshell resolution when converting from MM to app units. However, it doesn't take into account the async zoom and/or the layer transforms which should mostly (or competely) cancel out the resolution that has been set. The net effect is that if you go to a page and zoom in, tapping on empty space will often select a link that is visually quite far away (although it's relatively close in terms of CSS pixels). This can be quite a frustrating experience at times. STR: 1. In the B2G browser, load a page like https://people.mozilla.com/~kgupta/grid.html 2. Zoom in a bunch (around 3x is a good amount, so one grid square takes up around a screen width on a 320px device) 3. Try tapping in the empty space in the bottom half of the grid squares Expected results: Taps are ignored unless they are actually close to a link Actual results: Some link is almost always activated, even if on the screen it is pretty far away.
I think we would get better results by just skipping the resolution there. There are probably some cases where the resolution isn't cancelled out by layer transforms, but I suspect those are less frequent than cases where it is cancelled out. roc, what do you think?
For comment 1 (hit submit too early)
This does what I described above and seems to work locally.
Comment on attachment 8388704 [details] [diff] [review] Patch Review of attachment 8388704 [details] [diff] [review]: ----------------------------------------------------------------- I agree!
Attachment #8388704 - Flags: review+
Follow-up for Werror bustage. https://hg.mozilla.org/integration/mozilla-inbound/rev/3c4fa37bba16
Assignee: nobody → ryanvm
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.