зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1463985 - part 21: Rename EditSubAction::insertElement to EditSubAction::eInsertElement r=m_kato
MozReview-Commit-ID: 6nrm1zJ968f --HG-- extra : rebase_source : 633824e9564dddd9d9b80414ab07e7aa960b8fb1
This commit is contained in:
Родитель
1affc933f7
Коммит
84aca99c88
|
@ -93,7 +93,9 @@ enum class EditSubAction : int32_t
|
||||||
// change existing list to a definition list.
|
// change existing list to a definition list.
|
||||||
eCreateOrChangeDefinitionList,
|
eCreateOrChangeDefinitionList,
|
||||||
|
|
||||||
insertElement,
|
// eInsertElement indicates to insert an element.
|
||||||
|
eInsertElement,
|
||||||
|
|
||||||
insertQuotation,
|
insertQuotation,
|
||||||
|
|
||||||
htmlPaste = 3012,
|
htmlPaste = 3012,
|
||||||
|
|
|
@ -93,7 +93,7 @@ IsStyleCachePreservingSubAction(EditSubAction aEditSubAction)
|
||||||
aEditSubAction == EditSubAction::eCreateOrRemoveBlock ||
|
aEditSubAction == EditSubAction::eCreateOrRemoveBlock ||
|
||||||
aEditSubAction == EditSubAction::eRemoveList ||
|
aEditSubAction == EditSubAction::eRemoveList ||
|
||||||
aEditSubAction == EditSubAction::eCreateOrChangeDefinitionList ||
|
aEditSubAction == EditSubAction::eCreateOrChangeDefinitionList ||
|
||||||
aEditSubAction == EditSubAction::insertElement ||
|
aEditSubAction == EditSubAction::eInsertElement ||
|
||||||
aEditSubAction == EditSubAction::insertQuotation;
|
aEditSubAction == EditSubAction::insertQuotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -724,7 +724,7 @@ HTMLEditRules::WillDoAction(Selection* aSelection,
|
||||||
case EditSubAction::eCreateOrChangeDefinitionList:
|
case EditSubAction::eCreateOrChangeDefinitionList:
|
||||||
return WillMakeDefListItem(aInfo.blockType,
|
return WillMakeDefListItem(aInfo.blockType,
|
||||||
aInfo.entireList, aCancel, aHandled);
|
aInfo.entireList, aCancel, aHandled);
|
||||||
case EditSubAction::insertElement: {
|
case EditSubAction::eInsertElement: {
|
||||||
nsresult rv = WillInsert(aCancel);
|
nsresult rv = WillInsert(aCancel);
|
||||||
if (NS_WARN_IF(rv == NS_ERROR_EDITOR_DESTROYED)) {
|
if (NS_WARN_IF(rv == NS_ERROR_EDITOR_DESTROYED)) {
|
||||||
return NS_ERROR_EDITOR_DESTROYED;
|
return NS_ERROR_EDITOR_DESTROYED;
|
||||||
|
|
|
@ -1564,7 +1564,7 @@ HTMLEditor::InsertElementAtSelection(Element* aElement,
|
||||||
CommitComposition();
|
CommitComposition();
|
||||||
AutoPlaceholderBatch beginBatching(this);
|
AutoPlaceholderBatch beginBatching(this);
|
||||||
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
||||||
*this, EditSubAction::insertElement,
|
*this, EditSubAction::eInsertElement,
|
||||||
nsIEditor::eNext);
|
nsIEditor::eNext);
|
||||||
|
|
||||||
RefPtr<Selection> selection = GetSelection();
|
RefPtr<Selection> selection = GetSelection();
|
||||||
|
@ -1574,7 +1574,7 @@ HTMLEditor::InsertElementAtSelection(Element* aElement,
|
||||||
|
|
||||||
// hand off to the rules system, see if it has anything to say about this
|
// hand off to the rules system, see if it has anything to say about this
|
||||||
bool cancel, handled;
|
bool cancel, handled;
|
||||||
EditSubActionInfo subActionInfo(EditSubAction::insertElement);
|
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
|
||||||
nsresult rv =
|
nsresult rv =
|
||||||
rules->WillDoAction(selection, subActionInfo, &cancel, &handled);
|
rules->WillDoAction(selection, subActionInfo, &cancel, &handled);
|
||||||
if (cancel || NS_FAILED(rv)) {
|
if (cancel || NS_FAILED(rv)) {
|
||||||
|
@ -4375,7 +4375,7 @@ HTMLEditor::SetCSSBackgroundColorWithTransaction(const nsAString& aColor)
|
||||||
|
|
||||||
AutoPlaceholderBatch batchIt(this);
|
AutoPlaceholderBatch batchIt(this);
|
||||||
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
||||||
*this, EditSubAction::insertElement,
|
*this, EditSubAction::eInsertElement,
|
||||||
nsIEditor::eNext);
|
nsIEditor::eNext);
|
||||||
AutoSelectionRestorer selectionRestorer(selection, this);
|
AutoSelectionRestorer selectionRestorer(selection, this);
|
||||||
AutoTransactionsConserveSelection dontChangeMySelection(this);
|
AutoTransactionsConserveSelection dontChangeMySelection(this);
|
||||||
|
|
|
@ -340,7 +340,7 @@ HTMLEditor::DoInsertHTMLWithContext(const nsAString& aInputString,
|
||||||
}
|
}
|
||||||
|
|
||||||
// give rules a chance to handle or cancel
|
// give rules a chance to handle or cancel
|
||||||
EditSubActionInfo subActionInfo(EditSubAction::insertElement);
|
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
|
||||||
bool cancel, handled;
|
bool cancel, handled;
|
||||||
rv = rules->WillDoAction(selection, subActionInfo, &cancel, &handled);
|
rv = rules->WillDoAction(selection, subActionInfo, &cancel, &handled);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
@ -1598,7 +1598,7 @@ HTMLEditor::PasteAsCitedQuotation(const nsAString& aCitation,
|
||||||
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
|
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
|
||||||
|
|
||||||
// give rules a chance to handle or cancel
|
// give rules a chance to handle or cancel
|
||||||
EditSubActionInfo subActionInfo(EditSubAction::insertElement);
|
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
|
||||||
bool cancel, handled;
|
bool cancel, handled;
|
||||||
// Protect the edit rules object from dying
|
// Protect the edit rules object from dying
|
||||||
RefPtr<TextEditRules> rules(mRules);
|
RefPtr<TextEditRules> rules(mRules);
|
||||||
|
@ -1804,7 +1804,7 @@ HTMLEditor::InsertAsPlaintextQuotation(const nsAString& aQuotedText,
|
||||||
nsIEditor::eNext);
|
nsIEditor::eNext);
|
||||||
|
|
||||||
// give rules a chance to handle or cancel
|
// give rules a chance to handle or cancel
|
||||||
EditSubActionInfo subActionInfo(EditSubAction::insertElement);
|
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
|
||||||
bool cancel, handled;
|
bool cancel, handled;
|
||||||
// Protect the edit rules object from dying
|
// Protect the edit rules object from dying
|
||||||
RefPtr<TextEditRules> rules(mRules);
|
RefPtr<TextEditRules> rules(mRules);
|
||||||
|
@ -1911,7 +1911,7 @@ HTMLEditor::InsertAsCitedQuotation(const nsAString& aQuotedText,
|
||||||
nsIEditor::eNext);
|
nsIEditor::eNext);
|
||||||
|
|
||||||
// give rules a chance to handle or cancel
|
// give rules a chance to handle or cancel
|
||||||
EditSubActionInfo subActionInfo(EditSubAction::insertElement);
|
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
|
||||||
bool cancel, handled;
|
bool cancel, handled;
|
||||||
// Protect the edit rules object from dying
|
// Protect the edit rules object from dying
|
||||||
RefPtr<TextEditRules> rules(mRules);
|
RefPtr<TextEditRules> rules(mRules);
|
||||||
|
|
|
@ -86,7 +86,7 @@ HTMLEditor::SetInlineProperty(nsAtom* aProperty,
|
||||||
|
|
||||||
AutoPlaceholderBatch batchIt(this);
|
AutoPlaceholderBatch batchIt(this);
|
||||||
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
||||||
*this, EditSubAction::insertElement,
|
*this, EditSubAction::eInsertElement,
|
||||||
nsIEditor::eNext);
|
nsIEditor::eNext);
|
||||||
AutoSelectionRestorer selectionRestorer(selection, this);
|
AutoSelectionRestorer selectionRestorer(selection, this);
|
||||||
AutoTransactionsConserveSelection dontChangeMySelection(this);
|
AutoTransactionsConserveSelection dontChangeMySelection(this);
|
||||||
|
|
|
@ -353,7 +353,7 @@ TextEditRules::WillDoAction(Selection* aSelection,
|
||||||
case EditSubAction::eComputeTextToOutput:
|
case EditSubAction::eComputeTextToOutput:
|
||||||
return WillOutputText(aInfo.outputFormat, aInfo.outString, aInfo.flags,
|
return WillOutputText(aInfo.outputFormat, aInfo.outString, aInfo.flags,
|
||||||
aCancel, aHandled);
|
aCancel, aHandled);
|
||||||
case EditSubAction::insertElement:
|
case EditSubAction::eInsertElement:
|
||||||
// i had thought this would be html rules only. but we put pre elements
|
// i had thought this would be html rules only. but we put pre elements
|
||||||
// into plaintext mail when doing quoting for reply! doh!
|
// into plaintext mail when doing quoting for reply! doh!
|
||||||
return WillInsert(aCancel);
|
return WillInsert(aCancel);
|
||||||
|
|
|
@ -1874,7 +1874,7 @@ TextEditor::InsertAsQuotation(const nsAString& aQuotedText,
|
||||||
nsIEditor::eNext);
|
nsIEditor::eNext);
|
||||||
|
|
||||||
// give rules a chance to handle or cancel
|
// give rules a chance to handle or cancel
|
||||||
EditSubActionInfo subActionInfo(EditSubAction::insertElement);
|
EditSubActionInfo subActionInfo(EditSubAction::eInsertElement);
|
||||||
bool cancel, handled;
|
bool cancel, handled;
|
||||||
rv = rules->WillDoAction(selection, subActionInfo, &cancel, &handled);
|
rv = rules->WillDoAction(selection, subActionInfo, &cancel, &handled);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче