Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js (196516 => 196517)
--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js 2016-02-12 22:37:50 UTC (rev 196516)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js 2016-02-12 22:44:22 UTC (rev 196517)
@@ -32,15 +32,15 @@
WebInspector.DOMNode = class DOMNode extends WebInspector.Object
{
- constructor(domAgent, doc, isInShadowTree, payload)
+ constructor(domTreeManager, doc, isInShadowTree, payload)
{
super();
- this._domAgent = domAgent;
+ this._domTreeManager = domTreeManager;
this._isInShadowTree = isInShadowTree;
this.id = payload.nodeId;
- domAgent._idToDOMNode[this.id] = this;
+ this._domTreeManager._idToDOMNode[this.id] = this;
this._nodeType = payload.nodeType;
this._nodeName = payload.nodeName;
@@ -74,13 +74,13 @@
if (payload.shadowRoots) {
for (var i = 0; i < payload.shadowRoots.length; ++i) {
var root = payload.shadowRoots[i];
- var node = new WebInspector.DOMNode(this._domAgent, this.ownerDocument, true, root);
+ var node = new WebInspector.DOMNode(this._domTreeManager, this.ownerDocument, true, root);
this._shadowRoots.push(node);
}
}
if (payload.templateContent) {
- this._templateContent = new WebInspector.DOMNode(this._domAgent, this.ownerDocument, true, payload.templateContent);
+ this._templateContent = new WebInspector.DOMNode(this._domTreeManager, this.ownerDocument, true, payload.templateContent);
this._templateContent.parentNode = this;
}
@@ -90,14 +90,14 @@
this._pseudoElements = new Map;
if (payload.pseudoElements) {
for (var i = 0; i < payload.pseudoElements.length; ++i) {
- var node = new WebInspector.DOMNode(this._domAgent, this.ownerDocument, this._isInShadowTree, payload.pseudoElements[i]);
+ var node = new WebInspector.DOMNode(this._domTreeManager, this.ownerDocument, this._isInShadowTree, payload.pseudoElements[i]);
node.parentNode = this;
this._pseudoElements.set(node.pseudoType(), node);
}
}
if (payload.contentDocument) {
- this._contentDocument = new WebInspector.DOMNode(domAgent, null, false, payload.contentDocument);
+ this._contentDocument = new WebInspector.DOMNode(this._domTreeManager, null, false, payload.contentDocument);
this._children = [this._contentDocument];
this._renumber();
}
@@ -526,7 +526,7 @@
_insertChild(prev, payload)
{
- var node = new WebInspector.DOMNode(this._domAgent, this.ownerDocument, this._isInShadowTree, payload);
+ var node = new WebInspector.DOMNode(this._domTreeManager, this.ownerDocument, this._isInShadowTree, payload);
if (!prev) {
if (!this._children) {
// First node
@@ -560,7 +560,7 @@
this._children = this._shadowRoots.slice();
for (var i = 0; i < payloads.length; ++i) {
- var node = new WebInspector.DOMNode(this._domAgent, this.ownerDocument, this._isInShadowTree, payloads[i]);
+ var node = new WebInspector.DOMNode(this._domTreeManager, this.ownerDocument, this._isInShadowTree, payloads[i]);
this._children.push(node);
}
this._renumber();