Bug 1159938 - Remove dead nodeChanged() function;r=pbrosset
authorBrian Grinstead <bgrinstead@mozilla.com>
Mon, 11 May 2015 07:47:24 -0700
changeset 243295 7278397ba6dc99a35470f9792d60241098488162
parent 243294 9fff6229aa8e4de92f20f676aa2462bfc60c66dc
child 243296 042b75f2ebd22f2b573a0fe09eb8536f5f17bcbd
push id28736
push usercbook@mozilla.com
push dateTue, 12 May 2015 10:01:42 +0000
treeherdermozilla-central@0ca37b3cb73d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbrosset
bugs1159938
milestone40.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 1159938 - Remove dead nodeChanged() function;r=pbrosset
browser/devtools/markupview/markup-view.js
--- a/browser/devtools/markupview/markup-view.js
+++ b/browser/devtools/markupview/markup-view.js
@@ -495,19 +495,19 @@ MarkupView.prototype = {
 
     switch(aEvent.keyCode) {
       case Ci.nsIDOMKeyEvent.DOM_VK_H:
         if (aEvent.metaKey || aEvent.shiftKey) {
           handled = false;
         } else {
           let node = this._selectedContainer.node;
           if (node.hidden) {
-            this.walker.unhideNode(node).then(() => this.nodeChanged(node));
+            this.walker.unhideNode(node);
           } else {
-            this.walker.hideNode(node).then(() => this.nodeChanged(node));
+            this.walker.hideNode(node);
           }
         }
         break;
       case Ci.nsIDOMKeyEvent.DOM_VK_DELETE:
         this.deleteNode(this._selectedContainer.node);
         break;
       case Ci.nsIDOMKeyEvent.DOM_VK_BACK_SPACE:
         this.deleteNode(this._selectedContainer.node, true);
@@ -1201,25 +1201,16 @@ MarkupView.prototype = {
   unmarkSelectedNode: function() {
     if (this._selectedContainer) {
       this._selectedContainer.selected = false;
       this._selectedContainer = null;
     }
   },
 
   /**
-   * Called when the markup panel initiates a change on a node.
-   */
-  nodeChanged: function(aNode) {
-    if (aNode === this._inspector.selection.nodeFront) {
-      this._inspector.change("markupview");
-    }
-  },
-
-  /**
    * Check if the current selection is a descendent of the container.
    * if so, make sure it's among the visible set for the container,
    * and set the dirty flag if needed.
    * @returns The node that should be made visible, if any.
    */
   _checkSelectionVisible: function(aContainer) {
     let centered = null;
     let node = this._inspector.selection.nodeFront;
@@ -2268,23 +2259,19 @@ function TextEditor(aContainer, aNode, a
       if (!aCommit) {
         return;
       }
       this.node.getNodeValue().then(longstr => {
         longstr.string().then(oldValue => {
           longstr.release().then(null, console.error);
 
           this.container.undo.do(() => {
-            this.node.setNodeValue(aVal).then(() => {
-              this.markup.nodeChanged(this.node);
-            });
+            this.node.setNodeValue(aVal);
           }, () => {
-            this.node.setNodeValue(oldValue).then(() => {
-              this.markup.nodeChanged(this.node);
-            });
+            this.node.setNodeValue(oldValue);
           });
         });
       });
     }
   });
 
   this.update();
 }