mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 832101 - Allow EventUtils.sendMouseEvent to set pressure and inputSource [r=smaug]
This commit is contained in:
parent
0c12cff69c
commit
675e0cc17d
@ -239,14 +239,13 @@ function synthesizeMouseAtPoint(left, top, aEvent, aWindow)
|
||||
var button = aEvent.button || 0;
|
||||
var clickCount = aEvent.clickCount || 1;
|
||||
var modifiers = _parseModifiers(aEvent);
|
||||
var pressure = ("pressure" in aEvent) ? aEvent.pressure : 0;
|
||||
var inputSource = ("inputSource" in aEvent) ? aEvent.inputSource : 0;
|
||||
var types = (("type" in aEvent) && aEvent.type) ? [aEvent.type] : ["mousedown", "mouseup"];
|
||||
|
||||
if (("type" in aEvent) && aEvent.type) {
|
||||
utils.sendMouseEvent(aEvent.type, left, top, button, clickCount, modifiers);
|
||||
}
|
||||
else {
|
||||
utils.sendMouseEvent("mousedown", left, top, button, clickCount, modifiers);
|
||||
utils.sendMouseEvent("mouseup", left, top, button, clickCount, modifiers);
|
||||
}
|
||||
types.forEach(function(type) {
|
||||
utils.sendMouseEvent(type, left, top, button, clickCount, modifiers, false, pressure, inputSource);
|
||||
});
|
||||
}
|
||||
}
|
||||
function synthesizeTouchAtPoint(left, top, aEvent, aWindow)
|
||||
|
Loading…
Reference in New Issue
Block a user