mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 11:38:16 +00:00
Bug 1253236 - Remove window argument from element.isVisible; r=automatedtester
MozReview-Commit-ID: ITzY9RXjJCG --HG-- extra : rebase_source : 7954e5d2891a8d214fdbf00ea1b0b62acc0482b3
This commit is contained in:
parent
4a0bcbbee4
commit
a1495c253c
@ -815,7 +815,9 @@ element.inViewport = function(el, x = undefined, y = undefined) {
|
||||
* Vertical offset relative to target. Defaults to the centre of
|
||||
* the target's bounding box.
|
||||
*/
|
||||
element.isVisible = function(el, win, x = undefined, y = undefined) {
|
||||
element.isVisible = function(el, x = undefined, y = undefined) {
|
||||
let win = el.ownerDocument.defaultView;
|
||||
|
||||
// Bug 1094246: Webdriver's isShown doesn't work with content xul
|
||||
let ns = atom.getElementAttribute(el, "namespaceURI", win);
|
||||
if (ns.indexOf("there.is.only.xul") < 0 &&
|
||||
|
@ -933,7 +933,7 @@ function focusElement(element) {
|
||||
event.sendKeysToElement = function(
|
||||
keySequence, el, opts = {}, window = undefined) {
|
||||
|
||||
if (opts.ignoreVisibility || element.isVisible(el, window)) {
|
||||
if (opts.ignoreVisibility || element.isVisible(el)) {
|
||||
focusElement(el);
|
||||
|
||||
// make Object.<modifier, false> map
|
||||
|
@ -96,7 +96,7 @@ Interactions.prototype = {
|
||||
*/
|
||||
clickElement(container, elementManager, id) {
|
||||
let el = elementManager.getKnownElement(id, container);
|
||||
let visible = element.isVisible(el, container.frame);
|
||||
let visible = element.isVisible(el);
|
||||
if (!visible) {
|
||||
throw new ElementNotVisibleError('Element is not visible');
|
||||
}
|
||||
|
@ -874,7 +874,7 @@ function coordinates(target, x, y) {
|
||||
function singleTap(id, corx, cory) {
|
||||
let el = elementManager.getKnownElement(id, curContainer);
|
||||
// after this block, the element will be scrolled into view
|
||||
let visible = element.isVisible(el, curContainer.frame, corx, cory);
|
||||
let visible = element.isVisible(el, corx, cory);
|
||||
if (!visible) {
|
||||
throw new ElementNotVisibleError("Element is not currently visible and may not be manipulated");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user