diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /editor/libeditor/EditAction.h | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'editor/libeditor/EditAction.h')
-rw-r--r-- | editor/libeditor/EditAction.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/editor/libeditor/EditAction.h b/editor/libeditor/EditAction.h index 6b900b0587..f74d1c6949 100644 --- a/editor/libeditor/EditAction.h +++ b/editor/libeditor/EditAction.h @@ -81,16 +81,19 @@ enum class EditAction { // new non-empty composition string and IME selections. eUpdateComposition, - // eCommitComposition indicates that user commits composition. + // eUpdateCompositionToCommit indicates that user commits composition with + // the new data. That means that there will be no IME selections, but the + // composition continues until the following eCompositionEnd event. + eUpdateCompositionToCommit, + + // eCommitComposition indicates that user commits composition and ends the + // composition. eCommitComposition, - // eCancelComposition indicates that user cancels composition. + // eCancelComposition indicates that user cancels composition and ends the + // composition with empty string. eCancelComposition, - // eDeleteByComposition indicates that user starts composition with - // empty string and there was selected content. - eDeleteByComposition, - // eUndo/eRedo indicate to undo/redo a transaction. eUndo, eRedo, @@ -547,6 +550,7 @@ inline EditorInputType ToInputType(EditAction aEditAction) { case EditAction::ePasteAsQuotation: return EditorInputType::eInsertFromPasteAsQuotation; case EditAction::eUpdateComposition: + case EditAction::eUpdateCompositionToCommit: return EditorInputType::eInsertCompositionText; case EditAction::eCommitComposition: if (StaticPrefs::dom_input_events_conform_to_level_1()) { @@ -558,13 +562,6 @@ inline EditorInputType ToInputType(EditAction aEditAction) { return EditorInputType::eInsertCompositionText; } return EditorInputType::eDeleteCompositionText; - case EditAction::eDeleteByComposition: - if (StaticPrefs::dom_input_events_conform_to_level_1()) { - // XXX Or EditorInputType::eDeleteContent? I don't know which IME may - // causes this situation. - return EditorInputType::eInsertCompositionText; - } - return EditorInputType::eDeleteByComposition; case EditAction::eInsertLinkElement: return EditorInputType::eInsertLink; case EditAction::eDeleteWordBackward: @@ -713,9 +710,9 @@ inline bool MayEditActionDeleteSelection(const EditAction aEditAction) { return false; case EditAction::eUpdateComposition: + case EditAction::eUpdateCompositionToCommit: case EditAction::eCommitComposition: case EditAction::eCancelComposition: - case EditAction::eDeleteByComposition: return true; case EditAction::eUndo: |