Bug 1387678 - Call elementsFromPoint on the correct document node; r?ato
elementsFromPoint will return the top level element of a shadow DOM
and not the elements within. If we are on the top level document we
need to make sure to use the correct rootNode.
MozReview-Commit-ID: ATvCidAFEeM
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -1201,17 +1201,17 @@ element.getPointerInteractablePaintTree
if (rects.length == 0) {
return [];
}
// step 4
let centre = element.getInViewCentrePoint(rects[0], win);
// step 5
- return doc.elementsFromPoint(centre.x, centre.y);
+ return rootNode.elementsFromPoint(centre.x, centre.y);
};
// TODO(ato): Not implemented.
// In fact, it's not defined in the spec.
element.isKeyboardInteractable = () => true;
/**
* Attempts to scroll into view |el|.