Bug 1190172 - Back out for now, requested by Masayuki at bug 1191356 comment 23
authorAryeh Gregor <ayg@aryeh.name>
Wed, 20 Apr 2016 20:44:04 +0300
changeset 294055 22d82e970d2ad09e8b8f73deef2a258c8b4b42f6
parent 294054 8bc1d52fcf71015e32838b9c933971807069f3b1
child 294056 a25dfd7fbf80d0352bb1c3a3d279fe3ee4be0cf4
push id75422
push userayg@aryeh.name
push dateWed, 20 Apr 2016 17:45:08 +0000
treeherdermozilla-inbound@aa95332a325b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1190172, 1191356
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 1190172 - Back out for now, requested by Masayuki at bug 1191356 comment 23
editor/libeditor/nsHTMLEditRules.cpp
--- a/editor/libeditor/nsHTMLEditRules.cpp
+++ b/editor/libeditor/nsHTMLEditRules.cpp
@@ -4578,17 +4578,18 @@ nsHTMLEditRules::WillAlign(Selection& aS
 
       emptyDiv = !nsHTMLEditUtils::IsTableElement(parent) ||
                  nsHTMLEditUtils::IsTableCellOrCaption(parent);
     }
   }
   if (emptyDiv) {
     NS_ENSURE_STATE(aSelection.GetRangeAt(0) &&
                     aSelection.GetRangeAt(0)->GetStartParent());
-    nsCOMPtr<nsINode> parent = aSelection.GetRangeAt(0)->GetStartParent();
+    OwningNonNull<nsINode> parent =
+      *aSelection.GetRangeAt(0)->GetStartParent();
     int32_t offset = aSelection.GetRangeAt(0)->StartOffset();
 
     rv = SplitAsNeeded(*nsGkAtoms::div, parent, offset);
     NS_ENSURE_SUCCESS(rv, rv);
     // Consume a trailing br, if any.  This is to keep an alignment from
     // creating extra lines, if possible.
     nsCOMPtr<nsIContent> brContent =
       mHTMLEditor->GetNextHTMLNode(parent, offset);