Closed Bug 913909 Opened 11 years ago Closed 11 years ago

Scrolling a page randomly jumps forward a little bit then jumps back


(Core Graveyard :: Widget: WinRT, defect)

26 Branch
Windows 8.1
Not set


(Not tracked)



(Reporter: jimm, Assigned: mbrubeck)



(Whiteboard: [preview])


(1 file)


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.
Assignee: nobody → jmathies
Blocks: 915723
No longer blocks: metro-apzc
Whiteboard: [preview-triage]
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: [1] is the code that saves the last scroll offset triggered by the APZC and [2] is the code that filters out scroll events coming from gecko based on that. MetroWidget needs some equivalent code to handle this.

Component: Graphics: Layers → Widget: WinRT
Assignee: jmathies → mbrubeck
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:
Attached patch patchSplinter Review
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]

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:
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
No longer blocks: 915723
Blocks: metro-apzc
OS: Windows 8 Metro → Windows 8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.