Failing WPT in pointerevent_setpointercapture_inactive_button_mouse.html in wpt.fyi
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox139 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 2 open bugs, )
Details
Attachments
(1 file)
pointerevent_setpointercapture_inactive_button_mouse.html fails in wpt.fyi, however, looks like that it passes on our CI.
The test tries to capture the pointer within the pointerover listener when no button is pressed.
Element.setPointerCapture() is defined as
The pointer MUST be in its active buttons state for this method to be effective, otherwise it fails silently.
However, we failed the test with an exception:
FAIL message: NotFoundError: Element.setPointerCapture: Invalid pointer id
On the other hand, "Setting pointer capture" section defines
If the pointerId provided as the method's argument does not match any of the active pointers, then throw a "NotFoundError" DOMException.
as its first step.
"active pointers" is defined as
Any touch contact, pen/stylus, mouse cursor, or other pointer that can produce events. If it is possible for a given pointer (identified by a unique pointerId) to produce additional events within the document, then that pointer is still considered active. Examples:
- A mouse connected to the device is always active.
Currently, we register mouse pointer only while the cursor is over the document. That requires eMouseEnterIntoWidget event before the pointerover, but it's not guaranteed that it's fired before the first synthesized mouse move.
So, perhaps, we need to register pointer if we synthesize a mouse move over a document. However, we cannot unregister it automatically. Therefore, I think it should have a bool flag and if it's required, PointerEventHandler::GetPointerInfo() callers should check whether it gets proper pointer info.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Despite the name, sActivePointersIds is a list of all pointers which is either
active or inactive.
Element::SetPointerCapture checks whether the given pointerId is known one
or not. However, we register mouse pointer when entering over the document
and unregister it when leaving from the document.
However, they are handled when eMouseEnterIntoWidget and
eMouseExitFromWidget are fired, however, they are not fired automatically
if the mouse events are synthesized on a document which does not contain the
system cursor position.
So, we need to make the method register the PointerInfo when
EventStateManager receives eMouseOver or ePointerMove which is caused only
by mouse.
For making any PointerEventHandler::GetPointerInfo() callers can distinguish
whether the pointer is registered or updated by a synthesized mouse events,
PointerInfo should have the information as a bool member.
| Assignee | ||
Comment 2•1 year ago
|
||
I think the pref setting is not used in wpt.fyi. That must be the reason why this test fails in the environment but passes in our CI.
Backed out for causing build bustages @ PointerEventHandler.cpp
| Assignee | ||
Comment 5•1 year ago
|
||
Really, really odd compile error for me because I changed the type to bool from a bit field with !!....
Comment 7•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•