Closed Bug 981651 Opened 7 years ago Closed 7 years ago

PositionedEventTargeting doesn't work so well when zoomed in with APZ


(Core :: Layout, defect)

Gonk (Firefox OS)
Not set





(Reporter: kats, Assigned: kats)



(1 file)

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.

1. In the B2G browser, load a page like
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)
Flags: needinfo?(roc)
Attached patch PatchSplinter Review
This does what I described above and seems to work locally.
Comment on attachment 8388704 [details] [diff] [review]

Review of attachment 8388704 [details] [diff] [review]:

I agree!
Attachment #8388704 - Flags: review+
Follow-up for Werror bustage.
Assignee: nobody → ryanvm
Assignee: ryanvm → bugmail.mozilla
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.