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 332000 22d82e970d2ad09e8b8f73deef2a258c8b4b42f6
parent 331999 8bc1d52fcf71015e32838b9c933971807069f3b1
child 332001 a25dfd7fbf80d0352bb1c3a3d279fe3ee4be0cf4
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)
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);