diff --git a/editor/libeditor/EditAction.h b/editor/libeditor/EditAction.h index e36412462979..b11db60e9aa5 100644 --- a/editor/libeditor/EditAction.h +++ b/editor/libeditor/EditAction.h @@ -86,7 +86,9 @@ enum class EditSubAction : int32_t // move its descendants to where the block was. eCreateOrRemoveBlock, - removeList, + // eRemoveList removes specific type of list but keep its content. + eRemoveList, + makeDefListItem, insertElement, insertQuotation, diff --git a/editor/libeditor/HTMLEditRules.cpp b/editor/libeditor/HTMLEditRules.cpp index 05054c354613..1cf37221ae97 100644 --- a/editor/libeditor/HTMLEditRules.cpp +++ b/editor/libeditor/HTMLEditRules.cpp @@ -91,7 +91,7 @@ IsStyleCachePreservingSubAction(EditSubAction aEditSubAction) aEditSubAction == EditSubAction::eOutdent || aEditSubAction == EditSubAction::eSetOrClearAlignment || aEditSubAction == EditSubAction::eCreateOrRemoveBlock || - aEditSubAction == EditSubAction::removeList || + aEditSubAction == EditSubAction::eRemoveList || aEditSubAction == EditSubAction::makeDefListItem || aEditSubAction == EditSubAction::insertElement || aEditSubAction == EditSubAction::insertQuotation; @@ -710,7 +710,7 @@ HTMLEditRules::WillDoAction(Selection* aSelection, return WillAlign(*aInfo.alignType, aCancel, aHandled); case EditSubAction::eCreateOrRemoveBlock: return WillMakeBasicBlock(*aInfo.blockType, aCancel, aHandled); - case EditSubAction::removeList: { + case EditSubAction::eRemoveList: { nsresult rv = WillRemoveList(aCancel, aHandled); if (NS_WARN_IF(rv == NS_ERROR_EDITOR_DESTROYED) || NS_WARN_IF(!CanHandleEditAction())) { diff --git a/editor/libeditor/HTMLEditor.cpp b/editor/libeditor/HTMLEditor.cpp index a663c8ffcdee..e2b64700c818 100644 --- a/editor/libeditor/HTMLEditor.cpp +++ b/editor/libeditor/HTMLEditor.cpp @@ -2117,14 +2117,14 @@ HTMLEditor::RemoveList(const nsAString& aListType) AutoPlaceholderBatch beginBatching(this); AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction( - *this, EditSubAction::removeList, + *this, EditSubAction::eRemoveList, nsIEditor::eNext); // pre-process RefPtr selection = GetSelection(); NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER); - EditSubActionInfo subActionInfo(EditSubAction::removeList); + EditSubActionInfo subActionInfo(EditSubAction::eRemoveList); if (aListType.LowerCaseEqualsLiteral("ol")) { subActionInfo.bOrdered = true; } else { diff --git a/editor/libeditor/TextEditRules.h b/editor/libeditor/TextEditRules.h index 6c5a27eed358..a9f028d5d272 100644 --- a/editor/libeditor/TextEditRules.h +++ b/editor/libeditor/TextEditRules.h @@ -548,7 +548,7 @@ public: nsIEditor::EDirection collapsedAction; nsIEditor::EStripWrappers stripWrappers; - // EditSubAction::removeList + // EditSubAction::eRemoveList bool bOrdered; // EditSubAction::eCreateOrChangeList