Synthesis of native mouse scroll events is incorrect on GTK3

RESOLVED FIXED in Firefox 41

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: acomminos, Assigned: acomminos)

Tracking

unspecified
mozilla41
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
The synthesis for native scroll events implemented in bug 1161634 causes gfx/layers/apz/test/test_wheel_scroll.html to intermittently fail on GTK3.

5089 20:24:46 INFO - 1266 INFO TEST-UNEXPECTED-FAIL | gfx/layers/apz/test/test_wheel_scroll.html | We should not have scrolled to the bottom of the scrollframe - got false, expected true
5090 20:24:46 INFO - 1267 INFO TEST-UNEXPECTED-FAIL | gfx/layers/apz/test/test_wheel_scroll.html | The rotation should have been adjusted - got false, expected true

This is because the pixel deltas are treated as line deltas by the event handler, causing us to scroll too much. We could either convert to line deltas using the pixel deltas provided to nsWindow::SynthesizeNativeMouseScrollEvent (we would need to pass down the nsIDOMElement to the widget layer I believe), ditch the GDK_SCROLL_SMOOTH path, or perhaps synthesize a 'custom' event type (may conflict with new GDK scroll event types).

The GTK2 path isn't quite correct either, discarding pixel deltas entirely and just sending line scroll events in the correct direction.
(Assignee)

Comment 1

3 years ago
Created attachment 8625973 [details] [diff] [review]
Convert to native scroll units for APZ testing on GTK.

This converts the APZ tests' pixel deltas to our pseudo-line units for GTK using the scrollable element's font size. Thanks!
Attachment #8625973 - Flags: review?(bugmail.mozilla)
Comment on attachment 8625973 [details] [diff] [review]
Convert to native scroll units for APZ testing on GTK.

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

LGTM, thanks!
Attachment #8625973 - Flags: review?(bugmail.mozilla) → review+
(Assignee)

Updated

3 years ago
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/eba8941bf4a3
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.