Web Inspector: Rename domAgent to domTreeManager in DOMNode
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2016 22:44:22 +0000 (22:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2016 22:44:22 +0000 (22:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154194

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-02-12
Reviewed by Timothy Hatcher.

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196517 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/DOMNode.js

index 8b1435e..3545c9d 100644 (file)
@@ -1,5 +1,15 @@
 2016-02-12  Joseph Pecoraro  <pecoraro@apple.com>
 
+        Web Inspector: Rename domAgent to domTreeManager in DOMNode
+        https://bugs.webkit.org/show_bug.cgi?id=154194
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Models/DOMNode.js:
+        (WebInspector.DOMNode):
+
+2016-02-12  Joseph Pecoraro  <pecoraro@apple.com>
+
         Web Inspector: Avoid including ESLint until it is used
         https://bugs.webkit.org/show_bug.cgi?id=154196
 
index 0311e7a..0b2e470 100644 (file)
 
 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 @@ WebInspector.DOMNode = class DOMNode extends WebInspector.Object
         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 @@ WebInspector.DOMNode = class DOMNode extends WebInspector.Object
         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 @@ WebInspector.DOMNode = class DOMNode extends WebInspector.Object
 
     _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 @@ WebInspector.DOMNode = class DOMNode extends WebInspector.Object
 
         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();