зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1463985 - part 14: Rename EditSubAction::insertBreak to EditSubAction::eInsertParagraphSeparator r=m_kato
MozReview-Commit-ID: DhEzqhLxMme --HG-- extra : rebase_source : 87e482478b881ba9c9fbc99562fce5e5a576e0ab
This commit is contained in:
Родитель
f24da5be63
Коммит
54321db367
|
@ -65,8 +65,10 @@ enum class EditSubAction : int32_t
|
|||
// eSetText indicates to set editor value to new value.
|
||||
eSetText,
|
||||
|
||||
// HTML editor only actions
|
||||
insertBreak = 3000,
|
||||
// eInsertParagraphSeparator indicates to insert paragraph separator, <br> or
|
||||
// \n at least to break current line.
|
||||
eInsertParagraphSeparator,
|
||||
|
||||
makeList,
|
||||
indent,
|
||||
outdent,
|
||||
|
|
|
@ -85,7 +85,7 @@ static bool
|
|||
IsStyleCachePreservingSubAction(EditSubAction aEditSubAction)
|
||||
{
|
||||
return aEditSubAction == EditSubAction::eDeleteSelectedContent ||
|
||||
aEditSubAction == EditSubAction::insertBreak ||
|
||||
aEditSubAction == EditSubAction::eInsertParagraphSeparator ||
|
||||
aEditSubAction == EditSubAction::makeList ||
|
||||
aEditSubAction == EditSubAction::indent ||
|
||||
aEditSubAction == EditSubAction::outdent ||
|
||||
|
@ -539,7 +539,7 @@ HTMLEditRules::AfterEditInner(EditSubAction aEditSubAction,
|
|||
if (aEditSubAction == EditSubAction::eInsertText ||
|
||||
aEditSubAction == EditSubAction::eInsertTextComingFromIME ||
|
||||
aEditSubAction == EditSubAction::eDeleteSelectedContent ||
|
||||
aEditSubAction == EditSubAction::insertBreak ||
|
||||
aEditSubAction == EditSubAction::eInsertParagraphSeparator ||
|
||||
aEditSubAction == EditSubAction::htmlPaste ||
|
||||
aEditSubAction == EditSubAction::loadHTML) {
|
||||
rv = AdjustWhitespace();
|
||||
|
@ -575,7 +575,7 @@ HTMLEditRules::AfterEditInner(EditSubAction aEditSubAction,
|
|||
if (aEditSubAction == EditSubAction::eInsertText ||
|
||||
aEditSubAction == EditSubAction::eInsertTextComingFromIME ||
|
||||
aEditSubAction == EditSubAction::eDeleteSelectedContent ||
|
||||
aEditSubAction == EditSubAction::insertBreak ||
|
||||
aEditSubAction == EditSubAction::eInsertParagraphSeparator ||
|
||||
aEditSubAction == EditSubAction::htmlPaste ||
|
||||
aEditSubAction == EditSubAction::loadHTML) {
|
||||
rv = AdjustSelection(aDirection);
|
||||
|
@ -689,7 +689,7 @@ HTMLEditRules::WillDoAction(Selection* aSelection,
|
|||
aInfo.maxLength);
|
||||
case EditSubAction::loadHTML:
|
||||
return WillLoadHTML();
|
||||
case EditSubAction::insertBreak:
|
||||
case EditSubAction::eInsertParagraphSeparator:
|
||||
UndefineCaretBidiLevel();
|
||||
return WillInsertBreak(aCancel, aHandled);
|
||||
case EditSubAction::eDeleteSelectedContent:
|
||||
|
@ -758,7 +758,7 @@ HTMLEditRules::DidDoAction(Selection* aSelection,
|
|||
|
||||
switch (aInfo.mEditSubAction) {
|
||||
case EditSubAction::eInsertText:
|
||||
case EditSubAction::insertBreak:
|
||||
case EditSubAction::eInsertParagraphSeparator:
|
||||
case EditSubAction::eInsertTextComingFromIME:
|
||||
return NS_OK;
|
||||
case EditSubAction::eDeleteSelectedContent:
|
||||
|
@ -7133,7 +7133,7 @@ HTMLEditRules::GetPromotedPoint(RulesEndpoint aWhere,
|
|||
// actions
|
||||
if (aEditSubAction == EditSubAction::eInsertText ||
|
||||
aEditSubAction == EditSubAction::eInsertTextComingFromIME ||
|
||||
aEditSubAction == EditSubAction::insertBreak ||
|
||||
aEditSubAction == EditSubAction::eInsertParagraphSeparator ||
|
||||
aEditSubAction == EditSubAction::eDeleteText) {
|
||||
bool isSpace, isNBSP;
|
||||
nsCOMPtr<nsIContent> content =
|
||||
|
@ -7382,7 +7382,7 @@ HTMLEditRules::PromoteRange(nsRange& aRange,
|
|||
|
||||
if (aEditSubAction == EditSubAction::eInsertText ||
|
||||
aEditSubAction == EditSubAction::eInsertTextComingFromIME ||
|
||||
aEditSubAction == EditSubAction::insertBreak ||
|
||||
aEditSubAction == EditSubAction::eInsertParagraphSeparator ||
|
||||
aEditSubAction == EditSubAction::eDeleteText) {
|
||||
if (!startNode->IsContent() ||
|
||||
!endNode->IsContent()) {
|
||||
|
|
|
@ -1155,7 +1155,8 @@ HTMLEditor::InsertBrElementAtSelectionWithTransaction()
|
|||
{
|
||||
// calling it text insertion to trigger moz br treatment by rules
|
||||
// XXX Why do we use EditSubAction::eInsertText here? Looks like
|
||||
// EditSubAction::insertBreak or EditSubAction::eInsertNode is better.
|
||||
// EditSubAction::eInsertParagraphSeparator or EditSubAction::eInsertNode
|
||||
// is better.
|
||||
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
||||
*this, EditSubAction::eInsertText,
|
||||
nsIEditor::eNext);
|
||||
|
|
|
@ -327,7 +327,7 @@ TextEditRules::WillDoAction(Selection* aSelection,
|
|||
|
||||
// my kingdom for dynamic cast
|
||||
switch (aInfo.mEditSubAction) {
|
||||
case EditSubAction::insertBreak:
|
||||
case EditSubAction::eInsertParagraphSeparator:
|
||||
UndefineCaretBidiLevel();
|
||||
return WillInsertBreak(aCancel, aHandled, aInfo.maxLength);
|
||||
case EditSubAction::eInsertText:
|
||||
|
|
|
@ -1009,7 +1009,8 @@ TextEditor::InsertParagraphSeparatorAsAction()
|
|||
|
||||
AutoPlaceholderBatch beginBatching(this);
|
||||
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
||||
*this, EditSubAction::insertBreak,
|
||||
*this,
|
||||
EditSubAction::eInsertParagraphSeparator,
|
||||
nsIEditor::eNext);
|
||||
|
||||
RefPtr<Selection> selection = GetSelection();
|
||||
|
@ -1017,7 +1018,7 @@ TextEditor::InsertParagraphSeparatorAsAction()
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
EditSubActionInfo subActionInfo(EditSubAction::insertBreak);
|
||||
EditSubActionInfo subActionInfo(EditSubAction::eInsertParagraphSeparator);
|
||||
subActionInfo.maxLength = mMaxTextLength;
|
||||
bool cancel, handled;
|
||||
nsresult rv = rules->WillDoAction(selection, subActionInfo, &cancel, &handled);
|
||||
|
|
Загрузка…
Ссылка в новой задаче