зеркало из https://github.com/mozilla/pjs.git
Bug 669178 - Remove InspectorUI.embeddedBrowserParents since it leaks content windows and is generally broken. r=robcee/gavin
This commit is contained in:
Родитель
e75ddf6edc
Коммит
e8646917d7
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче