Bug 1740847 - part 1: Track split point at replacing collapsible white-spaces r=m_kato

It `pointToSplit` should be tracked at replacing text, but I have no idea how
to test this because it replaces the text after the split point.

Differential Revision: https://phabricator.services.mozilla.com/D131036
This commit is contained in:
Masayuki Nakano 2021-11-12 07:20:31 +00:00
Родитель b168578a16
Коммит 2c2f8ab1c6
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -2351,6 +2351,8 @@ WhiteSpaceVisibilityKeeper::MakeSureToKeepVisibleWhiteSpacesVisibleAfterSplit(
// pointToSplit will be referred bellow so that we need to keep
// it a valid point.
AutoEditorDOMPointChildInvalidator forgetChild(pointToSplit);
AutoTrackDOMPoint trackSplitPoint(aHTMLEditor.RangeUpdaterRef(),
&pointToSplit);
if (atNextCharOfStart.IsStartOfContainer() ||
atNextCharOfStart.IsPreviousCharASCIISpace()) {
atNextCharOfStart = textFragmentDataAtSplitPoint