Closed Bug 913909 Opened 8 years ago Closed 8 years ago
Scrolling a page randomly jumps forward a little bit then jumps back
STR: 1) flick a long page of text In metrofx what you'll see is an occasional jump forward a few pixels in scroll position then a jump back. This can happen a few times during a simple scroll.
Testing with matt at the summit, I think there's a good chance this is high-dpi device specific.
This is the first and most noticeable issue I encountered while trying to pan CNN in metrofx. Some logging shows that AsyncPanZoomController::UpdateScrollOffset is getting called while the fling is in progress, which shouldn't really be happening. This is the reason for the jumpiness in the APZC. Looking around at the code in MetroWidget, it looks like the widget code is calling UpdateScrollOffset every time it receives a scroll-offset-changed message, rather than filtering out the ones that were triggered by the APZC itself. Note the equivalent code in TabChild for B2G:  is the code that saves the last scroll offset triggered by the APZC and  is the code that filters out scroll events coming from gecko based on that. MetroWidget needs some equivalent code to handle this.  http://mxr.mozilla.org/mozilla-central/source/dom/ipc/TabChild.cpp?rev=04610078280c#1582  http://mxr.mozilla.org/mozilla-central/source/dom/ipc/TabChild.cpp?rev=04610078280c#329
Component: Graphics: Layers → Widget: WinRT
Assignee: jmathies → mbrubeck
Status: NEW → ASSIGNED
Hardware: x86_64 → All
Whiteboard: [preview-triage] → [preview]
We have similar code to save the scroll offset and check it before forwarding "scroll" messages, but it's broken when the scrollId != 1, similar to bug 902505: http://hg.mozilla.org/mozilla-central/file/febfe3c7732b/browser/metro/base/content/bindings/browser.js#l621
This basically fixes the problem for me. I can still get a tiny amount of flickr or jitter when scrolling extremely fast, but it's nothing like what we have now.
Attachment #817411 - Flags: review?(jmathies)
Comment on attachment 817411 [details] [diff] [review] patch Can you add a comment explaining what's going on here? This whole code block is very cryptic, might be nice to start commenting what's going on. This does seem to fix the jump back I occasionally see. I still see pretty bad jitter on my surface pro. I'll try to capture a video and file a follow up on that.
Attachment #817411 - Flags: review?(jmathies) → review+
Pushed with several added comments: https://hg.mozilla.org/integration/fx-team/rev/bb7cbe5f16d3
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.