author | Fabrice Desré <fabrice@mozilla.com> |
Sun, 26 Oct 2014 13:32:26 -0700 | |
changeset 212385 | 50c2a228bebe34b992b11804731c3d86781e225d |
parent 212384 | 8230834302c9223f59635a13e363f956876add3c |
child 212386 | 129bd767cbfa82510adcc35947c3f1bb6d2c69cc |
push id | 27709 |
push user | cbook@mozilla.com |
push date | Mon, 27 Oct 2014 14:49:26 +0000 |
treeherder | mozilla-central@cf1a9a16429b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bholley |
bugs | 1088800 |
milestone | 36.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/toolkit/devtools/touch-events.js +++ b/toolkit/devtools/touch-events.js @@ -189,22 +189,26 @@ function TouchEventHandler (window) { this.touchstartTime = Date.now(); } else if (name == "touchend") { // If we have a 'fast' tap, don't send a click as both will be turned // into a click and that breaks eg. checkboxes. if (Date.now() - this.touchstartTime < delay) { this.cancelClick = true; } } + function clone(obj) { + return Cu.cloneInto(obj, target); + } let unwraped = XPCNativeWrapper.unwrap(target); - unwraped.sendTouchEvent(name, [0], // event type, id - [evt.clientX], [evt.clientY], // x, y - [1], [1], // rx, ry - [0], [0], // rotation, force - 1); // count + unwraped.sendTouchEvent(name, clone([0]), // event type, id + clone([evt.clientX]), // x + clone([evt.clientY]), // y + clone([1]), clone([1]), // rx, ry + clone([0]), clone([0]), // rotation, force + 1); // count return; } let document = target.ownerDocument; let content = this.getContent(target); let touchEvent = document.createEvent('touchevent'); let point = document.createTouch(content, target, 0, evt.pageX, evt.pageY,