зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1463985 - part 15: Rename EditSubAction::makeList to EditSubAction::eCreateOrChangeList r=m_kato
MozReview-Commit-ID: 4Mkh3Mfm6fY --HG-- extra : rebase_source : 5509f3f2e05ce4fe25965ca69334309a9109a791
This commit is contained in:
Родитель
54321db367
Коммит
004c690a96
|
@ -69,7 +69,10 @@ enum class EditSubAction : int32_t
|
|||
// \n at least to break current line.
|
||||
eInsertParagraphSeparator,
|
||||
|
||||
makeList,
|
||||
// eCreateOrChangeList indicates to create new list or change existing list
|
||||
// type.
|
||||
eCreateOrChangeList,
|
||||
|
||||
indent,
|
||||
outdent,
|
||||
align,
|
||||
|
|
|
@ -86,7 +86,7 @@ IsStyleCachePreservingSubAction(EditSubAction aEditSubAction)
|
|||
{
|
||||
return aEditSubAction == EditSubAction::eDeleteSelectedContent ||
|
||||
aEditSubAction == EditSubAction::eInsertParagraphSeparator ||
|
||||
aEditSubAction == EditSubAction::makeList ||
|
||||
aEditSubAction == EditSubAction::eCreateOrChangeList ||
|
||||
aEditSubAction == EditSubAction::indent ||
|
||||
aEditSubAction == EditSubAction::outdent ||
|
||||
aEditSubAction == EditSubAction::align ||
|
||||
|
@ -695,7 +695,7 @@ HTMLEditRules::WillDoAction(Selection* aSelection,
|
|||
case EditSubAction::eDeleteSelectedContent:
|
||||
return WillDeleteSelection(aInfo.collapsedAction, aInfo.stripWrappers,
|
||||
aCancel, aHandled);
|
||||
case EditSubAction::makeList:
|
||||
case EditSubAction::eCreateOrChangeList:
|
||||
return WillMakeList(aInfo.blockType, aInfo.entireList,
|
||||
aInfo.bulletType, aCancel, aHandled);
|
||||
case EditSubAction::indent:
|
||||
|
@ -3802,8 +3802,8 @@ HTMLEditRules::MoveBlock(Element& aLeftBlock,
|
|||
nsTArray<OwningNonNull<nsINode>> arrayOfNodes;
|
||||
// GetNodesFromPoint is the workhorse that figures out what we wnat to move.
|
||||
nsresult rv = GetNodesFromPoint(EditorDOMPoint(&aRightBlock, aRightOffset),
|
||||
EditSubAction::makeList, arrayOfNodes,
|
||||
TouchContent::yes);
|
||||
EditSubAction::eCreateOrChangeList,
|
||||
arrayOfNodes, TouchContent::yes);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return EditActionIgnored(rv);
|
||||
}
|
||||
|
@ -4506,7 +4506,7 @@ HTMLEditRules::WillRemoveList(bool* aCancel,
|
|||
AutoSelectionRestorer selectionRestorer(&SelectionRef(), &HTMLEditorRef());
|
||||
|
||||
nsTArray<RefPtr<nsRange>> arrayOfRanges;
|
||||
GetPromotedRanges(arrayOfRanges, EditSubAction::makeList);
|
||||
GetPromotedRanges(arrayOfRanges, EditSubAction::eCreateOrChangeList);
|
||||
|
||||
// use these ranges to contruct a list of nodes to act on.
|
||||
nsTArray<OwningNonNull<nsINode>> arrayOfNodes;
|
||||
|
@ -7582,7 +7582,7 @@ HTMLEditRules::GetNodesForOperation(
|
|||
// Post-process the list to break up inline containers that contain br's, but
|
||||
// only for operations that might care, like making lists or paragraphs
|
||||
if (aEditSubAction == EditSubAction::makeBasicBlock ||
|
||||
aEditSubAction == EditSubAction::makeList ||
|
||||
aEditSubAction == EditSubAction::eCreateOrChangeList ||
|
||||
aEditSubAction == EditSubAction::align ||
|
||||
aEditSubAction == EditSubAction::setAbsolutePosition ||
|
||||
aEditSubAction == EditSubAction::indent ||
|
||||
|
@ -7652,7 +7652,7 @@ HTMLEditRules::GetListActionNodes(
|
|||
AutoTransactionsConserveSelection dontChangeMySelection(&HTMLEditorRef());
|
||||
|
||||
// contruct a list of nodes to act on.
|
||||
nsresult rv = GetNodesFromSelection(EditSubAction::makeList,
|
||||
nsresult rv = GetNodesFromSelection(EditSubAction::eCreateOrChangeList,
|
||||
aOutArrayOfNodes, aTouchContent);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
|
|
|
@ -2022,14 +2022,14 @@ HTMLEditor::MakeOrChangeList(const nsAString& aListType,
|
|||
|
||||
AutoPlaceholderBatch beginBatching(this);
|
||||
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
|
||||
*this, EditSubAction::makeList,
|
||||
*this, EditSubAction::eCreateOrChangeList,
|
||||
nsIEditor::eNext);
|
||||
|
||||
// pre-process
|
||||
RefPtr<Selection> selection = GetSelection();
|
||||
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
|
||||
|
||||
EditSubActionInfo subActionInfo(EditSubAction::makeList);
|
||||
EditSubActionInfo subActionInfo(EditSubAction::eCreateOrChangeList);
|
||||
subActionInfo.blockType = &aListType;
|
||||
subActionInfo.entireList = entireList;
|
||||
subActionInfo.bulletType = &aBulletType;
|
||||
|
|
|
@ -551,7 +551,7 @@ public:
|
|||
// EditSubAction::removeList
|
||||
bool bOrdered;
|
||||
|
||||
// EditSubAction::makeList
|
||||
// EditSubAction::eCreateOrChangeList
|
||||
bool entireList;
|
||||
const nsAString* bulletType;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче