Open Bug 1225869 Opened 9 years ago Updated 2 years ago

For tests that generate wheel events, use SynthesizeNativeMouseScrollEvent rather than routing via DispatchInputEvent

Categories

(Core :: Panning and Zooming, defect, P3)

Other Branch
defect

Tracking

()

People

(Reporter: kats, Unassigned)

References

Details

(Keywords: arch, Whiteboard: [gfx-noted])

In bug 1126090 we added the line of code at [1] in order to make wheel events pass with APZ. The purpose of this line was to make sure wheel events generated by tests were routed through APZ. (The tests were disabled on B2G in the same bug, and bug 1223946 added more widget machinery to make this stuff work on Android). However, I don't like this approach because it's inconsistent with the way the other DOMWindowUtils functions work. In general the "sendXXXEvent" type of functions should route events directly on the main thread to the DOM, and the "sendNativeXXXEvent" type of functions should route events through the widget/APZ code. So what I would like to do is: 1) Replace the DispatchAPZAwareEvent call at [1] with a regular widget->DispatchEvent, which will *not* go through APZ 2) Update any breaking tests to use sendNativeMouseScrollEvent instead, so that their synthesized wheel events do go through APZ 3) Implement the native wheel event synthesization on any platforms that are missing it (i.e. Android, B2G) This will make the behaviour more consistent overall. [1] https://dxr.mozilla.org/mozilla-central/rev/a2f83cbe53ac4009afa4cb2b0b8f549289b23eeb/dom/base/nsDOMWindowUtils.cpp#819
Bug 1146243 also added a bunch of this "routing through APZ" stuff that ideally I'd like to remove.
Function got renamed.
Summary: For tests that generate wheel events, use SynthesizeNativeMouseScrollEvent rather than routing via DispatchAPZAwareEvent → For tests that generate wheel events, use SynthesizeNativeMouseScrollEvent rather than routing via DispatchInputEvent
Keywords: arch
Whiteboard: [gfx-noted]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.