Closed Bug 595052 Opened 11 years ago Closed 11 years ago
[mobile2] multi-touch zoom is jittery in tileless Fennec
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.
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.
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.
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+
Pushed to mobile2: http://hg.mozilla.org/users/bstover_mozilla.com/mobile2/rev/c42cd3d22e0b
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.