Skip to content

Commit

Permalink
Backed out changeset 6dc619f7460d (bug 1393831) as requested per comm…
Browse files Browse the repository at this point in the history
…ent #20. r=backout a=backout
  • Loading branch information
ncsoregi committed Jan 10, 2018
1 parent ec8daa8 commit 6996815
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testing/marionette/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ function dispatchPointerMove(a, inputState, tickDuration, window) {
const start = Date.now();
const [startX, startY] = [inputState.x, inputState.y];

let coords = getElementCenter(a.origin, window);
let coords = getElementCenter(a.origin);
let target = action.computePointerDestination(a, inputState, coords);
const [targetX, targetY] = [target.x, target.y];

Expand Down Expand Up @@ -1421,9 +1421,9 @@ function inViewPort(x, y, win) {
return !(x < 0 || y < 0 || x > win.innerWidth || y > win.innerHeight);
}

function getElementCenter(el, window) {
function getElementCenter(el) {
if (element.isDOMElement(el)) {
return element.getInViewCentrePoint(el.getClientRects()[0], window);
return element.coordinates(el);
}
return {};
}

0 comments on commit 6996815

Please sign in to comment.