Bug 1264555 - Remove unused node parameter in canAddHTMLChild; r=jdescottes
authorPatrick Brosset <pbrosset@mozilla.com>
Thu, 14 Apr 2016 11:03:59 +0200
changeset 293228 529cff9c5663a3581dfb5e690727144f07e8e23c
parent 293227 d0c2f09a6285ad7a9f25fcb704de38c9c5168369
child 293229 b7772a6288f8b1011e1dfc8629ced4f401e47c9c
push id18743
push userpbrosset@mozilla.com
push dateFri, 15 Apr 2016 08:48:35 +0000
treeherderfx-team@529cff9c5663 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1264555
milestone48.0a1
Bug 1264555 - Remove unused node parameter in canAddHTMLChild; r=jdescottes MozReview-Commit-ID: 29I9fYJu5td
devtools/client/inspector/inspector-panel.js
--- a/devtools/client/inspector/inspector-panel.js
+++ b/devtools/client/inspector/inspector-panel.js
@@ -1047,27 +1047,27 @@ InspectorPanel.prototype = {
       button.setAttribute("tooltiptext", strings.GetStringFromName("inspector.collapsePane"));
     }
   },
 
   /**
    * Create a new node as the last child of the current selection, expand the
    * parent and select the new node.
    */
-  addNode: Task.async(function*() {
-    let root = this.selection.nodeFront;
-    if (!this.canAddHTMLChild(root)) {
+  addNode: Task.async(function* () {
+    if (!this.canAddHTMLChild()) {
       return;
     }
 
     let html = "<div></div>";
 
     // Insert the html and expect a childList markup mutation.
     let onMutations = this.once("markupmutation");
-    let {nodes} = yield this.walker.insertAdjacentHTML(root, "beforeEnd", html);
+    let {nodes} = yield this.walker.insertAdjacentHTML(this.selection.nodeFront,
+                                                       "beforeEnd", html);
     yield onMutations;
 
     // Select the new node (this will auto-expand its parent).
     this.selection.setNodeFront(nodes[0]);
   }),
 
   /**
    * Toggle a pseudo class.