Bug 1264555 - Remove unused node parameter in canAddHTMLChild; r=jdescottes
authorPatrick Brosset <pbrosset@mozilla.com>
Thu, 14 Apr 2016 11:03:59 +0200
changeset 331309 529cff9c5663a3581dfb5e690727144f07e8e23c
parent 331308 d0c2f09a6285ad7a9f25fcb704de38c9c5168369
child 331310 b7772a6288f8b1011e1dfc8629ced4f401e47c9c
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1264555
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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.