Bug 669178 - Remove InspectorUI.embeddedBrowserParents since it leaks content windows and is generally broken. r=robcee/gavin

This commit is contained in:
Dão Gottwald 2011-07-05 16:54:46 +02:00
Родитель e4876f1b7c
Коммит 2a88cbeece
1 изменённых файлов: 6 добавлений и 18 удалений

Просмотреть файл

@ -701,14 +701,10 @@ var InspectorUI = {
if (parentNode.defaultView) {
return parentNode.defaultView.frameElement;
}
if (this.embeddedBrowserParents) {
let skipParent = this.embeddedBrowserParents[node];
// HTML element? could be iframe?
if (skipParent)
return skipParent;
} else // parent is document element, but no window at defaultView.
return null;
} else if (!parentNode.localName) {
// parent is document element, but no window at defaultView.
return null;
}
if (!parentNode.localName) {
return null;
}
return parentNode;
@ -722,11 +718,7 @@ var InspectorUI = {
if (node.contentDocument) {
// then the node is a frame
if (index == 0) {
if (!this.embeddedBrowserParents)
this.embeddedBrowserParents = {};
let skipChild = node.contentDocument.documentElement;
this.embeddedBrowserParents[skipChild] = node;
return skipChild; // the node's HTMLElement
return node.contentDocument.documentElement; // the node's HTMLElement
}
return null;
}
@ -736,11 +728,7 @@ var InspectorUI = {
if (svgDocument) {
// then the node is a frame
if (index == 0) {
if (!this.embeddedBrowserParents)
this.embeddedBrowserParents = {};
let skipChild = svgDocument.documentElement;
this.embeddedBrowserParents[skipChild] = node;
return skipChild; // the node's SVGElement
return svgDocument.documentElement; // the node's SVGElement
}
return null;
}