Bug 1463985 - part 22: Rename EditSubAction::insertQuotation to EditSubAction::eInsertQuotation r?m_kato
According to this usage, perhaps, we can remove this from EditSubAction and
this should be moved to new EditAction.
MozReview-Commit-ID: HzfcC051rNB
--- a/editor/libeditor/EditAction.h
+++ b/editor/libeditor/EditAction.h
@@ -91,17 +91,18 @@ enum class EditSubAction : int32_t
// eCreateOrChangeDefinitionList indicates to create new definition list or
// change existing list to a definition list.
eCreateOrChangeDefinitionList,
// eInsertElement indicates to insert an element.
eInsertElement,
- insertQuotation,
+ // eInsertQuotation indicates to insert an element and make it "quoted text".
+ eInsertQuotation,
htmlPaste = 3012,
loadHTML,
resetTextProperties,
setAbsolutePosition,
removeAbsolutePosition,
decreaseZIndex,
increaseZIndex,
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -89,17 +89,17 @@ IsStyleCachePreservingSubAction(EditSubA
aEditSubAction == EditSubAction::eCreateOrChangeList ||
aEditSubAction == EditSubAction::eIndent ||
aEditSubAction == EditSubAction::eOutdent ||
aEditSubAction == EditSubAction::eSetOrClearAlignment ||
aEditSubAction == EditSubAction::eCreateOrRemoveBlock ||
aEditSubAction == EditSubAction::eRemoveList ||
aEditSubAction == EditSubAction::eCreateOrChangeDefinitionList ||
aEditSubAction == EditSubAction::eInsertElement ||
- aEditSubAction == EditSubAction::insertQuotation;
+ aEditSubAction == EditSubAction::eInsertQuotation;
}
static nsAtom&
ParagraphSeparatorElement(ParagraphSeparator separator)
{
switch (separator) {
default:
MOZ_FALLTHROUGH_ASSERT("Unexpected paragraph separator!");
--- a/editor/libeditor/HTMLEditorDataTransfer.cpp
+++ b/editor/libeditor/HTMLEditorDataTransfer.cpp
@@ -1585,17 +1585,17 @@ HTMLEditor::PasteAsQuotation(int32_t aSe
}
NS_IMETHODIMP
HTMLEditor::PasteAsCitedQuotation(const nsAString& aCitation,
int32_t aSelectionType)
{
AutoPlaceholderBatch beginBatching(this);
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
- *this, EditSubAction::insertQuotation,
+ *this, EditSubAction::eInsertQuotation,
nsIEditor::eNext);
// get selection
RefPtr<Selection> selection = GetSelection();
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
// give rules a chance to handle or cancel
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
@@ -1795,17 +1795,17 @@ HTMLEditor::InsertAsPlaintextQuotation(c
nsINode** aNodeInserted)
{
// get selection
RefPtr<Selection> selection = GetSelection();
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
AutoPlaceholderBatch beginBatching(this);
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
- *this, EditSubAction::insertQuotation,
+ *this, EditSubAction::eInsertQuotation,
nsIEditor::eNext);
// give rules a chance to handle or cancel
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
bool cancel, handled;
// Protect the edit rules object from dying
RefPtr<TextEditRules> rules(mRules);
nsresult rv =
@@ -1902,17 +1902,17 @@ HTMLEditor::InsertAsCitedQuotation(const
}
// get selection
RefPtr<Selection> selection = GetSelection();
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
AutoPlaceholderBatch beginBatching(this);
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
- *this, EditSubAction::insertQuotation,
+ *this, EditSubAction::eInsertQuotation,
nsIEditor::eNext);
// give rules a chance to handle or cancel
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
bool cancel, handled;
// Protect the edit rules object from dying
RefPtr<TextEditRules> rules(mRules);
nsresult rv =