Closed Bug 1686666 Opened 3 years ago Closed 2 years ago

Sync event.js methods with latest EventUtils.js

Categories

(Remote Protocol :: Marionette, task, P3)

Default
task

Tracking

(firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: whimboo, Assigned: jgraham)

References

(Regressed 1 open bug)

Details

Attachments

(1 file)

We haven't synced the code for a while and as such a lot of new features and bug fixes aren't part of our code. Would be good to do that again.

A first step is done via bug 1686361 for synthesizeMouseAtPoint because it's needed. The rest we can do later given that this might cause side-effects we don't know about yet.

Rather than copying over the code from EventUtils, load EventUtils.js
into event.js. This is slightly complicated by the fact that
EventUtils.js depends on the existence of a global named window. So
instead of loading the script as a normal component, we need to use
loadSubScript to create an instance of the script with the required
window binding (this is similar to the approach the CDP module uses).

The actual API changes for mouse events are ~trivial, but for key
events things are a little more involved. The code previously (in
effect) called synthesizeKey with the virtual keycode as the aKey
argument. However EventUtils.js documents this as deprecated, so we
switch to providing the actual key, with the KEY_ prefix for
non-printable characters.

To make this easier, all the data about various keys from the
WebDriver spec is collapsed into a single lookup table, rather than
having a table for each interesting property.

Assignee: nobody → james
Status: NEW → ASSIGNED
Blocks: 1543337
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/b609cc1c05e7
Make marionette events use EventUtil.js directly, r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/32989 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Upstream PR merged by moz-wptsync-bot

== Change summary for alert #33419 (as of Tue, 01 Mar 2022 20:36:49 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
1% Base Content JS linux1804-64-shippable-qr 1,827,032.00 -> 1,811,342.00
1% Base Content JS macosx1015-64-shippable-qr 1,857,864.00 -> 1,842,781.33
1% Base Content JS macosx1015-64-shippable-qr 1,857,810.67 -> 1,842,808.00

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=33419

Regressions: 1801601
Product: Testing → Remote Protocol
Regressions: 1776190
Blocks: 1776190
No longer regressions: 1776190
No longer blocks: 1776190
Regressions: 1776190
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: