diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /editor/libeditor/EditorBase.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'editor/libeditor/EditorBase.h')
-rw-r--r-- | editor/libeditor/EditorBase.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/editor/libeditor/EditorBase.h b/editor/libeditor/EditorBase.h index 952b8aa3f6..83f53ff215 100644 --- a/editor/libeditor/EditorBase.h +++ b/editor/libeditor/EditorBase.h @@ -2519,6 +2519,25 @@ class EditorBase : public nsIEditor, nsIEditor::EStripWrappers aStripWrappers); /** + * DeleteRangeWithTransaction() removes content in aRangeToDelete or content + * around collapsed aRangeToDelete with transactions and remove empty + * inclusive ancestor inline elements of the collapsed range after removing + * the contents. + * + * @param aDirectionAndAmount How much range should be removed. + * @param aStripWrappers Whether the parent blocks should be removed + * when they become empty. + * Note that this must be `nsIEditor::eNoStrip` + * if this is a TextEditor because anyway it'll + * be ignored. + * @param aRangeToDelete The range to delete content. + */ + [[nodiscard]] MOZ_CAN_RUN_SCRIPT Result<CaretPoint, nsresult> + DeleteRangeWithTransaction(nsIEditor::EDirection aDirectionAndAmount, + nsIEditor::EStripWrappers aStripWrappers, + nsRange& aRangeToDelete); + + /** * DeleteRangesWithTransaction() removes content in aRangesToDelete or content * around collapsed ranges in aRangesToDelete with transactions and remove * empty inclusive ancestor inline elements of collapsed ranges after |