Bug 785528 - Don't allow deletion of doctype nodes in the markup panel, fix test failures. r=jwalker
authorDave Camp <dcamp@mozilla.com>
Fri, 24 Aug 2012 20:37:05 -0700
changeset 105430 5fa145ef906a778d1a1729ecbaa40884926c5ff5
parent 105429 4c3e82b3dcaf9afbac95ef95fff6b17b7fa70110
child 105431 76b7f323b8f37b739c1bd5cb3bcc8f476635a958
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersjwalker
bugs785528
milestone17.0a1
Bug 785528 - Don't allow deletion of doctype nodes in the markup panel, fix test failures. r=jwalker
browser/devtools/markupview/MarkupView.jsm
--- a/browser/devtools/markupview/MarkupView.jsm
+++ b/browser/devtools/markupview/MarkupView.jsm
@@ -195,20 +195,20 @@ MarkupView.prototype = {
   },
 
   /**
    * Delete a node from the DOM.
    * This is an undoable action.
    */
   deleteNode: function MC__deleteNode(aNode)
   {
-    let doc = nodeDocument(node);
-    if (node === doc ||
-        node === doc.documentElement ||
-        node.nodeType == Ci.nsIDOMNode.DOCUMENT_TYPE_NODE) {
+    let doc = nodeDocument(aNode);
+    if (aNode === doc ||
+        aNode === doc.documentElement ||
+        aNode.nodeType == Ci.nsIDOMNode.DOCUMENT_TYPE_NODE) {
       return;
     }
 
     let parentNode = aNode.parentNode;
     let sibling = aNode.nextSibling;
 
     this.undo.do(function() {
       parentNode.removeChild(aNode);