github web-platform-tests/wpt merge_pr_47679

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
6 months ago

Make PostEventHandler::CheckPointerCaptureState synthesize ePointerMove and eMouseMove if nobody captures the pointer anymore

When an element starts capturing a pointer, pointer/mouse boundary events are
dispatched by EventStateManager::PreHandleEvent [1]. However, when the
capturing element loses the capture, they are not dispatched.

When the pointer capture is implicitly released, the pointer may be over another
document. Therefore, this patch synthesizes an internal ePointerMove and
eMouseMove on the widget to make PresShell::HandleEvent redirects the event
to proper document under the pointer.

Unfortunately, I add 2 manual tests into WPT. The reason is, a drag operation
across document boundary with test driver does not work even if I specify the
pointer position within the parent document coordinates. This is same both on
Firefox and Chrome. Additionally, writing the new tests as a mochitest won't
work too. If I use synthesized mouse events, I see similar failure.
Additionally, when I use native events, it works, but unstable to run on CI.

  1. https://searchfox.org/mozilla-central/rev/669fac9888b173c02baa4c036e980c0c204dfe02/dom/events/EventStateManager.cpp#1139-1140

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1793267
gecko-commit: f3d7c6dd48d53773bf29d8fe448cda233b955b68
gecko-reviewers: smaug

Don't miss a new wpt release

NewReleases is sending notifications on new releases.