[mobile2] multi-touch zoom is jittery in tileless Fennec

RESOLVED FIXED

Status

defect
RESOLVED FIXED
9 years ago
6 years ago

People

(Reporter: mbrubeck, Assigned: mbrubeck)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

9 years ago
While pinch-zooming with cedar+patches+mobile2, the page sometimes flickers rapidly between different scroll positions, or scrolls down to the bottom of the page.  (The screen sometimes goes completely white/gray, because it has scrolled outside of the cached region.)

This seems to happen most if the page has been panned.  If you are zooming from the very top left corner of the page, it works fine.
Assignee

Comment 1

9 years ago
I think the getPosition calls in GestureModule should be removed - they are used to adjust values that come from transformClientToBrowser, but clientToBrowserView has already done this adjustment.

That doesn't solve the problem, though.

I think the actual problem is that the viewport scroll position changes during the animation, so the later calls to getPosition do not return the same results as the first one.  When we used a canvas for animation, the actual scroll position did not change during the animation, so all transformations would have been based on the starting viewport.
Assignee

Comment 2

9 years ago
Posted patch WIPSplinter Review
This patch is kind of cheesy (it just does some math to undo the new transform and set it back to what the code was expecting) but it works - multitouch zoom is nice and smooth (way better than the old canvas version)!

There's still one problem - at the start of the zoom, it pans the page to center the point where the gesture started.  So e.g. if you touch near the bottom of the screen, the page will pan up so the region you touched is centered.
Assignee

Comment 3

9 years ago
Comment on attachment 474091 [details] [diff] [review]
WIP

(In reply to comment #2)
> There's still one problem - at the start of the zoom, it pans the page to
> center the point where the gesture started.  So e.g. if you touch near the
> bottom of the screen, the page will pan up so the region you touched is
> centered.

This panning problem also exists in mobile-browser trunk, so it shouldn't block this patch.  I filed bug 595229 to fix the panning.
Attachment #474091 - Flags: review?(webapps)
Attachment #474091 - Flags: review?(webapps) → review+
tracking-fennec: --- → ?
Assignee

Comment 4

9 years ago
Pushed to mobile2:
http://hg.mozilla.org/users/bstover_mozilla.com/mobile2/rev/c42cd3d22e0b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.