Bug 1463985 - part 26: Rename EditSubAction::decreaseZIndex and EditSubAction::increaseZIndex to EditSubAction::eDecreaseZIndex and EditSubAction::eIncreaseZIndex r?m_kato
MozReview-Commit-ID: 87Pux0xZOM
--- a/editor/libeditor/EditAction.h
+++ b/editor/libeditor/EditAction.h
@@ -109,18 +109,20 @@ enum class EditSubAction : int32_t
// source and insert into the DOM tree. So, this is similar to innerHTML.
eInsertHTMLSource,
// eSetPositionToAbsolute and eSetPositionToStatic indicate to set position
// property to absolute or static.
eSetPositionToAbsolute,
eSetPositionToStatic,
- decreaseZIndex,
- increaseZIndex,
+ // eDecreaseZIndex and eIncreaseZIndex indicate to decrease and increase
+ // z-index value.
+ eDecreaseZIndex,
+ eIncreaseZIndex,
};
} // namespace mozilla
inline bool operator!(const mozilla::EditSubAction& aEditSubAction)
{
return aEditSubAction == mozilla::EditSubAction::eNone;
}
--- a/editor/libeditor/HTMLAbsPositionEditor.cpp
+++ b/editor/libeditor/HTMLAbsPositionEditor.cpp
@@ -141,26 +141,26 @@ HTMLEditor::SetZIndex(Element& aElement,
nsresult
HTMLEditor::AddZIndex(int32_t aChange)
{
AutoPlaceholderBatch beginBatching(this);
AutoTopLevelEditSubActionNotifier maybeTopLevelEditSubAction(
*this,
aChange < 0 ?
- EditSubAction::decreaseZIndex :
- EditSubAction::increaseZIndex,
+ EditSubAction::eDecreaseZIndex :
+ EditSubAction::eIncreaseZIndex,
nsIEditor::eNext);
// brade: can we get rid of this comment?
// Find out if the selection is collapsed:
RefPtr<Selection> selection = GetSelection();
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
- EditSubActionInfo subActionInfo(aChange < 0 ? EditSubAction::decreaseZIndex :
- EditSubAction::increaseZIndex);
+ EditSubActionInfo subActionInfo(aChange < 0 ? EditSubAction::eDecreaseZIndex :
+ EditSubAction::eIncreaseZIndex);
bool cancel, handled;
// Protect the edit rules object from dying
RefPtr<TextEditRules> rules(mRules);
nsresult rv =
rules->WillDoAction(selection, subActionInfo, &cancel, &handled);
if (cancel || NS_FAILED(rv)) {
return rv;
}
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -727,19 +727,19 @@ HTMLEditRules::WillDoAction(Selection* a
case EditSubAction::eInsertElement: {
nsresult rv = WillInsert(aCancel);
if (NS_WARN_IF(rv == NS_ERROR_EDITOR_DESTROYED)) {
return NS_ERROR_EDITOR_DESTROYED;
}
NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "WillInsert() failed");
return NS_OK;
}
- case EditSubAction::decreaseZIndex:
+ case EditSubAction::eDecreaseZIndex:
return WillRelativeChangeZIndex(-1, aCancel, aHandled);
- case EditSubAction::increaseZIndex:
+ case EditSubAction::eIncreaseZIndex:
return WillRelativeChangeZIndex(1, aCancel, aHandled);
default:
return TextEditRules::WillDoAction(&SelectionRef(), aInfo,
aCancel, aHandled);
}
}
nsresult