Closed Bug 1177233 Opened 4 years ago Closed 4 years ago

Synthesis of native mouse scroll events is incorrect on GTK3

Categories

(Core :: Widget: Gtk, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: acomminos, Assigned: acomminos)

References

Details

Attachments

(1 file)

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.
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+
Status: NEW → ASSIGNED
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/eba8941bf4a3
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.