Closed Bug 1702522 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 28335 - Populate pointerId, pointerType for clicks from touch

Categories

(Core :: DOM: Events, task, P4)

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 28335 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/28335
Details from upstream follow.

b'Liviu Tinta <liviutinta@chromium.org>' wrote:

Populate pointerId, pointerType for clicks from touch

Pointer id and pointer type are not available in GestureManager
where we initiate the click from GestureTap events.

Pointer id algorithm is contained in PointerEventFactory. The problem
with surfacing pointer id in GestureManager is made harder because,
when we need to dispatch the click event, the pointer id for the pointer event
sequence that generates the click has already been deleted from
PointerEventFactory.

What I propose is to keep track of the last pointer id based on
IncomingId made up of rawId and pointer type.

Using this approach, when we dispatch click event in GestureManager we
can then use PointerEventManager to access PointerEventFactory to get
the already deleted pointer id for the pointer event sequence that
generated the click event.

In this approach we would need rawId and pointer type in GestureManager.
Pointer type we can get from WebGestureEvent.primary_pointer_type,
however the rawId we do not have access to.
I propose to add primary_pointer_id to WebGestureEvent and populate it
from TouchEvent in GestureProvider to use it as rawId in GestureManager.

Bug: 1150593
TEST: third_party/blink/web_tests/external/wpt/pointerevents/pointerevent_click_is_a_pointerevent.html
Change-Id: I7e921934f99c78298bad96b69aaa163e63c4be29

Reviewed-on: https://chromium-review.googlesource.com/2800231
WPT-Export-Revision: 62dedeec30ddde8719381a08c7611a33533f59b9

Component: web-platform-tests → DOM: Events
Product: Testing → Core

CI Results

Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 6 tests and 1 subtests

Status Summary

Firefox

OK : 2
FAIL : 2
ERROR: 4

Chrome

OK : 6
PASS : 4
FAIL : 2

Safari

OK : 6
FAIL : 6

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

/pointerevents/pointerevent_click_is_a_pointerevent.html?pen: ERROR
/pointerevents/pointerevent_click_is_a_pointerevent.html?touch: ERROR
/pointerevents/pointerevent_click_is_a_pointerevent_multiple_clicks.html?touch: ERROR
/pointerevents/pointerevent_click_is_a_pointerevent_multiple_clicks.html?pen: ERROR

New Tests That Don't Pass

/pointerevents/pointerevent_click_is_a_pointerevent.html?pen: ERROR (Chrome: OK, Safari: OK)
/pointerevents/pointerevent_click_is_a_pointerevent.html?mouse
click using mouse is a PointerEvent: FAIL (Chrome: PASS, Safari: FAIL)
/pointerevents/pointerevent_click_is_a_pointerevent.html?touch: ERROR (Chrome: OK, Safari: OK)
/pointerevents/pointerevent_click_is_a_pointerevent_multiple_clicks.html?mouse
click using mouse is a PointerEvent: FAIL (Chrome: PASS, Safari: FAIL)
/pointerevents/pointerevent_click_is_a_pointerevent_multiple_clicks.html?touch: ERROR (Chrome: OK, Safari: OK)
/pointerevents/pointerevent_click_is_a_pointerevent_multiple_clicks.html?pen: ERROR (Chrome: OK, Safari: OK)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a90649d34ab
[wpt PR 28335] - Populate pointerId, pointerType for clicks from touch, a=testonly
https://hg.mozilla.org/integration/autoland/rev/265e6c4c52ea
[wpt PR 28335] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.