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.
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