Closed Bug 1670295 Opened 4 years ago Closed 4 years ago

Port Marionette:singleTap to use JSWindowActors

Categories

(Remote Protocol :: Marionette, task, P3)

Default
task

Tracking

(Fission Milestone:M7, firefox83 fixed)

RESOLVED FIXED
83 Branch
Fission Milestone M7
Tracking Status
firefox83 --- fixed

People

(Reporter: impossibus, Assigned: jdescottes)

References

Details

(Whiteboard: [marionette-fission-mvp][simple])

Attachments

(3 files, 2 obsolete files)

As long as we don't have touch support in our spec-compliant implementation of WebDriver Actions, we'll need this piece of "legacy actions" working in Fission.

Don't worry about testing this in chrome-scope. The only tests that depend on it use it in content only and they will eventually have to migrate to spec-compliant Actions anyway.

  • layout/base/tests/marionette/test_accessiblecaret_cursor_mode.py
  • layout/base/tests/marionette/test_accessiblecaret_selection_mode.py
  • testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py

I assume this should be a simple task. It's one of the last things we will have to do before being able to enable actors. Maja, will you take it?

Whiteboard: [marionette-fission-mvp] → [marionette-fission-mvp][simple]

I tried porting this, and I stumbled on the following code in listener.js:

  if (win.docShell.asyncPanZoomEnabled && legacyactions.scrolling) {
    let ev = {
      index: 0,
      type,
      id: touch.identifier,
      clientX: touch.clientX,
      clientY: touch.clientY,
      screenX: touch.screenX,
      screenY: touch.screenY,
      radiusX: touch.radiusX,
      radiusY: touch.radiusY,
      rotation: touch.rotationAngle,
      force: touch.force,
    };
    sendSyncMessage("Marionette:emitTouchEvent", ev);
    return;
  }

https://searchfox.org/mozilla-central/rev/d25eb00ab4e90cc0130cd18f303a04cc2a2f8409/testing/marionette/listener.js#332-347
I can't find any consumer for "Marionette:emitTouchEvent". It was added in Bug 958036, but all the listeners reacting to this event seem gone now, or at least I can't find them? Should we remove those if branches for now? Do nothing and log instead?

Stealing this from Maja, sorry :)

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

The emitTouchEvent message seems no longer used.
The code branch is preserved to log a debug message instead.

Depends on D93324

This changeset duplicates some touch event helpers used by the singleTap command.
We might decide to move them to a shared module imported by listener.js and by the child window actor to avoid the duplication.

Depends on D93324

Move singleTap and dependencies to legacyaction.js in order to reuse them in the JSWindowActor.

Depends on D93365

This helper does not reuse anything from the listener.js closure and can be removed safely from the touchProvider wrapper.

Depends on D93367
The wrapped version of emitTouchEvent only provides the current document.
But this document should always match this.container.frame.document when a dispatchActions call is happening.

Tracking marionette-fission-mvp bugs for Fission Beta milestone (M7)

Fission Milestone: --- → M7
Attachment #9181311 - Attachment is obsolete: true
Attachment #9181313 - Attachment is obsolete: true
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/112e132aca33
[marionette] Remove unused message Marionette:emitTouchEvent from listener::emitTouchEvent r=marionette-reviewers,whimboo,maja_zf
https://hg.mozilla.org/integration/autoland/rev/a6ce536f81f5
[marionette] Move legacy touch helpers from listener.js to legacyaction.js r=marionette-reviewers,whimboo,maja_zf
https://hg.mozilla.org/integration/autoland/rev/50bb448a8f6d
[marionette] Port Marionette:singleTap to use JSWindowActors r=marionette-reviewers,whimboo,maja_zf
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: