Open Bug 1894654 Opened 2 years ago Updated 3 months ago

Remove `test.events.async.enabled` preference and use async dispatching for all mouse and touch events through Marionette

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: edgar, Unassigned)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

Currently, we provide a pref, test.events.async.enabled, to specify if the mouse events should be synthesized asynchronously. When the pref is set to true, the mouse event would be all synthesized and dispatched in parent process and then dispatch to content over IPC.

Perhaps we could consider making the utility methods can specify whether this event should be synthesized asynchronously directly, e.g.

EventUtils.synthesizeMouse(element, 1, 1, { type: "mousemove", async: true });
Depends on: 1968855

Edgar, my patch on bug 1968855 should basically do all that already. Why do you think we need another bug for it?

Flags: needinfo?(echen)

I leave this open just in case if we need to do anything more to get rid of test.events.async.enabled for synthesizing mouse event, if bug 1968855 covers all things, then we could mark this as a duplicated of bug 1968855.

Flags: needinfo?(echen)

With my patch I'm not removing all the usages of the test.events.async.enabled preference because we need to support for touch as well. Therefore I've updated only a couple of tests to ensure that the async dispatching is working.

Once both mouse and touch events support the async dispatching we should check again and reduce the usage of this preference as much as possible. Therefore lets wait for bug 1848958 and bug 1797215.

Edgar, should we at some point enable async events by default for those APIs, or should we continue to require an opt-in via the asyncEnabled argument for the methods in EventUtils?

Depends on: 1848958, 1797215
No longer depends on: 1968855
Summary: Consider make synthesizing mouse event utils can specify whether the event should be synthesized asynchronously → Remove `test.events.async.enabled` preference and use async dispatching for all mouse and touch events through Marionette

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #3)

Edgar, should we at some point enable async events by default for those APIs, or should we continue to require an opt-in via the asyncEnabled argument for the methods in EventUtils?

Dispatching synthesized event directly in content process is sufficient for most of tests, so we should continue to opt in to asynchronous event dispatching using the asyncEnabled argument, don't need to make it the default behavior.

We still need to wait at least until all web-platform tests for touch and mouse events work correctly over a couple of weeks.

You need to log in before you can comment on or make changes to this bug.