Closed Bug 718463 Opened 12 years ago Closed 12 years ago

Tap during animated zoom leaves the page blurry

Categories

(Firefox for Android Graveyard :: General, defect, P2)

ARM
Android
defect

Tracking

(firefox14 fixed, firefox15 verified, blocking-fennec1.0 +, fennec11+)

VERIFIED FIXED
Firefox 14
Tracking Status
firefox14 --- fixed
firefox15 --- verified
blocking-fennec1.0 --- +
fennec 11+ ---

People

(Reporter: martijn.martijn, Assigned: kats)

References

()

Details

(Keywords: regression, Whiteboard: [gfx])

Attachments

(3 files, 1 obsolete file)

Steps to reproduce:
- Triple tap on some part of the page

Expected result:
- The page should zoom in as like with a double tap

Actual result:
- After the third tap, the zoom action stops, and the page is stuck in a blurry state.
tracking-fennec: --- → ?
tracking-fennec: ? → 11+
Priority: -- → P2
QA Contact: general → wjohnston
Assignee: nobody → wjohnston
QA Contact: wjohnston → general
This needs testing post-maple landing to see if it's still an issue
Keywords: qawanted
blocking-fennec1.0: --- → +
Status: NEW → ASSIGNED
Attached patch PatchSplinter Review
So the issue is, we get a ActionDown in state Fling, and I we kill off the animation in mid run. Somewhere we also don't bother to update our viewportmetrics I think, which makes us blurry... 

This adds an interruptable property to the animation to specify whether or not it can be stopped. It also adds checks for flings and animations in onSingleTapConfirmed and onDoubleTap to prevent accidental clicks while we're in mid animation.

kats, you or pcwalton may have a better idea for how to handle this? I'd ask for just feedback, but if you like this approach, feel free to just review it.
Attachment #601352 - Flags: review?(bugmail.mozilla)
Attached patch Helpful stuffSplinter Review
Just putting this here to store it somewhere. This slows down our animations to make it easier to play with them.
OK, I think we're going to freeze the zoom when this happens, but we still need to not be blurry. Renaming this bug so that I don't confuse myself again.
Summary: Triple tap causes zoom action to stop → Tap during animated zoom leaves the page blurry
Comment on attachment 601352 [details] [diff] [review]
Patch

Review of attachment 601352 [details] [diff] [review]:
-----------------------------------------------------------------

Minusing this patch to get it out of my queue, then.
Attachment #601352 - Flags: review?(bugmail.mozilla) → review-
I'll retest after Maple lands.
Whiteboard: [gfx]
I did a pinch zoom and before ending the zoom, I panned and still see blurriness. 

This is with tinderbox build: http://ftp.mozilla.org/pub/mozilla.org/mobile/tinderbox-builds/mozilla-central-android/1331738369/
Triple tapping does stop the animated zoom on the third tap still with the latest nightly  ( 3/20/2012) w/ Galaxy Nexus.

Pinch zoom and pan before ending with Galaxy Nexus w/ latest nightly 3/20/2012 does not seem to cause blurriness any more.

Will test with some other devices.
Tested with HD Desire and Samsung Galaxy S II.  Same result as Comment 8 occurs.  tapping a third time during an animated zoom will cause the zoom to stop and show blurriness still in the nightly 3/20/2012.
Keywords: qawanted
I cannot replicate the pan/zoom or triple click issue on Galaxy S or Galaxy Nexus.
I can duplicate this by tapping during a double-tap zoom out on the HTC Flyer. If I pan, the page adjusts correctly, but if I just tap to interrupt the animation, I'm left with a blurry page.
Attached patch Patch (obsolete) — Splinter Review
This one is a pretty straightforward fix
Assignee: wjohnston → bugmail.mozilla
Attachment #614063 - Flags: review?(chrislord.net)
Comment on attachment 614063 [details] [diff] [review]
Patch

Review of attachment 614063 [details] [diff] [review]:
-----------------------------------------------------------------

Leaving as r? pending explanation of the below.

::: mobile/android/base/ui/PanZoomController.java
@@ +273,5 @@
> +            // disabled by getRedrawHint(), so force a redraw in case
> +            // this touchstart is just a tap that doesn't end up triggering
> +            // a redraw
> +            mController.setForceRedraw();
> +            mController.notifyLayerClientOfGeometryChange();

Why don't we do this for ANIMATED_ZOOM? Surely this isn't going to fix the issue?
Turns out we're pretty much never in the ANIMATED_ZOOM state, since the animateZoomTo(Rect) code calls bounce(viewport) to do the actual animation. If you prefer I can try to fix that so that we actually remain in the ANIMATED_ZOOM state when we're doing an animated zoom... but that sounds like crazy talk! :p
Comment on attachment 614063 [details] [diff] [review]
Patch

Review of attachment 614063 [details] [diff] [review]:
-----------------------------------------------------------------

Possibly nice to add a comment under the ANIMATED_ZOOM case (and even nicer to either remove that state entirely, or make it do as it says), but r+ in that case :)

::: mobile/android/base/ui/PanZoomController.java
@@ +273,5 @@
> +            // disabled by getRedrawHint(), so force a redraw in case
> +            // this touchstart is just a tap that doesn't end up triggering
> +            // a redraw
> +            mController.setForceRedraw();
> +            mController.notifyLayerClientOfGeometryChange();

Why don't we do this for ANIMATED_ZOOM? Surely this isn't going to fix the issue?
Attachment #614063 - Flags: review?(chrislord.net) → review+
Attached patch Patch v2Splinter Review
I decided it was worth the effort to fix properly. This makes sure we remain in the ANIMATED_ZOOM state during the animation. I verified that our handling for all incoming touch events during this state is sane. The only 'odd' case is if you double-tap and leave your finger down after the second tap (and then possibly drag around before lifting). In that case we do the zoom-to-rect as expected, and ignore the drag.
Attachment #614063 - Attachment is obsolete: true
Attachment #614117 - Flags: review?(chrislord.net)
Comment on attachment 614117 [details] [diff] [review]
Patch v2

Review of attachment 614117 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me, though I wouldn't be surprised at something subtly breaking... (not a comment on the change of course, so much as this being a delicate bit of code)

r+ with the comment sorted.

::: mobile/android/base/ui/PanZoomController.java
@@ +488,3 @@
>          // set the animation target *after* setting state BOUNCE, so that
>          // the getRedrawHint() is returning false and we don't clobber the display
>          // port we set as a result of this animation target call.

This comment needs amending.
Attachment #614117 - Flags: review?(chrislord.net) → review+
Good catch, fixed it on landing. And yeah, I agree this code is pretty delicate. *crosses fingers*

https://hg.mozilla.org/integration/mozilla-inbound/rev/66e7ce7034c7

I need to buy you multiple $BEVERAGEs for dealing with all my bugspam and reviews so quickly :)
Target Milestone: --- → Firefox 14
(In reply to Kartikaya Gupta (:kats) from comment #18)
> Good catch, fixed it on landing. And yeah, I agree this code is pretty
> delicate. *crosses fingers*
> 
> https://hg.mozilla.org/integration/mozilla-inbound/rev/66e7ce7034c7
> 
> I need to buy you multiple $BEVERAGEs for dealing with all my bugspam and
> reviews so quickly :)

Well, I could say the same for you doing all this work so quickly, but I never turn down a $BEVERAGE :)
https://hg.mozilla.org/mozilla-central/rev/66e7ce7034c7
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
This issue is not reproducible anymore on the latest Nightly by performing the str from comment #0. 
Closing bug as verified fixed on:

Firefox 15.0a1 (2012-05-23)
Device: Galaxy Nexus
OS: Android 4.0.2
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: