зеркало из https://github.com/mozilla/gecko-dev.git
Bug 834266 - Use isEqualNode instead of == for comparing frames, r=mdas, a=test-only
This commit is contained in:
Родитель
9d0ed01df9
Коммит
c1343b02c7
|
@ -98,7 +98,7 @@ ElementManager.prototype = {
|
||||||
throw new ElementException("Element has not been seen before", 17, null);
|
throw new ElementException("Element has not been seen before", 17, null);
|
||||||
}
|
}
|
||||||
el = el;
|
el = el;
|
||||||
if (!(el.ownerDocument == win.document)) {
|
if (!(el.ownerDocument.isEqualNode(win.document))) {
|
||||||
throw new ElementException("Stale element reference", 10, null);
|
throw new ElementException("Stale element reference", 10, null);
|
||||||
}
|
}
|
||||||
return el;
|
return el;
|
||||||
|
|
|
@ -1369,7 +1369,7 @@ function switchToFrame(msg) {
|
||||||
if (elementManager.seenItems[msg.json.element] != undefined) {
|
if (elementManager.seenItems[msg.json.element] != undefined) {
|
||||||
let wantedFrame = elementManager.getKnownElement(msg.json.element, curWindow); //HTMLIFrameElement
|
let wantedFrame = elementManager.getKnownElement(msg.json.element, curWindow); //HTMLIFrameElement
|
||||||
for (let i = 0; i < frames.length; i++) {
|
for (let i = 0; i < frames.length; i++) {
|
||||||
if (frames[i] == wantedFrame) {
|
if (frames[i].isEqualNode(wantedFrame)) {
|
||||||
curWindow = frames[i];
|
curWindow = frames[i];
|
||||||
foundFrame = i;
|
foundFrame = i;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче