Last Comment Bug 681621 - Panning breaks when element is made visible (m.xkcd.com)
: Panning breaks when element is made visible (m.xkcd.com)
Status: VERIFIED FIXED
[qa-]
: regression, verified-aurora, verified-beta
Product: Fennec Graveyard
Classification: Graveyard
Component: Panning/Zooming (show other bugs)
: Firefox 7
: All Android
: P3 normal (vote)
: Firefox 7
Assigned To: Matt Brubeck (:mbrubeck)
:
Mentors:
Depends on:
Blocks: 634386
  Show dependency treegraph
 
Reported: 2011-08-24 05:47 PDT by CoJaBo
Modified: 2011-09-09 15:40 PDT (History)
8 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Bug in landscape mode. (72.05 KB, image/png)
2011-08-24 05:47 PDT, CoJaBo
no flags Details
bug in portrait mode (103.72 KB, image/png)
2011-08-29 09:38 PDT, Martijn Wargers [:mwargers] (gone per 2016-05-31 :-( )
no flags Details
WIP (1.02 KB, patch)
2011-09-02 14:00 PDT, Matt Brubeck (:mbrubeck)
no flags Details | Diff | Review
patch (1.07 KB, patch)
2011-09-02 15:24 PDT, Matt Brubeck (:mbrubeck)
ben: review+
christian: approval‑mozilla‑aurora+
christian: approval‑mozilla‑beta+
Details | Diff | Review

Description CoJaBo 2011-08-24 05:47:32 PDT
Created attachment 555372 [details]
Bug in landscape mode.

Tested on nightly 2011-08-24 using Droid X, screen resolution 480×854.
This has happened sporadically since at least 7.0a and on other sites, but it took a while to locate a reproducible case.

1. Go to http://m.xkcd.com/583/ (if in landscape mode),
or go to http://m.xkcd.com/882/ (if in portrait mode)
(The bug does not present when either URL is loaded in the opposite orientation. It will also present on some, but not all, other comics.)
2. Zoom in all the way and pan to the top-right corner.
3. Tap on the image. (This toggles the element altText at the bottom of the page from display:none to display:block)
4. Zoom out.

Actual:
When the image is tapped, the page jerks to the side.
When zoomed out, the left margin of the page falls somewhere in the middle of the screen, and the remaining left side of the screen is checkerboarded.
Note the position of the altText element, centered at the bottom in the visible fragment of the page.
Attempting to zoom or pan causes the page to jerk around erratically, which sometimes persists when reloaded (closing the tab and reopening the page is necessary to reset).

Expected:
The page should not move when tapped and should display as normal when zoomed out.
Comment 1 Martijn Wargers [:mwargers] (gone per 2016-05-31 :-( ) 2011-08-29 09:38:50 PDT
Created attachment 556577 [details]
bug in portrait mode

Confirmed, I can reproduce it with the steps to reproduce.
Comment 2 Matt Brubeck (:mbrubeck) 2011-09-01 22:20:31 PDT
I can look into this.  (Assigning as a reminder to myself, but if someone else wants to steal this, feel free.)
Comment 3 Matt Brubeck (:mbrubeck) 2011-09-02 10:27:27 PDT
When this bug happens, we are getting a MozScrolledAreaChanged event in the content process with aEvent.x < 0, (for example, I just got one with aEvent.x == -322).
Comment 4 Matt Brubeck (:mbrubeck) 2011-09-02 14:00:52 PDT
Created attachment 557937 [details] [diff] [review]
WIP

This patch fixes the bug, but I need to check whether it is correct or if it cause any other regressions.
Comment 5 Matt Brubeck (:mbrubeck) 2011-09-02 15:24:34 PDT
Created attachment 557961 [details] [diff] [review]
patch

This fixes the bug.  When the page is scrolled to the right, the MozScrolledAreaEvent ".x" property has to be adjusted by the scroll position.  I verified this does not the test cases in bug 634386 for which this code was added.  (My previous patch where I just changed the value to zero *did* regress those test cases.)
Comment 7 Matt Brubeck (:mbrubeck) 2011-09-02 15:42:59 PDT
Comment on attachment 557961 [details] [diff] [review]
patch

After this has been on Nightly a few days, I'd like approval to land it on Aurora and Beta.  It's a very low risk mobile-only fix for a regression in Firefox 7.  The regression causes broken panning and/or checkerboards that don't go away.  It can be triggered by content JavaScript, or by double-tap with "reformat on zoom" enabled.

P.S. Big thanks to CoJaBo for finding steps to reproduce this bug!
Comment 8 Ed Morley [:emorley] 2011-09-04 17:00:28 PDT
http://hg.mozilla.org/mozilla-central/rev/fc2a18413a7e
Comment 9 christian 2011-09-06 14:23:26 PDT
Comment on attachment 557961 [details] [diff] [review]
patch

Approved for mozilla-aurora and mozilla-beta. Please land asap!
Comment 11 Cristian Nicolae (:xti) 2011-09-09 09:18:30 PDT
I cannot reproduce this issue anymore on the latest Firefox 7 Beta build, performing the steps from comment #0. I'll mark this bug as verified fixed.

--
Mozilla/5.0 (Android;Linux armv7l;rv:7.0)Gecko/20110908
Firefox/7.0 Fennec/7.0
Device: Motorola Droid 2
OS: Android 2.3
Comment 12 Kevin Brosnan [:kbrosnan] 2011-09-09 09:54:20 PDT
v.

Mozilla/5.0 (Android;Linux armv7l;rv:8.0a2)Gecko/20110909
Firefox/8.0a2 Fennec/8.0a2

Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110909
Firefox/9.0a1 Fennec/9.0a1
Comment 13 Gabriela [:gaby2300] 2011-09-09 14:35:17 PDT
Mozilla/5.0 (Android; Linux armv7l; rv:9.0a 1)Gecko/20110909 Firefox/9.0a1 Fennec/9.0a1

Works fine for me in a Samsung Galaxy Tab 10.1
Comment 14 juan becerra [:juanb] 2011-09-09 15:40:48 PDT
QA no longer needs to track this, since it's been verified across the board.

Note You need to log in before you can comment on or make changes to this bug.