Closed Bug 1956397 Opened 1 year ago Closed 1 year ago

Add some WPTs for `pointerrawupdate`

Categories

(Core :: DOM: Events, task)

task

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

  • pointerrawupdate may update the capture state
  • pointerrawupdate may cause pointer boundary events (but not mouse boundary events) ✅
  • Adopting an element which has pointerrawupdate to different window ✅
  • pointermove should be retargetted if pointerrawupdate changed the layout ✅

Anything else?

pointerrawupdate is defined [1] as:

The user agent MUST "fire a pointer event" named pointerrawupdate, and only
do so within a secure context, when a pointer changes any properties that
don't fire pointerdown or pointerup events.

"fire a pointer event" is defined [2] as:

If the event is not a gotpointercapture, lostpointercapture, click, auxclick
or contextmenu event, run the process pending pointer capture steps for this
PointerEvent.

So, the pointer capture state should be updated before pointerrawupdate event.
This is tested by pointerevent_pointerrawupdate_flush_pointercapture.https.html.

Additionally, it defines as:

Before firing this event, the user agent SHOULD treat the target as if the
pointing device has moved over it from the previousTarget for the purpose of
ensuring event ordering [UIEVENTS]. If the needsOverEvent flag is set, a
pointerover event is needed even if the target element is the same.

So, pointer boundary events should be fired before pointerrawupdate events.
This is tested by pointerevent_boundary_events_before_pointerrawupdate.https.html.

The pointerrawupdate also defines [1] as:

The target of pointerrawupdate events might be different from the pointermove
events due to the fact that pointermove events might get delayed or coalesced,
and the final position of the event which is used for finding the target could
be different from its coalesced events.

This is tested by pointerevent_pointerrawupdate_remove_target.https.html.

Finally, we will manage whether pointerrawupdate event should be dispatched
to the DOM per DOM window. Therefore, this patch also adds 2 tests for adoption
of elements which have pointerrawupdate event listeners. They are
pointerevent_pointerrawupdate_after_adoption_from_child.https.html and
pointerevent_pointerrawupdate_after_adoption_from_parent.https.html.

  1. https://w3c.github.io/pointerevents/#the-pointerrawupdate-event
  2. https://w3c.github.io/pointerevents/#dfn-fire-a-pointer-event
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/1c338a97849a Add some WPTs for `pointerrawupdate` r=smaug
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/51754 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: