Bug 1463985 - part 24: Rename EditSubAction::resetTextProperties to EditSubAction::eRemoveAllTextProperties r?m_kato draft
authorMasayuki Nakano <masayuki@d-toybox.com>
Mon, 28 May 2018 23:40:45 +0900
changeset 801994 62994f52d644943e07d7688853b2c03a8c6e8eac
parent 801993 304048d0d609a382d7ed2e7fe2434909612e93ac
child 801995 fd16924845e11b4ba2d60413474dd36ca64e5be3
push id111796
push usermasayuki@d-toybox.com
push dateThu, 31 May 2018 06:40:56 +0000
reviewersm_kato
bugs1463985
milestone62.0a1
Bug 1463985 - part 24: Rename EditSubAction::resetTextProperties to EditSubAction::eRemoveAllTextProperties r?m_kato MozReview-Commit-ID: 1QKUg361MSY
editor/libeditor/EditAction.h
editor/libeditor/HTMLStyleEditor.cpp
--- a/editor/libeditor/EditAction.h
+++ b/editor/libeditor/EditAction.h
@@ -53,16 +53,19 @@ enum class EditSubAction : int32_t
   eDeleteSelectedContent,
 
   // eSetTextProperty indicates to set a style from text.
   eSetTextProperty,
 
   // eRemoveTextProperty indicates to remove a style from text.
   eRemoveTextProperty,
 
+  // eRemoveAllTextProperties indicate to remove all styles from text.
+  eRemoveAllTextProperties,
+
   // eComputeTextToOutput indicates to compute the editor value as plain text
   // or something requested format.
   eComputeTextToOutput,
 
   // eSetText indicates to set editor value to new value.
   eSetText,
 
   // eInsertParagraphSeparator indicates to insert paragraph separator, <br> or
@@ -101,17 +104,16 @@ enum class EditSubAction : int32_t
 
   // ePasteHTMLContent indicates to paste HTML content in clipboard.
   ePasteHTMLContent,
 
   // eInsertHTMLSource indicates to create a document fragment from given HTML
   // source and insert into the DOM tree.  So, this is similar to innerHTML.
   eInsertHTMLSource,
 
-  resetTextProperties,
   setAbsolutePosition,
   removeAbsolutePosition,
   decreaseZIndex,
   increaseZIndex,
 };
 
 } // namespace mozilla
 
--- a/editor/libeditor/HTMLStyleEditor.cpp
+++ b/editor/libeditor/HTMLStyleEditor.cpp
@@ -1189,17 +1189,18 @@ HTMLEditor::GetInlinePropertyWithAttrVal
   return GetInlinePropertyBase(*aProperty, aAttribute, val, aFirst, aAny, aAll, &outValue);
 }
 
 NS_IMETHODIMP
 HTMLEditor::RemoveAllInlineProperties()
 {
   AutoPlaceholderBatch batchIt(this);
   AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
-                                      *this, EditSubAction::resetTextProperties,
+                                      *this,
+                                      EditSubAction::eRemoveAllTextProperties,
                                       nsIEditor::eNext);
 
   nsresult rv = RemoveInlineProperty(nullptr, nullptr);
   NS_ENSURE_SUCCESS(rv, rv);
   return NS_OK;
 }
 
 NS_IMETHODIMP