 +  return res;
 +}
 +
- nsresult
++nsresult
  EditorBase::SplitNodeImpl(nsIContent& aExistingRightNode,
                            int32_t aOffset,
-@@ -3870,6 +3958,11 @@ EditorBase::SplitNodeDeep(nsIContent& aNode,
+                           nsIContent& aNewLeftNode)
+ {
+   // Remember all selection points.
+   AutoTArray<SavedRange, 10> savedRanges;
+   for (size_t i = 0; i < kPresentSelectionTypeCount; ++i) {
+     SelectionType selectionType(ToSelectionType(1 << i));
+@@ -3865,16 +3953,21 @@ EditorBase::SplitNodeDeep(nsIContent& aN
+     if ((aEmptyContainers == EmptyContainers::yes &&
+          !nodeToSplit->GetAsText()) ||
+         (offset && offset != (int32_t)nodeToSplit->Length())) {
+       didSplit = true;
+       ErrorResult rv;
        nsCOMPtr<nsIContent> newLeftNode = SplitNode(nodeToSplit, offset, rv);
        NS_ENSURE_TRUE(!NS_FAILED(rv.StealNSResult()), -1);
  

   /**
    * This helper method returns true if aValue is a valid email address list.
    * Email address list is a list of email address separated by comas (,) which
diff --git a/dom/interfaces/core/nsIDOMDocument.idl b/dom/interfaces/core/nsIDOMDocument.idl
index efa4c851ca5e..08f7908cdc1f 100644
--- a/dom/interfaces/core/nsIDOMDocument.idl
+++ b/dom/interfaces/core/nsIDOMDocument.idl
@@ -33,7 +33,7 @@ interface nsIDOMLocation;
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
  */
 

   let globalCommandSet = document.getElementById("globalCommandSet");
   globalCommandSet.addEventListener("command", function(event) {
     gViewController.doCommand(event.target.id);
   });
 
   let viewCommandSet = document.getElementById("viewCommandSet");
   viewCommandSet.addEventListener("commandupdate", function(event) {
     gViewController.updateCommands();
@@ -2993,17 +3005,17 @@ var gListView = {
     this._listBox.insertBefore(item, this._listBox.firstChild);
     this.showEmptyNotice(false);
   },
 
   removeItem(aObj, aIsInstall) {
     let prop = aIsInstall ? "mInstall" : "mAddon";
 
     for (let item of this._listBox.childNodes) {
