Skip to content

Commit

Permalink
Fix the first expectation of `pointerevent_after_target_removed.html?…
Browse files Browse the repository at this point in the history
…mouse` to conform to the spec

`pointerup` should not imply the pointer move and `pointerover` should be fired
only when the pointer is actually moved. Therefore, `pointerover` should be
fired after `pointerup` which is followed by another `pointermove` instead of
before `pointerup`.

Differential Revision: https://phabricator.services.mozilla.com/D199607

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1823658
gecko-commit: 6cfd68d8e76b8a3b82fb7224ca48e1ddff388e3b
gecko-reviewers: smaug
  • Loading branch information
masayuki-nakano authored and moz-wptsync-bot committed Jan 26, 2024
1 parent a4ac920 commit c33dbea
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions pointerevents/pointerevent_after_target_removed.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,24 @@
setup();

// Tests for dispatched pointer events.
addPromiseTest("pointerdown", "pointer", [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-removed)", "pointerover@parent", "pointerup@parent",
"pointerdown@parent", "pointerup@parent",
"pointerout@parent", "pointerleave@parent"
]);
addPromiseTest("pointerdown", "pointer",
pointer_type == "mouse"
// `pointerup` after removing the child should not cause `pointerover`
// on the parent if the pointer type is hoverable because pointer boundary
// events should be fired only when the hoverable pointer is actually
// moved.
? [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-removed)", "pointerup@parent",
"pointerover@parent", "pointerdown@parent", "pointerup@parent",
"pointerout@parent", "pointerleave@parent"
]
: [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "(child-removed)", "pointerover@parent", "pointerup@parent",
"pointerdown@parent", "pointerup@parent",
"pointerout@parent", "pointerleave@parent"
]);
addPromiseTest("pointerup", "pointer", [
"pointerover@child", "pointerenter@parent", "pointerenter@child",
"pointerdown@child", "pointerup@child", "(child-removed)",
Expand Down

0 comments on commit c33dbea

Please sign in to comment.