Bug 1766355 - part 5: Make HTMLEditor::MoveChildrenWithTransaction and HTMLEditor::MoveNodeOrChildrenWithTransaction stop touching Selection directly r=m_kato

Unfortunately, they call each other.  Therefore, this patch updates these 2
methods once.

Differential Revision: https://phabricator.services.mozilla.com/D146401
This commit is contained in:
Masayuki Nakano
2022-05-20 08:40:59 +00:00
parent 45567c8ce2
commit fda3a43b66
2 changed files with 54 additions and 40 deletions

View File

@@ -460,10 +460,11 @@ EditActionResult WhiteSpaceVisibilityKeeper::
moveNodeResult.isOk(),
"HTMLEditor::MoveChildrenWithTransaction() failed, but ignored");
if (moveNodeResult.isOk()) {
// When MoveNodeResult starts to store caret point, here does not do
// nothing.
// We don't need to update selection here because of dontChangeMySelection
// above.
moveNodeResult.IgnoreCaretPointSuggestion();
ret |= moveNodeResult;
#ifdef DEBUG
MOZ_ASSERT(!rightBlockHasContent.isErr());
if (rightBlockHasContent.inspect()) {