Open Bug 1797215 Opened 3 years ago Updated 1 month ago

Send async "touch" events at the widget level instead of synthesized DOM events

Categories

(Remote Protocol :: Agent, task, P2)

task
Points:
5

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: dlrobertson, Assigned: whimboo)

References

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

Details

(Whiteboard: [webdriver:m20])

Attachments

(2 files)

Many of the scrollend and overscroll event tests use touchScrollInTarget to trigger a scroll in a scrollable element. Use native touch events instead of DOM events to make it possible to use touchScrollInTarget-like patterns in tests.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [webdriver:backlog]
See Also: → 1785102
Points: --- → 8
Product: Testing → Remote Protocol

Touch events are a special type of events so I assume this should be blocked on bug 1773393 instead.

No longer depends on: parent-actions
Points: 8 → 5
Whiteboard: [webdriver:backlog] → [webdriver:m8]
Summary: Consider sending native input touch events → Consider sending widget input events for touch instead of synthesized DOM events
Depends on: 1834306
No longer depends on: 1834306
Depends on: 1848957
Depends on: 1853120
Depends on: 1851812
Summary: Consider sending widget input events for touch instead of synthesized DOM events → Send async touch events at the widget level instead of synthesized DOM events
Summary: Send async touch events at the widget level instead of synthesized DOM events → Send async "touch" events at the widget level instead of synthesized DOM events

Please note that with bug 1852243 we have a temporary workaround available that will work fine for layout folks to work towards the interop 2023 goals. As such we do not have to work on this feature in M8 anymore.

Whiteboard: [webdriver:m8] → [webdriver:backlog]
No longer depends on: 1851812
Blocks: 1866500
No longer blocks: 1866500

Note that for calculating the position relative to the top-level widget (browser), you can use the new LayoutUtils.rectToToplevelWidgetRect() helper method. This method allows you to get the target position based on local coordinates, even from within frames. Ensure that the device pixel ratio settings are applied before calling this method.

Depends on: 1904859
Whiteboard: [webdriver:backlog] → [webdriver:m12]

Actually we will try to get this bug done for M12 but decided to mark it as optional.

Priority: P2 → P3
Depends on: 1904884
Whiteboard: [webdriver:m12] → [webdriver:m13]
Whiteboard: [webdriver:m13] → [webdriver:m14]
Whiteboard: [webdriver:m14] → [webdriver:m15]
Whiteboard: [webdriver:m15] → [webdriver:m16]
Priority: P3 → P2
Depends on: 1957531
See Also: → 1960068
Component: Marionette → Agent
Depends on: 1968861
Blocks: 1965673
Blocks: 1904859
No longer depends on: 1904859
Whiteboard: [webdriver:m16] → [webdriver:m17]
Priority: P2 → P3
Blocks: 1894654
Whiteboard: [webdriver:m17] → [webdriver:m18]
Whiteboard: [webdriver:m18] → [webdriver:m19]
Priority: P3 → P2
Blocks: 2006404
Assignee: nobody → hskupin
Status: NEW → ASSIGNED

WiP patches are attached to the bug. Most of the webdriver tests work fine with dispatching the touch events as widget events via the parent process. But there is a situation which always causes tests to fail:

When a touchstart event is dispatched for a content browsing context a registered event handler on the page doesn't fire, unless the pointer was explicitly moved to the top-right corner of the content browsing context before. Could it be that there is a problem with initial location of the touch pointer input source? Here a minimized example:

        touch_chain = self.marionette.actions.sequence("pointer", "pointer_01", { "pointerType": "touch"})
        touch_chain.pointer_move(0, 0)  # without this line no `touchstart` is emitted on the page
        touch_chain.pointer_down(button=0)
        touch_chain.perform()

It can as well be reproduced with the test test_move_to_fractional_position (whereby something else causes another issue so no pointermove event is emitted):

https://searchfox.org/firefox-main/rev/1f43fe5ffadde0b6898daf607cabb3335dd75d6f/testing/web-platform/tests/webdriver/tests/classic/perform_actions/pointer_touch.py#130-161

Edgar, do you have an idea what could be wrong?

Flags: needinfo?(echen)

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

It can as well be reproduced with the test test_move_to_fractional_position (whereby something else causes another issue so no pointermove event is emitted):

https://searchfox.org/firefox-main/rev/1f43fe5ffadde0b6898daf607cabb3335dd75d6f/testing/web-platform/tests/webdriver/tests/classic/perform_actions/pointer_touch.py#130-161

Edgar, do you have an idea what could be wrong?

Per discussion in slack, the initial position of touch input source looks weird. Let me know if you encounter other issues.

Flags: needinfo?(echen)

Locally confirmed snap-fling-in-large-area.html (which is one of the introp-2026 tests) passed with D284832. Thanks!

Depends on: 2022644
Whiteboard: [webdriver:m19] → [webdriver:m20]
Blocks: 2004147
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: