summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/EditAction.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /editor/libeditor/EditAction.h
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 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.h25
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: