[Gecko Bug 1793873] Make HTMLEditor::DoSplitNode
stop assuming that joining nodes are in same parent
#36450
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Between splitting a node and undoing it, web apps can move split nodes anywhere.
Therefore, it shouldn't assume they are always in same parent node, and
RangeUpdater::SelAdjJoinNodes
needs to handle it correctly.Unfortunately,
RangeUpdater::SelAdjJoinNodes
cannot handle nested casescorrectly, e.g., right node was in
aRemovedContent
or right node was inthe container of
aStartOfRightContent.GetContainer()
. However, it's nota new regression, and such complicated situation breaks undoing anyway.
Therefore, I think that we don't need to care about it for now.
Differential Revision: https://phabricator.services.mozilla.com/D159230
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1793873
gecko-commit: 26035e8182733cba68e97d26b21f0934494dc727
gecko-reviewers: m_kato