Closed
Bug 1157409
Opened 9 years ago
Closed 9 years ago
APZ on Windows e10s loses some mouse wheel events with high-precision mouse
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
People
(Reporter: bent.mozilla, Assigned: dvander)
References
Details
Attachments
(1 file, 1 obsolete file)
1.84 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
Something crazy is happening with mousewheel scrolling today, some events are getting lost somehow. Intermittently my mouswheel scrolling doesn't do anything, at least not at first. Changing focus to other windows on my system and then back to firefox seems to make it happen more frequently.
Comment 1•9 years ago
|
||
Can you provide a specific page/scrollframe that didn't work?
Assignee | ||
Comment 2•9 years ago
|
||
Also, what make/model mouse do you have?
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(bent.mozilla)
Reporter | ||
Comment 3•9 years ago
|
||
It's a Logitech B100. And I see this behavior on bugzilla, gmail, everywhere.
Flags: needinfo?(bent.mozilla)
This is the hi-res mouse David was talking about, I believe.
Assignee: nobody → dvander
Comment 5•9 years ago
|
||
This will need to be fixed before we turn it on by default.
Blocks: apz-windows
Updated•9 years ago
|
tracking-e10s:
--- → -
Updated•9 years ago
|
Summary: APZ on Windows e10s loses some mouse wheel events → APZ on Windows e10s loses some mouse wheel events with high-precision mouse
Assignee | ||
Comment 7•9 years ago
|
||
I got a high resolution mouse and can reproduce this really easily. It's pretty annoying.
Status: NEW → ASSIGNED
Assignee | ||
Comment 8•9 years ago
|
||
Well, I definitely found one problem, a race condition. But I'm not sure if high resolution mice are related. Say the compositor thread (c) and controller thread (I) are separate threads, and we try to composite a frame as we get a new wheel event: c: Begin a new frame. c: Cache TimeStamp::Now() as APZ's current frame time. I: Take the APZC lock to start an animation. c: Take the APZC lock to update the current animation - BLOCKED. I: Initialize a new wheel animation with TimeStamp::Now(). I: Release the APZC lock. c: UNBLOCKED - the cached frame time is now < the animation start time. This confuses the key spline function and we think the delta is 0, and end the animation prematurely.
Assignee | ||
Comment 9•9 years ago
|
||
The problem is the IsZero(adjustedOffset) check in WheelScrollAnimation::DoSample(). Given that, this seemed like the easiest fix. I changed the animation to use GetFrameTime instead of event.mTimeStamp for good measure.
Attachment #8597746 -
Flags: review?(bugmail.mozilla)
Comment 10•9 years ago
|
||
Comment on attachment 8597746 [details] [diff] [review] fix Review of attachment 8597746 [details] [diff] [review]: ----------------------------------------------------------------- I'm fine with the WheelScrollAnimation changes, but I'd rather leave the Update call as using the timestamp from the event, unless we actually need it to fix the issue.
Attachment #8597746 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 11•9 years ago
|
||
The previous patch turned out to not work all the time. Even if we clamp the event time to <= |initial frame time|, the frame time could be so soon after the event that we still request a scroll delta of 0. This version changes the condition that ends the animation, to exclude frames that result in an unadjusted displacement of 0.
Attachment #8598276 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Updated•9 years ago
|
Attachment #8597746 -
Attachment is obsolete: true
Updated•9 years ago
|
Attachment #8598276 -
Flags: review?(bugmail.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/cb70f0ab7163
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•