Bug 1678771. Add test. r=hiro

We implement a new nsIDOMWindowUtils function sendNativeTouchpadPan to do this. It is only implemented on Windows here.

Depends on D122048

Differential Revision: https://phabricator.services.mozilla.com/D122049
This commit is contained in:
Timothy Nikkel
2021-08-08 22:04:18 +00:00
parent 33345a9afb
commit 1a061191c9
16 changed files with 275 additions and 14 deletions

View File

@@ -537,6 +537,17 @@ nsresult PuppetWidget::SynthesizeNativeTouchpadDoubleTap(
return NS_OK;
}
nsresult PuppetWidget::SynthesizeNativeTouchpadPan(
TouchpadGesturePhase aEventPhase, LayoutDeviceIntPoint aPoint,
double aDeltaX, double aDeltaY, int32_t aModifierFlags) {
if (!mBrowserChild) {
return NS_ERROR_FAILURE;
}
mBrowserChild->SendSynthesizeNativeTouchpadPan(aEventPhase, aPoint, aDeltaX,
aDeltaY, aModifierFlags);
return NS_OK;
}
void PuppetWidget::LockNativePointer() {
if (!mBrowserChild) {
return;